ia64/xen-unstable

changeset 3074:5c5d3fca4e9b

bitkeeper revision 1.1159.1.440 (419e90a0wC3wpCnc_7gY99KZqDBSPA)

sync w/ head.
author cl349@arcadians.cl.cam.ac.uk
date Sat Nov 20 00:32:32 2004 +0000 (2004-11-20)
parents 2befcd58b59b
children 665c0039f15f
files xen/arch/x86/traps.c xen/common/physdev.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Fri Nov 19 23:43:49 2004 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Sat Nov 20 00:32:32 2004 +0000
     1.3 @@ -391,7 +391,7 @@ asmlinkage int do_page_fault(struct xen_
     1.4               ((error_code & 3) == 3) && /* write-protection fault */
     1.5               ptwr_do_page_fault(addr) )
     1.6          {
     1.7 -            if ( unlikely(d->mm.shadow_mode) )
     1.8 +            if ( unlikely(ed->mm.shadow_mode) )
     1.9                  (void)shadow_fault(addr, error_code);
    1.10              return EXCRET_fault_fixed;
    1.11          }
     2.1 --- a/xen/common/physdev.c	Fri Nov 19 23:43:49 2004 +0000
     2.2 +++ b/xen/common/physdev.c	Sat Nov 20 00:32:32 2004 +0000
     2.3 @@ -125,6 +125,7 @@ int physdev_pci_access_modify(
     2.4      domid_t dom, int bus, int dev, int func, int enable)
     2.5  {
     2.6      struct domain *p;
     2.7 +    struct exec_domain *ed;
     2.8      struct pci_dev *pdev;
     2.9      int i, j, rc = 0;
    2.10   
    2.11 @@ -145,6 +146,8 @@ int physdev_pci_access_modify(
    2.12      if ( (p = find_domain_by_id(dom)) == NULL ) 
    2.13          return -ESRCH;
    2.14  
    2.15 +    ed = p->exec_domain[0];     /* XXX */
    2.16 +
    2.17      /* Make the domain privileged. */
    2.18      set_bit(DF_PHYSDEV, &p->d_flags);
    2.19  	/* FIXME: MAW for now make the domain REALLY privileged so that it
    2.20 @@ -169,16 +172,16 @@ int physdev_pci_access_modify(
    2.21  
    2.22      /* Now, setup access to the IO ports and memory regions for the device. */
    2.23  
    2.24 -    if ( p->thread.io_bitmap == NULL )
    2.25 +    if ( ed->thread.io_bitmap == NULL )
    2.26      {
    2.27 -        if ( (p->thread.io_bitmap = xmalloc(IOBMP_BYTES)) == NULL )
    2.28 +        if ( (ed->thread.io_bitmap = xmalloc(IOBMP_BYTES)) == NULL )
    2.29          {
    2.30              rc = -ENOMEM;
    2.31              goto out;
    2.32          }
    2.33 -        memset(p->thread.io_bitmap, 0xFF, IOBMP_BYTES);
    2.34 +        memset(ed->thread.io_bitmap, 0xFF, IOBMP_BYTES);
    2.35  
    2.36 -        p->thread.io_bitmap_sel = ~0ULL;
    2.37 +        ed->thread.io_bitmap_sel = ~0ULL;
    2.38      }
    2.39  
    2.40      for ( i = 0; i < DEVICE_COUNT_RESOURCE; i++ )
    2.41 @@ -195,8 +198,8 @@ int physdev_pci_access_modify(
    2.42                   "for device %s\n", dom, r->start, r->end, pdev->slot_name);
    2.43              for ( j = r->start; j < r->end + 1; j++ )
    2.44              {
    2.45 -                clear_bit(j, p->thread.io_bitmap);
    2.46 -                clear_bit(j / IOBMP_BITS_PER_SELBIT, &p->thread.io_bitmap_sel);
    2.47 +                clear_bit(j, ed->thread.io_bitmap);
    2.48 +                clear_bit(j / IOBMP_BITS_PER_SELBIT, &ed->thread.io_bitmap_sel);
    2.49              }
    2.50          }
    2.51