ia64/xen-unstable

changeset 16299:4255ca79f9d9

merge with xen-unstable.hg (staging)
author Alex Williamson <alex.williamson@hp.com>
date Thu Nov 01 09:07:16 2007 -0600 (2007-11-01)
parents 41c1731c9125 adefbadab27c
children cbf8224779c6
files
line diff
     1.1 --- a/tools/misc/xenperf.c	Thu Nov 01 09:00:27 2007 -0600
     1.2 +++ b/tools/misc/xenperf.c	Thu Nov 01 09:07:16 2007 -0600
     1.3 @@ -161,7 +161,7 @@ int main(int argc, char *argv[])
     1.4      if ( pcd == NULL
     1.5           || lock_pages(pcd, sizeof(*pcd) * num_desc) != 0
     1.6           || pcv == NULL
     1.7 -         || lock_pages(pcd, sizeof(*pcv) * num_val) != 0)
     1.8 +         || lock_pages(pcv, sizeof(*pcv) * num_val) != 0)
     1.9      {
    1.10          fprintf(stderr, "Could not alloc or lock buffers: %d (%s)\n",
    1.11                  errno, strerror(errno));
     2.1 --- a/tools/python/xen/util/xsm/acm/acm.py	Thu Nov 01 09:00:27 2007 -0600
     2.2 +++ b/tools/python/xen/util/xsm/acm/acm.py	Thu Nov 01 09:07:16 2007 -0600
     2.3 @@ -711,33 +711,24 @@ def unify_resname(resource, mustexist=Tr
     2.4          except:
     2.5              err("Resource spec '%s' contains no tap subtype" % resource)
     2.6  
     2.7 -    import os
     2.8 -    if typ in ["phy", "tap"]:
     2.9 +    if typ in ["phy"]:
    2.10          if not resfile.startswith("/"):
    2.11              resfile = "/dev/" + resfile
    2.12          if mustexist:
    2.13 -            stats = os.lstat(resfile)
    2.14 -            if stat.S_ISLNK(stats[stat.ST_MODE]):
    2.15 -                resolved = os.readlink(resfile)
    2.16 -                if resolved[0] != "/":
    2.17 -                    resfile = os.path.join(os.path.dirname(resfile), resolved)
    2.18 -                    resfile = os.path.abspath(resfile)
    2.19 -                else:
    2.20 -                    resfile = resolved
    2.21 +            resfile = os.path.realpath(resfile)
    2.22 +            try:
    2.23                  stats = os.lstat(resfile)
    2.24 -            if not (stat.S_ISBLK(stats[stat.ST_MODE])):
    2.25 +                if not (stat.S_ISBLK(stats[stat.ST_MODE])):
    2.26 +                    err("Invalid resource")
    2.27 +            except:
    2.28                  err("Invalid resource")
    2.29  
    2.30      if typ in [ "file", "tap" ]:
    2.31 -        if mustexist:
    2.32 -            stats = os.lstat(resfile)
    2.33 -            if stat.S_ISLNK(stats[stat.ST_MODE]):
    2.34 -                resfile = os.readlink(resfile)
    2.35 -                stats = os.lstat(resfile)
    2.36 -            if not stat.S_ISREG(stats[stat.ST_MODE]):
    2.37 -                err("Invalid resource")
    2.38 +        resfile = os.path.realpath(resfile)
    2.39 +        if mustexist and not os.path.isfile(resfile):
    2.40 +            err("Invalid resource")
    2.41  
    2.42 -    #file: resources must specified with absolute path
    2.43 +    #file: resources must be specified with absolute path
    2.44      #vlan resources don't start with '/'
    2.45      if typ != "vlan":
    2.46          if (not resfile.startswith("/")) or \
     3.1 --- a/tools/python/xen/xend/XendOptions.py	Thu Nov 01 09:00:27 2007 -0600
     3.2 +++ b/tools/python/xen/xend/XendOptions.py	Thu Nov 01 09:07:16 2007 -0600
     3.3 @@ -386,6 +386,10 @@ if os.uname()[0] == 'SunOS':
     3.4                  return scf.get_bool(name)
     3.5              except scf.error, e:
     3.6                  if e[0] == scf.SCF_ERROR_NOT_FOUND:
     3.7 +                    if val in ['yes', 'y', '1', 'on',  'true',  't']:
     3.8 +                        return True
     3.9 +                    if val in ['no',  'n', '0', 'off', 'false', 'f']:
    3.10 +                        return False
    3.11                      return val
    3.12                  else:
    3.13                      raise XendError("option %s: %s:%s" % (name, e[1], e[2]))
     4.1 --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Nov 01 09:00:27 2007 -0600
     4.2 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h	Thu Nov 01 09:07:16 2007 -0600
     4.3 @@ -44,13 +44,20 @@
     4.4  #define gfp_t unsigned
     4.5  #endif
     4.6  
     4.7 -#if defined (_LINUX_NOTIFIER_H) && !defined ATOMIC_NOTIFIER_HEAD
     4.8 +#if defined(_LINUX_NOTIFIER_H) && !defined(ATOMIC_NOTIFIER_HEAD)
     4.9  #define ATOMIC_NOTIFIER_HEAD(name) struct notifier_block *name
    4.10  #define atomic_notifier_chain_register(chain,nb) notifier_chain_register(chain,nb)
    4.11  #define atomic_notifier_chain_unregister(chain,nb) notifier_chain_unregister(chain,nb)
    4.12  #define atomic_notifier_call_chain(chain,val,v) notifier_call_chain(chain,val,v)
    4.13  #endif
    4.14  
    4.15 +#if defined(_LINUX_NOTIFIER_H) && !defined(BLOCKING_NOTIFIER_HEAD)
    4.16 +#define BLOCKING_NOTIFIER_HEAD(name) struct notifier_block *name
    4.17 +#define blocking_notifier_chain_register(chain,nb) notifier_chain_register(chain,nb)
    4.18 +#define blocking_notifier_chain_unregister(chain,nb) notifier_chain_unregister(chain,nb)
    4.19 +#define blocking_notifier_call_chain(chain,val,v) notifier_call_chain(chain,val,v)
    4.20 +#endif
    4.21 +
    4.22  #if defined(_LINUX_MM_H) && defined set_page_count
    4.23  #define init_page_count(page) set_page_count(page, 1)
    4.24  #endif
     5.1 --- a/xen/arch/ia64/xen/mm.c	Thu Nov 01 09:00:27 2007 -0600
     5.2 +++ b/xen/arch/ia64/xen/mm.c	Thu Nov 01 09:07:16 2007 -0600
     5.3 @@ -2412,7 +2412,7 @@ steal_page(struct domain *d, struct page
     5.4      return 0;
     5.5  }
     5.6  
     5.7 -void
     5.8 +int
     5.9  guest_physmap_add_page(struct domain *d, unsigned long gpfn,
    5.10                         unsigned long mfn)
    5.11  {
    5.12 @@ -2426,6 +2426,7 @@ guest_physmap_add_page(struct domain *d,
    5.13      //BUG_ON(mfn != ((lookup_domain_mpa(d, gpfn << PAGE_SHIFT) & _PFN_MASK) >> PAGE_SHIFT));
    5.14  
    5.15      perfc_incr(guest_physmap_add_page);
    5.16 +    return 0;
    5.17  }
    5.18  
    5.19  void
     6.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Nov 01 09:00:27 2007 -0600
     6.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Nov 01 09:07:16 2007 -0600
     6.3 @@ -50,9 +50,15 @@
     6.4  #include <public/version.h>
     6.5  #include <public/memory.h>
     6.6  
     6.7 -/* Xen command-line option to disable hardware-assisted paging */
     6.8 -static int opt_hap_disabled;
     6.9 -invbool_param("hap", opt_hap_disabled);
    6.10 +/*
    6.11 + * Xen command-line option to allow/disallow hardware-assisted paging.
    6.12 + * Since the phys-to-machine table of AMD NPT is in host format, 32-bit Xen
    6.13 + * can only support guests using NPT with up to a 4GB memory map. Therefore
    6.14 + * we disallow HAP by default on PAE Xen (by default we want to support an
    6.15 + * 8GB pseudophysical memory map for HVM guests on a PAE host).
    6.16 + */
    6.17 +static int opt_hap_permitted = (CONFIG_PAGING_LEVELS != 3);
    6.18 +boolean_param("hap", opt_hap_permitted);
    6.19  
    6.20  int hvm_enabled __read_mostly;
    6.21  
    6.22 @@ -82,10 +88,10 @@ void hvm_enable(struct hvm_function_tabl
    6.23  
    6.24      if ( hvm_funcs.hap_supported )
    6.25      {
    6.26 -        if ( opt_hap_disabled )
    6.27 +        if ( !opt_hap_permitted )
    6.28              hvm_funcs.hap_supported = 0;
    6.29 -        printk("HVM: Hardware Assisted Paging %sabled\n",
    6.30 -               hvm_funcs.hap_supported ? "en" : "dis");
    6.31 +        printk("HVM: Hardware Assisted Paging detected %s.\n",
    6.32 +               hvm_funcs.hap_supported ? "and enabled" : "but disabled");
    6.33      }
    6.34  }
    6.35  
    6.36 @@ -1849,7 +1855,8 @@ long do_hvm_op(unsigned long op, XEN_GUE
    6.37              case HVM_PARAM_TIMER_MODE:
    6.38                  rc = -EINVAL;
    6.39                  if ( (a.value != HVMPTM_delay_for_missed_ticks) &&
    6.40 -                     (a.value != HVMPTM_no_delay_for_missed_ticks) )
    6.41 +                     (a.value != HVMPTM_no_delay_for_missed_ticks) &&
    6.42 +                     (a.value != HVMPTM_no_missed_tick_accounting) )
    6.43                      goto param_fail;
    6.44                  break;
    6.45              }
     7.1 --- a/xen/arch/x86/hvm/intercept.c	Thu Nov 01 09:00:27 2007 -0600
     7.2 +++ b/xen/arch/x86/hvm/intercept.c	Thu Nov 01 09:07:16 2007 -0600
     7.3 @@ -157,19 +157,26 @@ int hvm_buffered_io_send(ioreq_t *p)
     7.4      struct hvm_ioreq_page *iorp = &v->domain->arch.hvm_domain.buf_ioreq;
     7.5      buffered_iopage_t *pg = iorp->va;
     7.6      buf_ioreq_t bp;
     7.7 -    /* Timeoffset sends 64b data, but no address.  Use two consecutive slots. */
     7.8 +    /* Timeoffset sends 64b data, but no address. Use two consecutive slots. */
     7.9      int qw = 0;
    7.10  
    7.11      /* Ensure buffered_iopage fits in a page */
    7.12      BUILD_BUG_ON(sizeof(buffered_iopage_t) > PAGE_SIZE);
    7.13  
    7.14      /* Return 0 for the cases we can't deal with. */
    7.15 -    if (p->addr > 0xffffful || p->data_is_ptr || p->df || p->count != 1)
    7.16 +    if ( (p->addr > 0xffffful) || p->data_is_ptr || p->df || (p->count != 1) )
    7.17 +    {
    7.18 +        gdprintk(XENLOG_DEBUG, "slow ioreq. type:%d size:%"PRIu64" addr:0x%"
    7.19 +                 PRIx64" dir:%d ptr:%d df:%d count:%"PRIu64"\n",
    7.20 +                 p->type, p->size, p->addr, !!p->dir,
    7.21 +                 !!p->data_is_ptr, !!p->df, p->count);
    7.22          return 0;
    7.23 +    }
    7.24  
    7.25      bp.type = p->type;
    7.26      bp.dir  = p->dir;
    7.27 -    switch (p->size) {
    7.28 +    switch ( p->size )
    7.29 +    {
    7.30      case 1:
    7.31          bp.size = 0;
    7.32          break;
    7.33 @@ -182,8 +189,6 @@ int hvm_buffered_io_send(ioreq_t *p)
    7.34      case 8:
    7.35          bp.size = 3;
    7.36          qw = 1;
    7.37 -        gdprintk(XENLOG_INFO, "quadword ioreq type:%d data:%"PRIx64"\n",
    7.38 -                 p->type, p->data);
    7.39          break;
    7.40      default:
    7.41          gdprintk(XENLOG_WARNING, "unexpected ioreq size:%"PRId64"\n", p->size);
    7.42 @@ -191,11 +196,12 @@ int hvm_buffered_io_send(ioreq_t *p)
    7.43      }
    7.44      
    7.45      bp.data = p->data;
    7.46 -    bp.addr = qw ? ((p->data >> 16) & 0xfffful) : (p->addr & 0xffffful);
    7.47 +    bp.addr = p->addr;
    7.48      
    7.49      spin_lock(&iorp->lock);
    7.50  
    7.51 -    if ( (pg->write_pointer - pg->read_pointer) >= IOREQ_BUFFER_SLOT_NUM - (qw ? 1 : 0))
    7.52 +    if ( (pg->write_pointer - pg->read_pointer) >=
    7.53 +         (IOREQ_BUFFER_SLOT_NUM - qw) )
    7.54      {
    7.55          /* The queue is full: send the iopacket through the normal path. */
    7.56          spin_unlock(&iorp->lock);
    7.57 @@ -205,9 +211,9 @@ int hvm_buffered_io_send(ioreq_t *p)
    7.58      memcpy(&pg->buf_ioreq[pg->write_pointer % IOREQ_BUFFER_SLOT_NUM],
    7.59             &bp, sizeof(bp));
    7.60      
    7.61 -    if (qw) {
    7.62 +    if ( qw )
    7.63 +    {
    7.64          bp.data = p->data >> 32;
    7.65 -        bp.addr = (p->data >> 48) & 0xfffful;
    7.66          memcpy(&pg->buf_ioreq[(pg->write_pointer+1) % IOREQ_BUFFER_SLOT_NUM],
    7.67                 &bp, sizeof(bp));
    7.68      }
    7.69 @@ -215,7 +221,7 @@ int hvm_buffered_io_send(ioreq_t *p)
    7.70      /* Make the ioreq_t visible /before/ write_pointer. */
    7.71      wmb();
    7.72      pg->write_pointer += qw ? 2 : 1;
    7.73 -    
    7.74 +
    7.75      spin_unlock(&iorp->lock);
    7.76      
    7.77      return 1;
     8.1 --- a/xen/arch/x86/hvm/stdvga.c	Thu Nov 01 09:00:27 2007 -0600
     8.2 +++ b/xen/arch/x86/hvm/stdvga.c	Thu Nov 01 09:07:16 2007 -0600
     8.3 @@ -296,6 +296,8 @@ int stdvga_intercept_pio(ioreq_t *p)
     8.4      {
     8.5          if ( p->size != 1 )
     8.6              gdprintk(XENLOG_WARNING, "unexpected io size:%d\n", (int)p->size);
     8.7 +        if ( p->data_is_ptr )
     8.8 +            gdprintk(XENLOG_WARNING, "unexpected data_is_ptr\n");
     8.9          if ( !((p->addr == 0x3c5) && (s->sr_index >= sizeof(sr_mask))) &&
    8.10               !((p->addr == 0x3cf) && (s->gr_index >= sizeof(gr_mask))) )
    8.11          {
    8.12 @@ -643,6 +645,10 @@ int stdvga_intercept_mmio(ioreq_t *p)
    8.13              s->cache = 0;
    8.14          }
    8.15      }
    8.16 +    else
    8.17 +    {
    8.18 +        buf = (p->dir == IOREQ_WRITE);
    8.19 +    }
    8.20  
    8.21      rc = (buf && hvm_buffered_io_send(p));
    8.22  
     9.1 --- a/xen/arch/x86/hvm/svm/svm.c	Thu Nov 01 09:00:27 2007 -0600
     9.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Thu Nov 01 09:07:16 2007 -0600
     9.3 @@ -940,14 +940,7 @@ int start_svm(struct cpuinfo_x86 *c)
     9.4      svm_feature_flags = ((cpuid_eax(0x80000000) >= 0x8000000A) ?
     9.5                           cpuid_edx(0x8000000A) : 0);
     9.6  
     9.7 -#ifdef __x86_64__
     9.8 -    /*
     9.9 -     * Check CPUID for nested paging support. We support NPT only on 64-bit
    9.10 -     * hosts since the phys-to-machine table is in host format. Hence 32-bit
    9.11 -     * Xen could only support guests using NPT with up to a 4GB memory map.
    9.12 -     */
    9.13      svm_function_table.hap_supported = cpu_has_svm_npt;
    9.14 -#endif
    9.15  
    9.16      hvm_enable(&svm_function_table);
    9.17  
    10.1 --- a/xen/arch/x86/hvm/vpt.c	Thu Nov 01 09:00:27 2007 -0600
    10.2 +++ b/xen/arch/x86/hvm/vpt.c	Thu Nov 01 09:07:16 2007 -0600
    10.3 @@ -118,7 +118,14 @@ void pt_restore_timer(struct vcpu *v)
    10.4      list_for_each_entry ( pt, head, list )
    10.5      {
    10.6          if ( !mode_is(v->domain, no_missed_tick_accounting) )
    10.7 +        {
    10.8              pt_process_missed_ticks(pt);
    10.9 +        }
   10.10 +        else if ( (NOW() - pt->scheduled) >= 0 )
   10.11 +        {
   10.12 +            pt->pending_intr_nr++;
   10.13 +            pt->scheduled = NOW() + pt->period;
   10.14 +        }
   10.15          set_timer(&pt->timer, pt->scheduled);
   10.16      }
   10.17  
   10.18 @@ -139,14 +146,7 @@ static void pt_timer_fn(void *data)
   10.19      {
   10.20          pt->scheduled += pt->period;
   10.21          if ( !mode_is(pt->vcpu->domain, no_missed_tick_accounting) )
   10.22 -        {
   10.23              pt_process_missed_ticks(pt);
   10.24 -        }
   10.25 -        else if ( (NOW() - pt->scheduled) >= 0 )
   10.26 -        {
   10.27 -            pt->pending_intr_nr++;
   10.28 -            pt->scheduled = NOW() + pt->period;
   10.29 -        }
   10.30          set_timer(&pt->timer, pt->scheduled);
   10.31      }
   10.32  
    11.1 --- a/xen/arch/x86/mm/p2m.c	Thu Nov 01 09:00:27 2007 -0600
    11.2 +++ b/xen/arch/x86/mm/p2m.c	Thu Nov 01 09:07:16 2007 -0600
    11.3 @@ -219,15 +219,17 @@ set_p2m_entry(struct domain *d, unsigned
    11.4          goto out;
    11.5  #endif
    11.6  #if CONFIG_PAGING_LEVELS >= 3
    11.7 -    // When using PAE Xen, we only allow 33 bits of pseudo-physical
    11.8 -    // address in translated guests (i.e. 8 GBytes).  This restriction
    11.9 -    // comes from wanting to map the P2M table into the 16MB RO_MPT hole
   11.10 -    // in Xen's address space for translated PV guests.
   11.11 -    //
   11.12 +    /*
   11.13 +     * When using PAE Xen, we only allow 33 bits of pseudo-physical
   11.14 +     * address in translated guests (i.e. 8 GBytes).  This restriction
   11.15 +     * comes from wanting to map the P2M table into the 16MB RO_MPT hole
   11.16 +     * in Xen's address space for translated PV guests.
   11.17 +     * When using AMD's NPT on PAE Xen, we are restricted to 4GB.
   11.18 +     */
   11.19      if ( !p2m_next_level(d, &table_mfn, &table, &gfn_remainder, gfn,
   11.20                           L3_PAGETABLE_SHIFT - PAGE_SHIFT,
   11.21 -                         (CONFIG_PAGING_LEVELS == 3
   11.22 -                          ? 8
   11.23 +                         ((CONFIG_PAGING_LEVELS == 3)
   11.24 +                          ? (hvm_funcs.hap_supported ? 4 : 8)
   11.25                            : L3_PAGETABLE_ENTRIES),
   11.26                           PGT_l2_page_table) )
   11.27          goto out;
   11.28 @@ -686,16 +688,26 @@ guest_physmap_remove_page(struct domain 
   11.29      p2m_unlock(d);
   11.30  }
   11.31  
   11.32 -void
   11.33 +int
   11.34  guest_physmap_add_entry(struct domain *d, unsigned long gfn,
   11.35                          unsigned long mfn, p2m_type_t t)
   11.36  {
   11.37      unsigned long ogfn;
   11.38      p2m_type_t ot;
   11.39      mfn_t omfn;
   11.40 +    int rc = 0;
   11.41  
   11.42      if ( !paging_mode_translate(d) )
   11.43 -        return;
   11.44 +        return -EINVAL;
   11.45 +
   11.46 +#if CONFIG_PAGING_LEVELS == 3
   11.47 +    /* 32bit PAE nested paging does not support over 4GB guest due to 
   11.48 +     * hardware translation limit. This limitation is checked by comparing
   11.49 +     * gfn with 0xfffffUL.
   11.50 +     */
   11.51 +    if ( paging_mode_hap(d) && (gfn > 0xfffffUL) )
   11.52 +        return -EINVAL;
   11.53 +#endif
   11.54  
   11.55      p2m_lock(d);
   11.56      audit_p2m(d);
   11.57 @@ -735,18 +747,22 @@ guest_physmap_add_entry(struct domain *d
   11.58  
   11.59      if ( mfn_valid(_mfn(mfn)) ) 
   11.60      {
   11.61 -        set_p2m_entry(d, gfn, _mfn(mfn), t);
   11.62 +        if ( !set_p2m_entry(d, gfn, _mfn(mfn), t) )
   11.63 +            rc = -EINVAL;
   11.64          set_gpfn_from_mfn(mfn, gfn);
   11.65      }
   11.66      else
   11.67      {
   11.68          gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
   11.69                   gfn, mfn);
   11.70 -        set_p2m_entry(d, gfn, _mfn(INVALID_MFN), p2m_invalid);
   11.71 +        if ( !set_p2m_entry(d, gfn, _mfn(INVALID_MFN), p2m_invalid) )
   11.72 +            rc = -EINVAL;
   11.73      }
   11.74  
   11.75      audit_p2m(d);
   11.76      p2m_unlock(d);
   11.77 +
   11.78 +    return rc;
   11.79  }
   11.80  
   11.81  /* Walk the whole p2m table, changing any entries of the old type
    12.1 --- a/xen/common/memory.c	Thu Nov 01 09:00:27 2007 -0600
    12.2 +++ b/xen/common/memory.c	Thu Nov 01 09:07:16 2007 -0600
    12.3 @@ -131,7 +131,8 @@ static void populate_physmap(struct memo
    12.4          if ( unlikely(paging_mode_translate(d)) )
    12.5          {
    12.6              for ( j = 0; j < (1 << a->extent_order); j++ )
    12.7 -                guest_physmap_add_page(d, gpfn + j, mfn + j);
    12.8 +                if ( guest_physmap_add_page(d, gpfn + j, mfn + j) )
    12.9 +                    goto out;
   12.10          }
   12.11          else
   12.12          {
   12.13 @@ -445,8 +446,9 @@ static long memory_exchange(XEN_GUEST_HA
   12.14              mfn = page_to_mfn(page);
   12.15              if ( unlikely(paging_mode_translate(d)) )
   12.16              {
   12.17 +                /* Ignore failure here. There's nothing we can do. */
   12.18                  for ( k = 0; k < (1UL << exch.out.extent_order); k++ )
   12.19 -                    guest_physmap_add_page(d, gpfn + k, mfn + k);
   12.20 +                    (void)guest_physmap_add_page(d, gpfn + k, mfn + k);
   12.21              }
   12.22              else
   12.23              {
    13.1 --- a/xen/include/asm-ia64/grant_table.h	Thu Nov 01 09:00:27 2007 -0600
    13.2 +++ b/xen/include/asm-ia64/grant_table.h	Thu Nov 01 09:07:16 2007 -0600
    13.3 @@ -12,7 +12,7 @@ int create_grant_host_mapping(unsigned l
    13.4  int replace_grant_host_mapping(unsigned long gpaddr, unsigned long mfn, unsigned long new_gpaddr, unsigned int flags);
    13.5  
    13.6  // for grant transfer
    13.7 -void guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
    13.8 +int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
    13.9  
   13.10  /* XXX
   13.11   * somewhere appropriate
    14.1 --- a/xen/include/asm-ia64/shadow.h	Thu Nov 01 09:00:27 2007 -0600
    14.2 +++ b/xen/include/asm-ia64/shadow.h	Thu Nov 01 09:07:16 2007 -0600
    14.3 @@ -40,7 +40,7 @@
    14.4   * Utilities to change relationship of gpfn->mfn for designated domain,
    14.5   * which is required by gnttab transfer, balloon, device model and etc.
    14.6   */
    14.7 -void guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
    14.8 +int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
    14.9  void guest_physmap_remove_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
   14.10  
   14.11  static inline int
    15.1 --- a/xen/include/asm-x86/p2m.h	Thu Nov 01 09:00:27 2007 -0600
    15.2 +++ b/xen/include/asm-x86/p2m.h	Thu Nov 01 09:07:16 2007 -0600
    15.3 @@ -201,14 +201,17 @@ int p2m_alloc_table(struct domain *d,
    15.4  void p2m_teardown(struct domain *d);
    15.5  
    15.6  /* Add a page to a domain's p2m table */
    15.7 -void guest_physmap_add_entry(struct domain *d, unsigned long gfn,
    15.8 +int guest_physmap_add_entry(struct domain *d, unsigned long gfn,
    15.9                               unsigned long mfn, p2m_type_t t);
   15.10  
   15.11 -/* Untyped version for RAM only, for compatibility */
   15.12 -static inline void guest_physmap_add_page(struct domain *d, unsigned long gfn,
   15.13 -                                          unsigned long mfn)
   15.14 +/* Untyped version for RAM only, for compatibility 
   15.15 + *
   15.16 + * Return 0 for success
   15.17 + */
   15.18 +static inline int guest_physmap_add_page(struct domain *d, unsigned long gfn,
   15.19 +                                         unsigned long mfn)
   15.20  {
   15.21 -    guest_physmap_add_entry(d, gfn, mfn, p2m_ram_rw);
   15.22 +    return guest_physmap_add_entry(d, gfn, mfn, p2m_ram_rw);
   15.23  }
   15.24  
   15.25  /* Remove a page from a domain's p2m table */
    16.1 --- a/xen/include/public/hvm/ioreq.h	Thu Nov 01 09:00:27 2007 -0600
    16.2 +++ b/xen/include/public/hvm/ioreq.h	Thu Nov 01 09:07:16 2007 -0600
    16.3 @@ -80,9 +80,9 @@ typedef struct shared_iopage shared_iopa
    16.4  struct buf_ioreq {
    16.5      uint8_t  type;   /*  I/O type                    */
    16.6      uint8_t  dir:1;  /*  1=read, 0=write             */
    16.7 -    uint8_t  size:2; /*  0=>1, 1=>2, 3=>8. If 8 then use two contig buf_ioreqs */
    16.8 -    uint16_t data;   /*  (low order) data            */
    16.9 -    uint32_t addr;   /*  physical address or high-order data */
   16.10 +    uint8_t  size:2; /*  0=>1, 1=>2, 2=>4, 3=>8. If 8, use two buf_ioreqs */
   16.11 +    uint32_t addr:20;/*  physical address            */
   16.12 +    uint32_t data;   /*  data                        */
   16.13  };
   16.14  typedef struct buf_ioreq buf_ioreq_t;
   16.15  
    17.1 --- a/xen/include/xen/paging.h	Thu Nov 01 09:00:27 2007 -0600
    17.2 +++ b/xen/include/xen/paging.h	Thu Nov 01 09:07:16 2007 -0600
    17.3 @@ -18,7 +18,7 @@
    17.4  #else
    17.5  
    17.6  #define paging_mode_translate(d)              (0)
    17.7 -#define guest_physmap_add_page(d, p, m)       ((void)0)
    17.8 +#define guest_physmap_add_page(d, p, m)       (0)
    17.9  #define guest_physmap_remove_page(d, p, m)    ((void)0)
   17.10  
   17.11  #endif