ia64/xen-unstable

changeset 12231:20204db0891b

Merge
author Alastair Tse <atse@xensource.com>
date Thu Nov 02 18:52:04 2006 +0000 (2006-11-02)
parents ec7e7e946496 4c2d9a2ef1b7
children dd62270df2ad
files
line diff
     1.1 --- a/config/SunOS.mk	Thu Nov 02 18:51:23 2006 +0000
     1.2 +++ b/config/SunOS.mk	Thu Nov 02 18:52:04 2006 +0000
     1.3 @@ -21,7 +21,7 @@ LIB64DIR = lib/amd64
     1.4  SOCKET_LIBS = -lsocket
     1.5  CURSES_LIBS = -lcurses
     1.6  SONAME_LDFLAG = -h
     1.7 -SHLIB_CFLAGS = -static-libgcc -shared
     1.8 +SHLIB_CFLAGS = -R /usr/sfw/$(LIBDIR) -shared
     1.9  
    1.10  ifneq ($(debug),y)
    1.11  # Optimisation flags are overridable
     2.1 --- a/linux-2.6-xen-sparse/include/xen/gnttab.h	Thu Nov 02 18:51:23 2006 +0000
     2.2 +++ b/linux-2.6-xen-sparse/include/xen/gnttab.h	Thu Nov 02 18:52:04 2006 +0000
     2.3 @@ -118,7 +118,7 @@ int gnttab_suspend(void);
     2.4  int gnttab_resume(void);
     2.5  
     2.6  static inline void
     2.7 -gnttab_set_map_op(struct gnttab_map_grant_ref *map, unsigned long addr,
     2.8 +gnttab_set_map_op(struct gnttab_map_grant_ref *map, uint64_t addr,
     2.9  		  uint32_t flags, grant_ref_t ref, domid_t domid)
    2.10  {
    2.11  	if (flags & GNTMAP_contains_pte)
    2.12 @@ -134,7 +134,7 @@ gnttab_set_map_op(struct gnttab_map_gran
    2.13  }
    2.14  
    2.15  static inline void
    2.16 -gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, unsigned long addr,
    2.17 +gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, uint64_t addr,
    2.18  		    uint32_t flags, grant_handle_t handle)
    2.19  {
    2.20  	if (flags & GNTMAP_contains_pte)
     3.1 --- a/tools/firmware/vmxassist/setup.c	Thu Nov 02 18:51:23 2006 +0000
     3.2 +++ b/tools/firmware/vmxassist/setup.c	Thu Nov 02 18:52:04 2006 +0000
     3.3 @@ -53,13 +53,10 @@ unsigned pgd[NR_PGD] __attribute__ ((ali
     3.4  struct e820entry e820map[] = {
     3.5  	{ 0x0000000000000000ULL, 0x000000000009F800ULL, E820_RAM },
     3.6  	{ 0x000000000009F800ULL, 0x0000000000000800ULL, E820_RESERVED },
     3.7 -	{ 0x00000000000A0000ULL, 0x0000000000020000ULL, E820_IO },
     3.8  	{ 0x00000000000C0000ULL, 0x0000000000040000ULL, E820_RESERVED },
     3.9  	{ 0x0000000000100000ULL, 0x0000000000000000ULL, E820_RAM },
    3.10 -	{ 0x0000000000000000ULL, 0x0000000000001000ULL, E820_SHARED_PAGE },
    3.11  	{ 0x0000000000000000ULL, 0x0000000000003000ULL, E820_NVS },
    3.12  	{ 0x0000000000003000ULL, 0x000000000000A000ULL, E820_ACPI },
    3.13 -	{ 0x00000000FEC00000ULL, 0x0000000001400000ULL, E820_IO },
    3.14  };
    3.15  #endif /* TEST */
    3.16  
     4.1 --- a/tools/libxc/xc_hvm_build.c	Thu Nov 02 18:51:23 2006 +0000
     4.2 +++ b/tools/libxc/xc_hvm_build.c	Thu Nov 02 18:52:04 2006 +0000
     4.3 @@ -56,11 +56,12 @@ static void build_e820map(void *e820_pag
     4.4      unsigned char nr_map = 0;
     4.5  
     4.6      /*
     4.7 -     * physical address space from HVM_BELOW_4G_RAM_END to 4G is reserved
     4.8 +     * Physical address space from HVM_BELOW_4G_RAM_END to 4G is reserved
     4.9       * for PCI devices MMIO. So if HVM has more than HVM_BELOW_4G_RAM_END
    4.10       * RAM, memory beyond HVM_BELOW_4G_RAM_END will go to 4G above.
    4.11       */
    4.12 -    if ( mem_size > HVM_BELOW_4G_RAM_END ) {
    4.13 +    if ( mem_size > HVM_BELOW_4G_RAM_END )
    4.14 +    {
    4.15          extra_mem_size = mem_size - HVM_BELOW_4G_RAM_END;
    4.16          mem_size = HVM_BELOW_4G_RAM_END;
    4.17      }
    4.18 @@ -75,11 +76,6 @@ static void build_e820map(void *e820_pag
    4.19      e820entry[nr_map].type = E820_RESERVED;
    4.20      nr_map++;
    4.21  
    4.22 -    e820entry[nr_map].addr = 0xA0000;
    4.23 -    e820entry[nr_map].size = 0x20000;
    4.24 -    e820entry[nr_map].type = E820_IO;
    4.25 -    nr_map++;
    4.26 -
    4.27      e820entry[nr_map].addr = 0xEA000;
    4.28      e820entry[nr_map].size = 0x01000;
    4.29      e820entry[nr_map].type = E820_ACPI;
    4.30 @@ -90,54 +86,14 @@ static void build_e820map(void *e820_pag
    4.31      e820entry[nr_map].type = E820_RESERVED;
    4.32      nr_map++;
    4.33  
    4.34 -/* buffered io page.    */
    4.35 -#define BUFFERED_IO_PAGES   1
    4.36 -/* xenstore page.       */
    4.37 -#define XENSTORE_PAGES      1
    4.38 -/* shared io page.      */
    4.39 -#define SHARED_IO_PAGES     1
    4.40 -/* totally 16 static pages are reserved in E820 table */
    4.41 -
    4.42 -    /* Most of the ram goes here */
    4.43 +    /* Low RAM goes here. Remove 3 pages for ioreq, bufioreq, and xenstore. */
    4.44      e820entry[nr_map].addr = 0x100000;
    4.45 -    e820entry[nr_map].size = mem_size - 0x100000 - PAGE_SIZE *
    4.46 -                                                (BUFFERED_IO_PAGES +
    4.47 -                                                 XENSTORE_PAGES +
    4.48 -                                                 SHARED_IO_PAGES);
    4.49 +    e820entry[nr_map].size = mem_size - 0x100000 - PAGE_SIZE * 3;
    4.50      e820entry[nr_map].type = E820_RAM;
    4.51      nr_map++;
    4.52  
    4.53 -    /* Statically allocated special pages */
    4.54 -
    4.55 -    /* For buffered IO requests */
    4.56 -    e820entry[nr_map].addr = mem_size - PAGE_SIZE *
    4.57 -                                        (BUFFERED_IO_PAGES +
    4.58 -                                         XENSTORE_PAGES +
    4.59 -                                         SHARED_IO_PAGES);
    4.60 -    e820entry[nr_map].size = PAGE_SIZE * BUFFERED_IO_PAGES;
    4.61 -    e820entry[nr_map].type = E820_BUFFERED_IO;
    4.62 -    nr_map++;
    4.63 -
    4.64 -    /* For xenstore */
    4.65 -    e820entry[nr_map].addr = mem_size - PAGE_SIZE *
    4.66 -                                        (XENSTORE_PAGES +
    4.67 -                                         SHARED_IO_PAGES);
    4.68 -    e820entry[nr_map].size = PAGE_SIZE * XENSTORE_PAGES;
    4.69 -    e820entry[nr_map].type = E820_XENSTORE;
    4.70 -    nr_map++;
    4.71 -
    4.72 -    /* Shared ioreq_t page */
    4.73 -    e820entry[nr_map].addr = mem_size - PAGE_SIZE * SHARED_IO_PAGES;
    4.74 -    e820entry[nr_map].size = PAGE_SIZE * SHARED_IO_PAGES;
    4.75 -    e820entry[nr_map].type = E820_SHARED_PAGE;
    4.76 -    nr_map++;
    4.77 -
    4.78 -    e820entry[nr_map].addr = 0xFEC00000;
    4.79 -    e820entry[nr_map].size = 0x1400000;
    4.80 -    e820entry[nr_map].type = E820_IO;
    4.81 -    nr_map++;
    4.82 -
    4.83 -    if ( extra_mem_size ) {
    4.84 +    if ( extra_mem_size )
    4.85 +    {
    4.86          e820entry[nr_map].addr = (1ULL << 32);
    4.87          e820entry[nr_map].size = extra_mem_size;
    4.88          e820entry[nr_map].type = E820_RAM;
    4.89 @@ -212,6 +168,7 @@ static int setup_guest(int xc_handle,
    4.90      void *e820_page;
    4.91      struct domain_setup_info dsi;
    4.92      uint64_t v_end;
    4.93 +    int rc;
    4.94  
    4.95      memset(&dsi, 0, sizeof(struct domain_setup_info));
    4.96  
    4.97 @@ -253,13 +210,28 @@ static int setup_guest(int xc_handle,
    4.98      for ( i = HVM_BELOW_4G_RAM_END >> PAGE_SHIFT; i < nr_pages; i++ )
    4.99          page_array[i] += HVM_BELOW_4G_MMIO_LENGTH >> PAGE_SHIFT;
   4.100  
   4.101 -    if ( xc_domain_memory_populate_physmap(xc_handle, dom, nr_pages,
   4.102 -                                           0, 0, page_array) )
   4.103 +    /* Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000. */
   4.104 +    rc = xc_domain_memory_populate_physmap(
   4.105 +        xc_handle, dom, (nr_pages > 0xa0) ? 0xa0 : nr_pages,
   4.106 +        0, 0, &page_array[0x00]);
   4.107 +    if ( (rc == 0) && (nr_pages > 0xc0) )
   4.108 +        rc = xc_domain_memory_populate_physmap(
   4.109 +            xc_handle, dom, nr_pages - 0xc0, 0, 0, &page_array[0xc0]);
   4.110 +    if ( rc != 0 )
   4.111      {
   4.112          PERROR("Could not allocate memory for HVM guest.\n");
   4.113          goto error_out;
   4.114      }
   4.115  
   4.116 +    if ( (nr_pages > 0xa0) &&
   4.117 +         xc_domain_memory_decrease_reservation(
   4.118 +             xc_handle, dom, (nr_pages < 0xc0) ? (nr_pages - 0xa0) : 0x20,
   4.119 +             0, &page_array[0xa0]) )
   4.120 +    {
   4.121 +        PERROR("Could not free VGA hole.\n");
   4.122 +        goto error_out;
   4.123 +    }
   4.124 +
   4.125      if ( xc_domain_translate_gpfn_list(xc_handle, dom, nr_pages,
   4.126                                         page_array, page_array) )
   4.127      {
   4.128 @@ -295,6 +267,8 @@ static int setup_guest(int xc_handle,
   4.129      /* Mask all upcalls... */
   4.130      for ( i = 0; i < MAX_VIRT_CPUS; i++ )
   4.131          shared_info->vcpu_info[i].evtchn_upcall_mask = 1;
   4.132 +    memset(&shared_info->evtchn_mask[0], 0xff,
   4.133 +           sizeof(shared_info->evtchn_mask));
   4.134      munmap(shared_info, PAGE_SIZE);
   4.135  
   4.136      if ( v_end > HVM_BELOW_4G_RAM_END )
   4.137 @@ -302,22 +276,17 @@ static int setup_guest(int xc_handle,
   4.138      else
   4.139          shared_page_nr = (v_end >> PAGE_SHIFT) - 1;
   4.140  
   4.141 -    *store_mfn = page_array[shared_page_nr - 1];
   4.142 -
   4.143 -    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_PFN, shared_page_nr - 1);
   4.144 -    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_EVTCHN, store_evtchn);
   4.145 -
   4.146 -    /* Paranoia */
   4.147 -    /* clean the shared IO requests page */
   4.148 -    if ( xc_clear_domain_page(xc_handle, dom, page_array[shared_page_nr]) )
   4.149 +    /* Paranoia: clean pages. */
   4.150 +    if ( xc_clear_domain_page(xc_handle, dom, page_array[shared_page_nr]) ||
   4.151 +         xc_clear_domain_page(xc_handle, dom, page_array[shared_page_nr-1]) ||
   4.152 +         xc_clear_domain_page(xc_handle, dom, page_array[shared_page_nr-2]) )
   4.153          goto error_out;
   4.154  
   4.155 -    /* clean the buffered IO requests page */
   4.156 -    if ( xc_clear_domain_page(xc_handle, dom, page_array[shared_page_nr - 2]) )
   4.157 -        goto error_out;
   4.158 -
   4.159 -    if ( xc_clear_domain_page(xc_handle, dom, *store_mfn) )
   4.160 -        goto error_out;
   4.161 +    *store_mfn = page_array[shared_page_nr - 1];
   4.162 +    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_PFN, shared_page_nr-1);
   4.163 +    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_EVTCHN, store_evtchn);
   4.164 +    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_BUFIOREQ_PFN, shared_page_nr-2);
   4.165 +    xc_set_hvm_param(xc_handle, dom, HVM_PARAM_IOREQ_PFN, shared_page_nr);
   4.166  
   4.167      free(page_array);
   4.168  
     5.1 --- a/tools/pygrub/setup.py	Thu Nov 02 18:51:23 2006 +0000
     5.2 +++ b/tools/pygrub/setup.py	Thu Nov 02 18:52:04 2006 +0000
     5.3 @@ -3,7 +3,7 @@ from distutils.ccompiler import new_comp
     5.4  import os
     5.5  import sys
     5.6  
     5.7 -extra_compile_args  = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
     5.8 +extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
     5.9  
    5.10  fsys_mods = []
    5.11  fsys_pkgs = []
     6.1 --- a/tools/python/setup.py	Thu Nov 02 18:51:23 2006 +0000
     6.2 +++ b/tools/python/setup.py	Thu Nov 02 18:52:04 2006 +0000
     6.3 @@ -4,8 +4,7 @@ import os
     6.4  
     6.5  XEN_ROOT = "../.."
     6.6  
     6.7 -extra_compile_args  = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
     6.8 -
     6.9 +extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
    6.10  
    6.11  include_dirs = [ XEN_ROOT + "/tools/libxc",
    6.12                   XEN_ROOT + "/tools/xenstore",
     7.1 --- a/xen/arch/x86/domain.c	Thu Nov 02 18:51:23 2006 +0000
     7.2 +++ b/xen/arch/x86/domain.c	Thu Nov 02 18:52:04 2006 +0000
     7.3 @@ -123,20 +123,31 @@ struct vcpu *alloc_vcpu_struct(struct do
     7.4  
     7.5      memset(v, 0, sizeof(*v));
     7.6  
     7.7 +    v->vcpu_id = vcpu_id;
     7.8 +    v->domain  = d;
     7.9 +
    7.10      v->arch.flags = TF_kernel_mode;
    7.11  
    7.12 -    if ( is_idle_domain(d) )
    7.13 +    if ( is_hvm_domain(d) )
    7.14      {
    7.15 -        v->arch.schedule_tail = continue_idle_domain;
    7.16 -        v->arch.cr3           = __pa(idle_pg_table);
    7.17 +        if ( hvm_vcpu_initialise(v) != 0 )
    7.18 +        {
    7.19 +            xfree(v);
    7.20 +            return NULL;
    7.21 +        }
    7.22      }
    7.23      else
    7.24      {
    7.25          v->arch.schedule_tail = continue_nonidle_domain;
    7.26 -    }
    7.27 +        v->arch.ctxt_switch_from = paravirt_ctxt_switch_from;
    7.28 +        v->arch.ctxt_switch_to   = paravirt_ctxt_switch_to;
    7.29  
    7.30 -    v->arch.ctxt_switch_from = paravirt_ctxt_switch_from;
    7.31 -    v->arch.ctxt_switch_to   = paravirt_ctxt_switch_to;
    7.32 +        if ( is_idle_domain(d) )
    7.33 +        {
    7.34 +            v->arch.schedule_tail = continue_idle_domain;
    7.35 +            v->arch.cr3           = __pa(idle_pg_table);
    7.36 +        }
    7.37 +    }
    7.38  
    7.39      v->arch.perdomain_ptes =
    7.40          d->arch.mm_perdomain_pt + (vcpu_id << GDT_LDT_VCPU_SHIFT);
    7.41 @@ -335,22 +346,11 @@ int arch_set_info_guest(
    7.42  
    7.43      if ( !is_hvm_vcpu(v) )
    7.44      {
    7.45 -        cr3_pfn = gmfn_to_mfn(d, xen_cr3_to_pfn(c->ctrlreg[3]));
    7.46 -        v->arch.guest_table = pagetable_from_pfn(cr3_pfn);
    7.47 -    }
    7.48 -
    7.49 -    if ( (rc = (int)set_gdt(v, c->gdt_frames, c->gdt_ents)) != 0 )
    7.50 -        return rc;
    7.51 +        if ( (rc = (int)set_gdt(v, c->gdt_frames, c->gdt_ents)) != 0 )
    7.52 +            return rc;
    7.53  
    7.54 -    if ( is_hvm_vcpu(v) )
    7.55 -    {
    7.56 -        v->arch.guest_table = pagetable_null();
    7.57 +        cr3_pfn = gmfn_to_mfn(d, xen_cr3_to_pfn(c->ctrlreg[3]));
    7.58  
    7.59 -        if ( !hvm_initialize_guest_resources(v) )
    7.60 -            return -EINVAL;
    7.61 -    }
    7.62 -    else
    7.63 -    {
    7.64          if ( shadow_mode_refcounts(d)
    7.65               ? !get_page(mfn_to_page(cr3_pfn), d)
    7.66               : !get_page_and_type(mfn_to_page(cr3_pfn), d,
    7.67 @@ -359,6 +359,8 @@ int arch_set_info_guest(
    7.68              destroy_gdt(v);
    7.69              return -EINVAL;
    7.70          }
    7.71 +
    7.72 +        v->arch.guest_table = pagetable_from_pfn(cr3_pfn);
    7.73      }    
    7.74  
    7.75      /* Shadow: make sure the domain has enough shadow memory to
     8.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Nov 02 18:51:23 2006 +0000
     8.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Nov 02 18:52:04 2006 +0000
     8.3 @@ -57,150 +57,14 @@ integer_param("hvm_debug", opt_hvm_debug
     8.4  
     8.5  struct hvm_function_table hvm_funcs;
     8.6  
     8.7 -static void hvm_zap_mmio_range(
     8.8 -    struct domain *d, unsigned long pfn, unsigned long nr_pfn)
     8.9 -{
    8.10 -    unsigned long i;
    8.11 -
    8.12 -    ASSERT(d == current->domain);
    8.13 -
    8.14 -    for ( i = 0; i < nr_pfn; i++ )
    8.15 -    {
    8.16 -        if ( pfn + i >= 0xfffff )
    8.17 -            break;
    8.18 -
    8.19 -        if ( VALID_MFN(gmfn_to_mfn(d, pfn + i)) )
    8.20 -            guest_remove_page(d, pfn + i);
    8.21 -    }
    8.22 -}
    8.23 -
    8.24 -static void e820_zap_iommu_callback(struct domain *d,
    8.25 -                                    struct e820entry *e,
    8.26 -                                    void *ign)
    8.27 -{
    8.28 -    if ( e->type == E820_IO )
    8.29 -        hvm_zap_mmio_range(d, e->addr >> PAGE_SHIFT, e->size >> PAGE_SHIFT);
    8.30 -}
    8.31 -
    8.32 -static void e820_foreach(struct domain *d,
    8.33 -                         void (*cb)(struct domain *d,
    8.34 -                                    struct e820entry *e,
    8.35 -                                    void *data),
    8.36 -                         void *data)
    8.37 -{
    8.38 -    int i;
    8.39 -    unsigned char e820_map_nr;
    8.40 -    struct e820entry *e820entry;
    8.41 -    unsigned char *p;
    8.42 -    unsigned long mfn;
    8.43 -
    8.44 -    mfn = gmfn_to_mfn(d, E820_MAP_PAGE >> PAGE_SHIFT);
    8.45 -    if ( mfn == INVALID_MFN )
    8.46 -    {
    8.47 -        printk("Can not find E820 memory map page for HVM domain.\n");
    8.48 -        domain_crash_synchronous();
    8.49 -    }
    8.50 -
    8.51 -    p = map_domain_page(mfn);
    8.52 -    if ( p == NULL )
    8.53 -    {
    8.54 -        printk("Can not map E820 memory map page for HVM domain.\n");
    8.55 -        domain_crash_synchronous();
    8.56 -    }
    8.57 -
    8.58 -    e820_map_nr = *(p + E820_MAP_NR_OFFSET);
    8.59 -    e820entry = (struct e820entry *)(p + E820_MAP_OFFSET);
    8.60 -
    8.61 -    for ( i = 0; i < e820_map_nr; i++ )
    8.62 -        cb(d, e820entry + i, data);
    8.63 -
    8.64 -    unmap_domain_page(p);
    8.65 -}
    8.66 -
    8.67 -static void hvm_zap_iommu_pages(struct domain *d)
    8.68 -{
    8.69 -    e820_foreach(d, e820_zap_iommu_callback, NULL);
    8.70 -}
    8.71 -
    8.72 -static void e820_map_io_shared_callback(struct domain *d,
    8.73 -                                        struct e820entry *e,
    8.74 -                                        void *data)
    8.75 +void hvm_create_event_channel(struct vcpu *v)
    8.76  {
    8.77 -    unsigned long *mfn = data;
    8.78 -    if ( e->type == E820_SHARED_PAGE )
    8.79 -    {
    8.80 -        ASSERT(*mfn == INVALID_MFN);
    8.81 -        *mfn = gmfn_to_mfn(d, e->addr >> PAGE_SHIFT);
    8.82 -    }
    8.83 -}
    8.84 -
    8.85 -static void e820_map_buffered_io_callback(struct domain *d,
    8.86 -                                          struct e820entry *e,
    8.87 -                                          void *data)
    8.88 -{
    8.89 -    unsigned long *mfn = data;
    8.90 -    if ( e->type == E820_BUFFERED_IO ) {
    8.91 -        ASSERT(*mfn == INVALID_MFN);
    8.92 -        *mfn = gmfn_to_mfn(d, e->addr >> PAGE_SHIFT);
    8.93 -    }
    8.94 +    v->arch.hvm_vcpu.xen_port = alloc_unbound_xen_event_channel(v, 0);
    8.95 +    if ( get_sp(v->domain) && get_vio(v->domain, v->vcpu_id) )
    8.96 +        get_vio(v->domain, v->vcpu_id)->vp_eport =
    8.97 +            v->arch.hvm_vcpu.xen_port;
    8.98  }
    8.99  
   8.100 -void hvm_map_io_shared_pages(struct vcpu *v)
   8.101 -{
   8.102 -    unsigned long mfn;
   8.103 -    void *p;
   8.104 -    struct domain *d = v->domain;
   8.105 -
   8.106 -    if ( d->arch.hvm_domain.shared_page_va ||
   8.107 -         d->arch.hvm_domain.buffered_io_va )
   8.108 -        return;
   8.109 -
   8.110 -    mfn = INVALID_MFN;
   8.111 -    e820_foreach(d, e820_map_io_shared_callback, &mfn);
   8.112 -
   8.113 -    if ( mfn == INVALID_MFN )
   8.114 -    {
   8.115 -        printk("Can not find io request shared page for HVM domain.\n");
   8.116 -        domain_crash_synchronous();
   8.117 -    }
   8.118 -
   8.119 -    p = map_domain_page_global(mfn);
   8.120 -    if ( p == NULL )
   8.121 -    {
   8.122 -        printk("Can not map io request shared page for HVM domain.\n");
   8.123 -        domain_crash_synchronous();
   8.124 -    }
   8.125 -
   8.126 -    d->arch.hvm_domain.shared_page_va = (unsigned long)p;
   8.127 -
   8.128 -    mfn = INVALID_MFN;
   8.129 -    e820_foreach(d, e820_map_buffered_io_callback, &mfn);
   8.130 -    if ( mfn != INVALID_MFN ) {
   8.131 -        p = map_domain_page_global(mfn);
   8.132 -        if ( p )
   8.133 -            d->arch.hvm_domain.buffered_io_va = (unsigned long)p;
   8.134 -    }
   8.135 -}
   8.136 -
   8.137 -void hvm_create_event_channels(struct vcpu *v)
   8.138 -{
   8.139 -    vcpu_iodata_t *p;
   8.140 -    struct vcpu *o;
   8.141 -
   8.142 -    if ( v->vcpu_id == 0 ) {
   8.143 -        /* Ugly: create event channels for every vcpu when vcpu 0
   8.144 -           starts, so that they're available for ioemu to bind to. */
   8.145 -        for_each_vcpu(v->domain, o) {
   8.146 -            p = get_vio(v->domain, o->vcpu_id);
   8.147 -            o->arch.hvm_vcpu.xen_port = p->vp_eport =
   8.148 -                alloc_unbound_xen_event_channel(o, 0);
   8.149 -            dprintk(XENLOG_INFO, "Allocated port %d for hvm.\n",
   8.150 -                    o->arch.hvm_vcpu.xen_port);
   8.151 -        }
   8.152 -    }
   8.153 -}
   8.154 -
   8.155 -
   8.156  void hvm_stts(struct vcpu *v)
   8.157  {
   8.158      /* FPU state already dirty? Then no need to setup_fpu() lazily. */
   8.159 @@ -268,8 +132,6 @@ void hvm_setup_platform(struct domain *d
   8.160      if ( !is_hvm_domain(d) || (v->vcpu_id != 0) )
   8.161          return;
   8.162  
   8.163 -    hvm_zap_iommu_pages(d);
   8.164 -
   8.165      platform = &d->arch.hvm_domain;
   8.166      pic_init(&platform->vpic, pic_irq_request, &platform->interrupt_request);
   8.167      register_pic_io_hook();
   8.168 @@ -689,6 +551,9 @@ long do_hvm_op(unsigned long op, XEN_GUE
   8.169      {
   8.170          struct xen_hvm_param a;
   8.171          struct domain *d;
   8.172 +        struct vcpu *v;
   8.173 +        unsigned long mfn;
   8.174 +        void *p;
   8.175  
   8.176          if ( copy_from_guest(&a, arg, 1) )
   8.177              return -EFAULT;
   8.178 @@ -712,8 +577,41 @@ long do_hvm_op(unsigned long op, XEN_GUE
   8.179              return -EPERM;
   8.180          }
   8.181  
   8.182 +        rc = -EINVAL;
   8.183 +        if ( !is_hvm_domain(d) )
   8.184 +            goto param_fail;
   8.185 +
   8.186          if ( op == HVMOP_set_param )
   8.187          {
   8.188 +            switch ( a.index )
   8.189 +            {
   8.190 +            case HVM_PARAM_IOREQ_PFN:
   8.191 +                if ( d->arch.hvm_domain.shared_page_va )
   8.192 +                    goto param_fail;
   8.193 +                mfn = gmfn_to_mfn(d, a.value);
   8.194 +                if ( mfn == INVALID_MFN )
   8.195 +                    goto param_fail;
   8.196 +                p = map_domain_page_global(mfn);
   8.197 +                if ( p == NULL )
   8.198 +                    goto param_fail;
   8.199 +                d->arch.hvm_domain.shared_page_va = (unsigned long)p;
   8.200 +                /* Initialise evtchn port info if VCPUs already created. */
   8.201 +                for_each_vcpu ( d, v )
   8.202 +                    get_vio(d, v->vcpu_id)->vp_eport =
   8.203 +                    v->arch.hvm_vcpu.xen_port;
   8.204 +                break;
   8.205 +            case HVM_PARAM_BUFIOREQ_PFN:
   8.206 +                if ( d->arch.hvm_domain.buffered_io_va )
   8.207 +                    goto param_fail;
   8.208 +                mfn = gmfn_to_mfn(d, a.value);
   8.209 +                if ( mfn == INVALID_MFN )
   8.210 +                    goto param_fail;
   8.211 +                p = map_domain_page_global(mfn);
   8.212 +                if ( p == NULL )
   8.213 +                    goto param_fail;
   8.214 +                d->arch.hvm_domain.buffered_io_va = (unsigned long)p;
   8.215 +                break;
   8.216 +            }
   8.217              d->arch.hvm_domain.params[a.index] = a.value;
   8.218              rc = 0;
   8.219          }
   8.220 @@ -723,6 +621,7 @@ long do_hvm_op(unsigned long op, XEN_GUE
   8.221              rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
   8.222          }
   8.223  
   8.224 +    param_fail:
   8.225          put_domain(d);
   8.226          break;
   8.227      }
     9.1 --- a/xen/arch/x86/hvm/svm/svm.c	Thu Nov 02 18:51:23 2006 +0000
     9.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Thu Nov 02 18:52:04 2006 +0000
     9.3 @@ -789,41 +789,14 @@ static void svm_ctxt_switch_to(struct vc
     9.4      svm_restore_dr(v);
     9.5  }
     9.6  
     9.7 -
     9.8 -static void svm_final_setup_guest(struct vcpu *v)
     9.9 +static int svm_vcpu_initialise(struct vcpu *v)
    9.10  {
    9.11 -    struct domain *d = v->domain;
    9.12 -
    9.13      v->arch.schedule_tail    = arch_svm_do_launch;
    9.14      v->arch.ctxt_switch_from = svm_ctxt_switch_from;
    9.15      v->arch.ctxt_switch_to   = svm_ctxt_switch_to;
    9.16 -
    9.17 -    if ( v != d->vcpu[0] )
    9.18 -        return;
    9.19 -
    9.20 -    if ( !shadow_mode_external(d) )
    9.21 -    {
    9.22 -        gdprintk(XENLOG_ERR, "Can't init HVM for dom %u vcpu %u: "
    9.23 -                "not in shadow external mode\n", d->domain_id, v->vcpu_id);
    9.24 -        domain_crash(d);
    9.25 -    }
    9.26 -
    9.27 -    /* 
    9.28 -     * Required to do this once per domain
    9.29 -     * TODO: add a seperate function to do these.
    9.30 -     */
    9.31 -    memset(&d->shared_info->evtchn_mask[0], 0xff, 
    9.32 -           sizeof(d->shared_info->evtchn_mask));       
    9.33 +    return 0;
    9.34  }
    9.35  
    9.36 -
    9.37 -static int svm_initialize_guest_resources(struct vcpu *v)
    9.38 -{
    9.39 -    svm_final_setup_guest(v);
    9.40 -    return 1;
    9.41 -}
    9.42 -
    9.43 -
    9.44  int start_svm(void)
    9.45  {
    9.46      u32 eax, ecx, edx;
    9.47 @@ -871,7 +844,7 @@ int start_svm(void)
    9.48      /* Setup HVM interfaces */
    9.49      hvm_funcs.disable = stop_svm;
    9.50  
    9.51 -    hvm_funcs.initialize_guest_resources = svm_initialize_guest_resources;
    9.52 +    hvm_funcs.vcpu_initialise = svm_vcpu_initialise;
    9.53      hvm_funcs.relinquish_guest_resources = svm_relinquish_guest_resources;
    9.54  
    9.55      hvm_funcs.store_cpu_guest_regs = svm_store_cpu_guest_regs;
    10.1 --- a/xen/arch/x86/hvm/vmx/vmcs.c	Thu Nov 02 18:51:23 2006 +0000
    10.2 +++ b/xen/arch/x86/hvm/vmx/vmcs.c	Thu Nov 02 18:52:04 2006 +0000
    10.3 @@ -56,7 +56,7 @@
    10.4        CPU_BASED_INVDPG_EXITING |                        \
    10.5        CPU_BASED_MWAIT_EXITING |                         \
    10.6        CPU_BASED_MOV_DR_EXITING |                        \
    10.7 -      CPU_BASED_ACTIVATE_IO_BITMAP |                    \
    10.8 +      CPU_BASED_UNCOND_IO_EXITING |                     \
    10.9        CPU_BASED_USE_TSC_OFFSETING )
   10.10  
   10.11  /* Basic flags for VM-Exit controls. */
   10.12 @@ -240,22 +240,9 @@ static inline int construct_vmcs_control
   10.13      int error = 0;
   10.14  
   10.15      error |= __vmwrite(PIN_BASED_VM_EXEC_CONTROL, vmx_pin_based_exec_control);
   10.16 -
   10.17      error |= __vmwrite(VM_EXIT_CONTROLS, vmx_vmexit_control);
   10.18 -
   10.19      error |= __vmwrite(VM_ENTRY_CONTROLS, vmx_vmentry_control);
   10.20  
   10.21 -    error |= __vmwrite(IO_BITMAP_A, virt_to_maddr(arch_vmx->io_bitmap_a));
   10.22 -    error |= __vmwrite(IO_BITMAP_B, virt_to_maddr(arch_vmx->io_bitmap_b));
   10.23 -
   10.24 -#ifdef CONFIG_X86_PAE
   10.25 -    /* On PAE bitmaps may in future be above 4GB. Write high words. */
   10.26 -    error |= __vmwrite(IO_BITMAP_A_HIGH,
   10.27 -                       (paddr_t)virt_to_maddr(arch_vmx->io_bitmap_a) >> 32);
   10.28 -    error |= __vmwrite(IO_BITMAP_B_HIGH,
   10.29 -                       (paddr_t)virt_to_maddr(arch_vmx->io_bitmap_b) >> 32);
   10.30 -#endif
   10.31 -
   10.32      return error;
   10.33  }
   10.34  
   10.35 @@ -589,12 +576,6 @@ void vmx_destroy_vmcs(struct vcpu *v)
   10.36  
   10.37      vmx_clear_vmcs(v);
   10.38  
   10.39 -    free_xenheap_pages(arch_vmx->io_bitmap_a, IO_BITMAP_ORDER);
   10.40 -    free_xenheap_pages(arch_vmx->io_bitmap_b, IO_BITMAP_ORDER);
   10.41 -
   10.42 -    arch_vmx->io_bitmap_a = NULL;
   10.43 -    arch_vmx->io_bitmap_b = NULL;
   10.44 -
   10.45      vmx_free_vmcs(arch_vmx->vmcs);
   10.46      arch_vmx->vmcs = NULL;
   10.47  }
    11.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Thu Nov 02 18:51:23 2006 +0000
    11.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Nov 02 18:52:04 2006 +0000
    11.3 @@ -53,77 +53,25 @@ static DEFINE_PER_CPU(unsigned long, tra
    11.4  static void vmx_ctxt_switch_from(struct vcpu *v);
    11.5  static void vmx_ctxt_switch_to(struct vcpu *v);
    11.6  
    11.7 -static int vmx_initialize_guest_resources(struct vcpu *v)
    11.8 +static int vmx_vcpu_initialise(struct vcpu *v)
    11.9  {
   11.10 -    struct domain *d = v->domain;
   11.11 -    struct vcpu *vc;
   11.12 -    void *io_bitmap_a, *io_bitmap_b;
   11.13      int rc;
   11.14  
   11.15      v->arch.schedule_tail    = arch_vmx_do_launch;
   11.16      v->arch.ctxt_switch_from = vmx_ctxt_switch_from;
   11.17      v->arch.ctxt_switch_to   = vmx_ctxt_switch_to;
   11.18  
   11.19 -    if ( v->vcpu_id != 0 )
   11.20 -        return 1;
   11.21 -
   11.22 -    if ( !shadow_mode_external(d) )
   11.23 +    if ( (rc = vmx_create_vmcs(v)) != 0 )
   11.24      {
   11.25 -        dprintk(XENLOG_ERR, "Can't init HVM for dom %u vcpu %u: "
   11.26 -                "not in shadow external mode\n", 
   11.27 -                d->domain_id, v->vcpu_id);
   11.28 -        domain_crash(d);
   11.29 +        dprintk(XENLOG_WARNING,
   11.30 +                "Failed to create VMCS for vcpu %d: err=%d.\n",
   11.31 +                v->vcpu_id, rc);
   11.32 +        return rc;
   11.33      }
   11.34  
   11.35 -    for_each_vcpu ( d, vc )
   11.36 -    {
   11.37 -        memset(&vc->arch.hvm_vmx, 0, sizeof(struct arch_vmx_struct));
   11.38 -
   11.39 -        if ( (rc = vmx_create_vmcs(vc)) != 0 )
   11.40 -        {
   11.41 -            dprintk(XENLOG_WARNING,
   11.42 -                    "Failed to create VMCS for vcpu %d: err=%d.\n",
   11.43 -                    vc->vcpu_id, rc);
   11.44 -            return 0;
   11.45 -        }
   11.46 -
   11.47 -        spin_lock_init(&vc->arch.hvm_vmx.vmcs_lock);
   11.48 -
   11.49 -        if ( (io_bitmap_a = alloc_xenheap_pages(IO_BITMAP_ORDER)) == NULL )
   11.50 -        {
   11.51 -            dprintk(XENLOG_WARNING,
   11.52 -                   "Failed to allocate io bitmap b for vcpu %d.\n",
   11.53 -                    vc->vcpu_id);
   11.54 -            return 0;
   11.55 -        }
   11.56 +    spin_lock_init(&v->arch.hvm_vmx.vmcs_lock);
   11.57  
   11.58 -        if ( (io_bitmap_b = alloc_xenheap_pages(IO_BITMAP_ORDER)) == NULL )
   11.59 -        {
   11.60 -            dprintk(XENLOG_WARNING,
   11.61 -                    "Failed to allocate io bitmap b for vcpu %d.\n",
   11.62 -                    vc->vcpu_id);
   11.63 -            return 0;
   11.64 -        }
   11.65 -
   11.66 -        memset(io_bitmap_a, 0xff, 0x1000);
   11.67 -        memset(io_bitmap_b, 0xff, 0x1000);
   11.68 -
   11.69 -        /* don't bother debug port access */
   11.70 -        clear_bit(PC_DEBUG_PORT, io_bitmap_a);
   11.71 -
   11.72 -        vc->arch.hvm_vmx.io_bitmap_a = io_bitmap_a;
   11.73 -        vc->arch.hvm_vmx.io_bitmap_b = io_bitmap_b;
   11.74 -
   11.75 -    }
   11.76 -
   11.77 -    /*
   11.78 -     * Required to do this once per domain XXX todo: add a seperate function 
   11.79 -     * to do these.
   11.80 -     */
   11.81 -    memset(&d->shared_info->evtchn_mask[0], 0xff,
   11.82 -           sizeof(d->shared_info->evtchn_mask));
   11.83 -
   11.84 -    return 1;
   11.85 +    return 0;
   11.86  }
   11.87  
   11.88  static void vmx_relinquish_guest_resources(struct domain *d)
   11.89 @@ -747,7 +695,7 @@ static void vmx_setup_hvm_funcs(void)
   11.90  
   11.91      hvm_funcs.disable = stop_vmx;
   11.92  
   11.93 -    hvm_funcs.initialize_guest_resources = vmx_initialize_guest_resources;
   11.94 +    hvm_funcs.vcpu_initialise = vmx_vcpu_initialise;
   11.95      hvm_funcs.relinquish_guest_resources = vmx_relinquish_guest_resources;
   11.96  
   11.97      hvm_funcs.store_cpu_guest_regs = vmx_store_cpu_guest_regs;
    12.1 --- a/xen/arch/x86/mm.c	Thu Nov 02 18:51:23 2006 +0000
    12.2 +++ b/xen/arch/x86/mm.c	Thu Nov 02 18:52:04 2006 +0000
    12.3 @@ -2379,7 +2379,7 @@ int do_mmu_update(
    12.4  
    12.5  
    12.6  static int create_grant_pte_mapping(
    12.7 -    unsigned long pte_addr, l1_pgentry_t nl1e, struct vcpu *v)
    12.8 +    uint64_t pte_addr, l1_pgentry_t nl1e, struct vcpu *v)
    12.9  {
   12.10      int rc = GNTST_okay;
   12.11      void *va;
   12.12 @@ -2403,7 +2403,7 @@ static int create_grant_pte_mapping(
   12.13      }
   12.14      
   12.15      va = map_domain_page(mfn);
   12.16 -    va = (void *)((unsigned long)va + (pte_addr & ~PAGE_MASK));
   12.17 +    va = (void *)((unsigned long)va + ((unsigned long)pte_addr & ~PAGE_MASK));
   12.18      page = mfn_to_page(mfn);
   12.19  
   12.20      type = page->u.inuse.type_info & PGT_type_mask;
   12.21 @@ -2435,7 +2435,7 @@ static int create_grant_pte_mapping(
   12.22  }
   12.23  
   12.24  static int destroy_grant_pte_mapping(
   12.25 -    unsigned long addr, unsigned long frame, struct domain *d)
   12.26 +    uint64_t addr, unsigned long frame, struct domain *d)
   12.27  {
   12.28      int rc = GNTST_okay;
   12.29      void *va;
   12.30 @@ -2454,7 +2454,7 @@ static int destroy_grant_pte_mapping(
   12.31      }
   12.32      
   12.33      va = map_domain_page(mfn);
   12.34 -    va = (void *)((unsigned long)va + (addr & ~PAGE_MASK));
   12.35 +    va = (void *)((unsigned long)va + ((unsigned long)addr & ~PAGE_MASK));
   12.36      page = mfn_to_page(mfn);
   12.37  
   12.38      type = page->u.inuse.type_info & PGT_type_mask;
   12.39 @@ -2475,7 +2475,7 @@ static int destroy_grant_pte_mapping(
   12.40      /* Check that the virtual address supplied is actually mapped to frame. */
   12.41      if ( unlikely((l1e_get_intpte(ol1e) >> PAGE_SHIFT) != frame) )
   12.42      {
   12.43 -        MEM_LOG("PTE entry %lx for address %lx doesn't match frame %lx",
   12.44 +        MEM_LOG("PTE entry %lx for address %"PRIx64" doesn't match frame %lx",
   12.45                  (unsigned long)l1e_get_intpte(ol1e), addr, frame);
   12.46          put_page_type(page);
   12.47          rc = GNTST_general_error;
   12.48 @@ -2575,7 +2575,7 @@ static int destroy_grant_va_mapping(
   12.49  }
   12.50  
   12.51  int create_grant_host_mapping(
   12.52 -    unsigned long addr, unsigned long frame, unsigned int flags)
   12.53 +    uint64_t addr, unsigned long frame, unsigned int flags)
   12.54  {
   12.55      l1_pgentry_t pte = l1e_from_pfn(frame, GRANT_PTE_FLAGS);
   12.56  
   12.57 @@ -2590,7 +2590,7 @@ int create_grant_host_mapping(
   12.58  }
   12.59  
   12.60  int destroy_grant_host_mapping(
   12.61 -    unsigned long addr, unsigned long frame, unsigned int flags)
   12.62 +    uint64_t addr, unsigned long frame, unsigned int flags)
   12.63  {
   12.64      if ( flags & GNTMAP_contains_pte )
   12.65          return destroy_grant_pte_mapping(addr, frame, current->domain);
    13.1 --- a/xen/arch/x86/setup.c	Thu Nov 02 18:51:23 2006 +0000
    13.2 +++ b/xen/arch/x86/setup.c	Thu Nov 02 18:52:04 2006 +0000
    13.3 @@ -363,7 +363,7 @@ void __init __start_xen(multiboot_info_t
    13.4              e820_raw[e820_raw_nr].size = 
    13.5                  ((u64)map->length_high << 32) | (u64)map->length_low;
    13.6              e820_raw[e820_raw_nr].type = 
    13.7 -                (map->type > E820_SHARED_PAGE) ? E820_RESERVED : map->type;
    13.8 +                (map->type > E820_NVS) ? E820_RESERVED : map->type;
    13.9              e820_raw_nr++;
   13.10  
   13.11              bytes += map->size + 4;
    14.1 --- a/xen/include/asm-x86/grant_table.h	Thu Nov 02 18:51:23 2006 +0000
    14.2 +++ b/xen/include/asm-x86/grant_table.h	Thu Nov 02 18:52:04 2006 +0000
    14.3 @@ -14,9 +14,9 @@
    14.4   * must hold a reference to the page.
    14.5   */
    14.6  int create_grant_host_mapping(
    14.7 -    unsigned long addr, unsigned long frame, unsigned int flags);
    14.8 +    uint64_t addr, unsigned long frame, unsigned int flags);
    14.9  int destroy_grant_host_mapping(
   14.10 -    unsigned long addr, unsigned long frame, unsigned int flags);
   14.11 +    uint64_t addr, unsigned long frame, unsigned int flags);
   14.12  
   14.13  #define gnttab_create_shared_page(d, t, i)                               \
   14.14      do {                                                                 \
    15.1 --- a/xen/include/asm-x86/hvm/hvm.h	Thu Nov 02 18:51:23 2006 +0000
    15.2 +++ b/xen/include/asm-x86/hvm/hvm.h	Thu Nov 02 18:52:04 2006 +0000
    15.3 @@ -35,7 +35,7 @@ struct hvm_function_table {
    15.4      /*
    15.5       * Initialize/relinguish HVM guest resources
    15.6       */
    15.7 -    int  (*initialize_guest_resources)(struct vcpu *v);
    15.8 +    int  (*vcpu_initialise)(struct vcpu *v);
    15.9      void (*relinquish_guest_resources)(struct domain *d);
   15.10  
   15.11      /*
   15.12 @@ -91,27 +91,21 @@ hvm_disable(void)
   15.13          hvm_funcs.disable();
   15.14  }
   15.15  
   15.16 -void hvm_create_event_channels(struct vcpu *v);
   15.17 -void hvm_map_io_shared_pages(struct vcpu *v);
   15.18 +void hvm_create_event_channel(struct vcpu *v);
   15.19  
   15.20  static inline int
   15.21 -hvm_initialize_guest_resources(struct vcpu *v)
   15.22 +hvm_vcpu_initialise(struct vcpu *v)
   15.23  {
   15.24 -    int ret = 1;
   15.25 -    if ( hvm_funcs.initialize_guest_resources )
   15.26 -        ret = hvm_funcs.initialize_guest_resources(v);
   15.27 -    if ( ret == 1 ) {
   15.28 -        hvm_map_io_shared_pages(v);
   15.29 -        hvm_create_event_channels(v);
   15.30 -    }
   15.31 -    return ret;
   15.32 +    int rc;
   15.33 +    if ( (rc = hvm_funcs.vcpu_initialise(v)) == 0 )
   15.34 +        hvm_create_event_channel(v);
   15.35 +    return rc;
   15.36  }
   15.37  
   15.38  static inline void
   15.39  hvm_relinquish_guest_resources(struct domain *d)
   15.40  {
   15.41 -    if (hvm_funcs.relinquish_guest_resources)
   15.42 -        hvm_funcs.relinquish_guest_resources(d);
   15.43 +    hvm_funcs.relinquish_guest_resources(d);
   15.44  }
   15.45  
   15.46  static inline void
    16.1 --- a/xen/include/asm-x86/hvm/vmx/vmcs.h	Thu Nov 02 18:51:23 2006 +0000
    16.2 +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h	Thu Nov 02 18:52:04 2006 +0000
    16.3 @@ -50,10 +50,6 @@ struct vmx_msr_state {
    16.4      unsigned long shadow_gs;
    16.5  };
    16.6  
    16.7 -/* io bitmap is 4KBytes in size */
    16.8 -#define IO_BITMAP_SIZE      0x1000
    16.9 -#define IO_BITMAP_ORDER     (get_order_from_bytes(IO_BITMAP_SIZE))
   16.10 -
   16.11  struct arch_vmx_struct {
   16.12      /* Virtual address of VMCS. */
   16.13      struct vmcs_struct  *vmcs;
   16.14 @@ -82,7 +78,6 @@ struct arch_vmx_struct {
   16.15      unsigned long        cpu_cr3;
   16.16      unsigned long        cpu_based_exec_control;
   16.17      struct vmx_msr_state msr_content;
   16.18 -    void                *io_bitmap_a, *io_bitmap_b;
   16.19      unsigned long        vmxassist_enabled:1; 
   16.20  };
   16.21  
    17.1 --- a/xen/include/public/hvm/e820.h	Thu Nov 02 18:51:23 2006 +0000
    17.2 +++ b/xen/include/public/hvm/e820.h	Thu Nov 02 18:52:04 2006 +0000
    17.3 @@ -7,12 +7,6 @@
    17.4  #define E820_ACPI         3
    17.5  #define E820_NVS          4
    17.6  
    17.7 -/* Xen HVM extended E820 types. */
    17.8 -#define E820_IO          16
    17.9 -#define E820_SHARED_PAGE 17
   17.10 -#define E820_XENSTORE    18
   17.11 -#define E820_BUFFERED_IO 19
   17.12 -
   17.13  /* E820 location in HVM virtual address space. */
   17.14  #define E820_MAP_PAGE        0x00090000
   17.15  #define E820_MAP_NR_OFFSET   0x000001E8
    18.1 --- a/xen/include/public/hvm/params.h	Thu Nov 02 18:51:23 2006 +0000
    18.2 +++ b/xen/include/public/hvm/params.h	Thu Nov 02 18:52:04 2006 +0000
    18.3 @@ -7,7 +7,9 @@
    18.4  #define HVM_PARAM_STORE_EVTCHN 2
    18.5  #define HVM_PARAM_APIC_ENABLED 3
    18.6  #define HVM_PARAM_PAE_ENABLED  4
    18.7 -#define HVM_NR_PARAMS          5
    18.8 +#define HVM_PARAM_IOREQ_PFN    5
    18.9 +#define HVM_PARAM_BUFIOREQ_PFN 6
   18.10 +#define HVM_NR_PARAMS          7
   18.11  
   18.12  /* Get/set subcommands: extra argument == pointer to xen_hvm_param struct. */
   18.13  #define HVMOP_set_param 0