ia64/xen-unstable

changeset 1230:bf27b8aaeb2f

bitkeeper revision 1.812.1.2 (40631b5896PId5VPtNq3vagDYVMoqQ)

merge changes manually
author ach61@labyrinth.cl.cam.ac.uk
date Thu Mar 25 17:48:08 2004 +0000 (2004-03-25)
parents 9269207cff3f
children d1172efb8a1e
files xen/arch/i386/pdb-stub.c xen/common/debug-linux.c xen/common/debug.c xen/include/asm-i386/pdb.h
line diff
     1.1 --- a/xen/arch/i386/pdb-stub.c	Thu Mar 25 16:59:52 2004 +0000
     1.2 +++ b/xen/arch/i386/pdb-stub.c	Thu Mar 25 17:48:08 2004 +0000
     1.3 @@ -7,16 +7,16 @@
     1.4   * university of cambridge computer laboratory
     1.5   */
     1.6  
     1.7 -#include <xeno/lib.h>
     1.8 -#include <xeno/sched.h>
     1.9 +#include <xen/lib.h>
    1.10 +#include <xen/sched.h>
    1.11  #include <asm-i386/ptrace.h>
    1.12 -#include <xeno/keyhandler.h> 
    1.13 +#include <xen/keyhandler.h> 
    1.14  #include <asm/apic.h>
    1.15  #include <asm/domain_page.h>                           /* [un]map_domain_mem */
    1.16  #include <asm/processor.h>
    1.17  #include <asm/pdb.h>
    1.18 -#include <xeno/list.h>
    1.19 -#include <xeno/serial.h>
    1.20 +#include <xen/list.h>
    1.21 +#include <xen/serial.h>
    1.22  
    1.23  #define DEBUG_TRACE
    1.24  #ifdef DEBUG_TRACE
    1.25 @@ -347,7 +347,10 @@ pdb_process_command (char *ptr, struct p
    1.26          struct task_struct *p;
    1.27  
    1.28  	p = find_domain_by_id(pdb_ctx[pdb_level].ctrl);
    1.29 -	pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.pagetable);
    1.30 +	if (p->mm.shadow_mode)
    1.31 +	  pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.shadow_table);
    1.32 +	else
    1.33 +	  pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.pagetable);
    1.34  	put_task_struct(p);
    1.35  	printk ("PROCESS: PDB SET CONTROL DOMAIN TO 0x%lx 0x%x\n",
    1.36  		pdb_ctx[pdb_level].ctrl_cr3, 
    1.37 @@ -359,7 +362,10 @@ pdb_process_command (char *ptr, struct p
    1.38          struct task_struct *p;
    1.39  
    1.40  	p = find_domain_by_id(pdb_ctx[pdb_level].info);
    1.41 -	pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.pagetable);
    1.42 +	if (p->mm.shadow_mode)
    1.43 +	  pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.shadow_table);
    1.44 +	else
    1.45 +	  pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.pagetable);
    1.46  	put_task_struct(p);
    1.47  	printk ("PROCESS: PDB SET INFO DOMAIN TO 0x%lx 0x%x\n",
    1.48  		pdb_ctx[pdb_level].info_cr3, 
    1.49 @@ -462,7 +468,10 @@ pdb_process_command (char *ptr, struct p
    1.50  		if (thread > 0)
    1.51  		{
    1.52  		    struct task_struct *p = find_domain_by_id(thread);
    1.53 -		    pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.pagetable);
    1.54 +		    if (p->mm.shadow_mode)
    1.55 +		      pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.shadow_table);
    1.56 +		    else
    1.57 +		      pdb_ctx[pdb_level].ctrl_cr3 = pagetable_val(p->mm.pagetable);
    1.58  		    put_task_struct(p);
    1.59  		    printk ("PDB SET CONTROL DOMAIN TO 0x%lx 0x%x\n",
    1.60  			    pdb_ctx[pdb_level].ctrl_cr3,
    1.61 @@ -476,7 +485,10 @@ pdb_process_command (char *ptr, struct p
    1.62  		if (thread > 0)
    1.63  		{
    1.64  		    struct task_struct *p = find_domain_by_id(thread);
    1.65 -		    pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.pagetable);
    1.66 +		    if (p->mm.shadow_mode)
    1.67 +		      pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.shadow_table);
    1.68 +		    else
    1.69 +		      pdb_ctx[pdb_level].info_cr3 = pagetable_val(p->mm.pagetable);
    1.70  		    put_task_struct(p);
    1.71  		    printk ("PDB SET INFO DOMAIN TO 0x%lx 0x%x\n",
    1.72  			    pdb_ctx[pdb_level].info_cr3,
    1.73 @@ -969,8 +981,9 @@ int pdb_change_values_one_page(u_char *b
    1.74      if (!(l2_pgentry_val(*l2_table) & _PAGE_PRESENT)) 
    1.75      {
    1.76          struct task_struct *p = find_domain_by_id(0);
    1.77 -	printk ("cr3: 0x%lx    dom0cr3:  0x%lx\n", 
    1.78 -		cr3, pagetable_val(p->mm.pagetable));
    1.79 +	printk ("cr3: 0x%lx    dom0cr3:  0x%lx\n",  cr3,
    1.80 +		p->mm.shadow_mode ? pagetable_val(p->mm.shadow_table)
    1.81 +		                  : pagetable_val(p->mm.pagetable));
    1.82  	put_task_struct(p);
    1.83  
    1.84  	printk ("L2:0x%p (0x%lx) \n", l2_table, l2_pgentry_val(*l2_table));
     2.1 --- a/xen/common/debug-linux.c	Thu Mar 25 16:59:52 2004 +0000
     2.2 +++ b/xen/common/debug-linux.c	Thu Mar 25 17:48:08 2004 +0000
     2.3 @@ -1,6 +1,6 @@
     2.4 -#include <xeno/config.h>
     2.5 -#include <xeno/types.h>
     2.6 -#include <xeno/lib.h>
     2.7 +#include <xen/config.h>
     2.8 +#include <xen/types.h>
     2.9 +#include <xen/lib.h>
    2.10  #include <hypervisor-ifs/dom0_ops.h>
    2.11  #include <asm/pdb.h>
    2.12  
    2.13 @@ -12,11 +12,11 @@
    2.14  #define PIDHASH_SZ (4096 >> 2)
    2.15  #define pid_hashfn(x)	((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
    2.16  
    2.17 -/* from asm-xeno/pgtable-2level.h */
    2.18 +/* from asm-xen/pgtable-2level.h */
    2.19  #define PGDIR_SHIFT	22
    2.20  #define PTRS_PER_PGD	1024
    2.21  
    2.22 -/* from asm-xeno/page.h */
    2.23 +/* from asm-xen/page.h */
    2.24  #define PAGE_SHIFT	12
    2.25  #define PAGE_SIZE	(1UL << PAGE_SHIFT)
    2.26  #define PAGE_MASK	(~(PAGE_SIZE-1))
    2.27 @@ -34,7 +34,7 @@
    2.28  void pdb_linux_process_details (unsigned long cr3, int pid, char *buffer);
    2.29  
    2.30  
    2.31 -/* adapted from asm-xeno/page.h */
    2.32 +/* adapted from asm-xen/page.h */
    2.33  static inline unsigned long machine_to_phys(unsigned long cr3,
    2.34                                              unsigned long machine)
    2.35  {
     3.1 --- a/xen/common/debug.c	Thu Mar 25 16:59:52 2004 +0000
     3.2 +++ b/xen/common/debug.c	Thu Mar 25 17:48:08 2004 +0000
     3.3 @@ -4,12 +4,12 @@
     3.4   * xen pervasive debugger
     3.5   */
     3.6  
     3.7 -#include <xeno/config.h>
     3.8 -#include <xeno/types.h>
     3.9 -#include <xeno/lib.h>
    3.10 +#include <xen/config.h>
    3.11 +#include <xen/types.h>
    3.12 +#include <xen/lib.h>
    3.13  #include <hypervisor-ifs/dom0_ops.h>
    3.14 -#include <xeno/sched.h>
    3.15 -#include <xeno/event.h>
    3.16 +#include <xen/sched.h>
    3.17 +#include <xen/event.h>
    3.18  #include <asm/page.h>
    3.19  #include <asm/pdb.h>
    3.20  
    3.21 @@ -73,7 +73,10 @@ void pdb_do_debug (dom0_op_t *op)
    3.22  	    struct task_struct *p;
    3.23  
    3.24  	    p = find_domain_by_id(op->u.debug.domain);
    3.25 -	    cr3 = pagetable_val(p->mm.pagetable);
    3.26 +	    if (p->mm.shadow_mode)
    3.27 +	      cr3 = pagetable_val(p->mm.shadow_table);
    3.28 +	    else
    3.29 +	      cr3 = pagetable_val(p->mm.pagetable);
    3.30  
    3.31              for (loop = 0; loop < op->u.debug.in2; loop++)         /* length */
    3.32              { 
    3.33 @@ -91,15 +94,13 @@ void pdb_do_debug (dom0_op_t *op)
    3.34          }
    3.35          case 's' :
    3.36  	{
    3.37 -	    unsigned long cpu_mask;
    3.38  	    struct task_struct * p = find_domain_by_id(op->u.debug.domain);
    3.39  
    3.40  	    if (p != NULL)
    3.41  	    {
    3.42  	        if (p->state != TASK_STOPPED)
    3.43  		{
    3.44 -		    cpu_mask = mark_guest_event(p, _EVENT_STOP);
    3.45 -		    guest_event_notify(cpu_mask);
    3.46 +		  send_guest_virq(p, VIRQ_STOP);
    3.47  		}
    3.48  		put_task_struct(p);
    3.49  	    }
     4.1 --- a/xen/include/asm-i386/pdb.h	Thu Mar 25 16:59:52 2004 +0000
     4.2 +++ b/xen/include/asm-i386/pdb.h	Thu Mar 25 17:48:08 2004 +0000
     4.3 @@ -12,7 +12,7 @@
     4.4  #define __PDB_H__
     4.5  
     4.6  #include <asm/ptrace.h>
     4.7 -#include <xeno/list.h>
     4.8 +#include <xen/list.h>
     4.9  #include <hypervisor-ifs/hypervisor-if.h>                   /* for domain id */
    4.10  
    4.11  extern int pdb_initialized;