ia64/xen-unstable

changeset 15187:17f6163ae930

ia64: nvram setup.
From: "Zhang, Xing Z" <xing.z.zhang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu May 24 09:54:03 2007 +0100 (2007-05-24)
parents 1e097a48db06
children 46095d5a59a9
files tools/libxc/ia64/xc_ia64_hvm_build.c tools/libxc/xenctrl.h tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/image.py xen/include/public/arch-ia64.h xen/include/public/hvm/params.h
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu May 24 09:15:58 2007 +0100
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu May 24 09:54:03 2007 +0100
     1.3 @@ -122,6 +122,7 @@ typedef enum {
     1.4      HOB_TYPE_PAL_VM_INFO,
     1.5      HOB_TYPE_PAL_VM_PAGE_SIZE,
     1.6      HOB_TYPE_NR_VCPU,
     1.7 +	HOB_TYPE_NVRAM,
     1.8      HOB_TYPE_MAX
     1.9  } hob_type_t;
    1.10  
    1.11 @@ -129,14 +130,17 @@ static int hob_init(void  *buffer ,unsig
    1.12  static int add_pal_hob(void* hob_buf);
    1.13  static int add_mem_hob(void* hob_buf, unsigned long dom_mem_size);
    1.14  static int add_vcpus_hob(void* hob_buf, unsigned long nr_vcpu);
    1.15 +static int add_nvram_hob(void* hob_buf, unsigned long nvram_addr);
    1.16  static int build_hob(void* hob_buf, unsigned long hob_buf_size,
    1.17 -                     unsigned long dom_mem_size, unsigned long vcpus);
    1.18 +                     unsigned long dom_mem_size, unsigned long vcpus,
    1.19 +					 unsigned long nvram_addr);
    1.20  static int load_hob(int xc_handle,uint32_t dom, void *hob_buf,
    1.21                      unsigned long dom_mem_size);
    1.22  
    1.23  static int
    1.24  xc_ia64_build_hob(int xc_handle, uint32_t dom,
    1.25 -                  unsigned long memsize, unsigned long vcpus)
    1.26 +                  unsigned long memsize, unsigned long vcpus,
    1.27 +				  unsigned long nvram_addr)
    1.28  {
    1.29      char   *hob_buf;
    1.30  
    1.31 @@ -146,7 +150,7 @@ xc_ia64_build_hob(int xc_handle, uint32_
    1.32          return -1;
    1.33      }
    1.34  
    1.35 -    if (build_hob(hob_buf, GFW_HOB_SIZE, memsize, vcpus) < 0) {
    1.36 +    if (build_hob(hob_buf, GFW_HOB_SIZE, memsize, vcpus, nvram_addr) < 0) {
    1.37          free(hob_buf);
    1.38          PERROR("Could not build hob");
    1.39          return -1;
    1.40 @@ -244,7 +248,8 @@ get_hob_size(void* hob_buf)
    1.41  
    1.42  static int
    1.43  build_hob(void* hob_buf, unsigned long hob_buf_size,
    1.44 -          unsigned long dom_mem_size, unsigned long vcpus)
    1.45 +          unsigned long dom_mem_size, unsigned long vcpus,
    1.46 +		  unsigned long nvram_addr)
    1.47  {
    1.48      //Init HOB List
    1.49      if (hob_init(hob_buf, hob_buf_size) < 0) {
    1.50 @@ -267,6 +272,11 @@ build_hob(void* hob_buf, unsigned long h
    1.51          goto err_out;
    1.52      }
    1.53  
    1.54 +	if (add_nvram_hob( hob_buf, nvram_addr ) < 0) {
    1.55 +		PERROR("Add nvram hob failed, buffer too small");
    1.56 +		goto err_out;
    1.57 +	}
    1.58 +
    1.59      return 0;
    1.60  
    1.61  err_out:
    1.62 @@ -327,6 +337,12 @@ add_vcpus_hob(void* hob_buf, unsigned lo
    1.63      return hob_add(hob_buf, HOB_TYPE_NR_VCPU, &vcpus, sizeof(vcpus));
    1.64  }
    1.65  
    1.66 +static int
    1.67 +add_nvram_hob(void *hob_buf, unsigned long nvram_addr)
    1.68 +{
    1.69 +	return hob_add(hob_buf, HOB_TYPE_NVRAM, &nvram_addr, sizeof(nvram_addr));
    1.70 +}
    1.71 +
    1.72  static const unsigned char config_pal_bus_get_features_data[24] = {
    1.73      0, 0, 0, 32, 0, 0, 240, 189, 0, 0, 0, 0, 0, 0,
    1.74      0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    1.75 @@ -551,6 +567,184 @@ add_pal_hob(void* hob_buf)
    1.76      return 0;
    1.77  }
    1.78  
    1.79 +// The most significant bit of nvram file descriptor:
    1.80 +// 1: valid; 0: invalid
    1.81 +#define VALIDATE_NVRAM_FD(x) ((1UL<<(sizeof(x)*8 - 1)) | x)
    1.82 +#define IS_VALID_NVRAM_FD(x) ((uint64_t)x >> (sizeof(x)*8 - 1))
    1.83 +static uint64_t 
    1.84 +nvram_init(const char *nvram_path)
    1.85 +{
    1.86 +	uint64_t fd = 0;
    1.87 +	fd = open(nvram_path, O_CREAT|O_RDWR, 0666);
    1.88 +
    1.89 +	if ( fd < 0 )
    1.90 +	{
    1.91 +		PERROR("Nvram open failed at %s. Guest will boot without"
    1.92 +				" nvram support!\n", nvram_path);	
    1.93 +		return -1;
    1.94 +	}
    1.95 +
    1.96 +	return VALIDATE_NVRAM_FD(fd);
    1.97 +}
    1.98 +
    1.99 +static int 
   1.100 +copy_from_nvram_to_GFW(int xc_handle, uint32_t dom, int nvram_fd)
   1.101 +{
   1.102 +	unsigned int nr_pages = NVRAM_SIZE >> PAGE_SHIFT;
   1.103 +	struct stat file_stat;
   1.104 +	char buf[NVRAM_SIZE] = {0};
   1.105 +	
   1.106 +	if ( fstat(nvram_fd, &file_stat) < 0 )
   1.107 +	{
   1.108 +		PERROR("Cannot get Nvram file info! Guest will boot without "
   1.109 +			   "nvram support!\n");
   1.110 +		return -1;
   1.111 +	}
   1.112 +
   1.113 +	if ( 0 == file_stat.st_size )
   1.114 +	{
   1.115 +		DPRINTF("Nvram file create successful!\n");
   1.116 +		return 0;
   1.117 +	}
   1.118 +
   1.119 +	if ( read(nvram_fd, buf, NVRAM_SIZE) != NVRAM_SIZE )
   1.120 +	{
   1.121 +		PERROR("Load nvram fail. guest will boot without"
   1.122 +			   " nvram support!\n");
   1.123 +		return -1;
   1.124 +	}
   1.125 +
   1.126 +	return  xc_ia64_copy_to_domain_pages(xc_handle, dom, buf,
   1.127 +											NVRAM_START >> PAGE_SHIFT,
   1.128 +											nr_pages);
   1.129 +}
   1.130 +
   1.131 +
   1.132 +/*
   1.133 + * GFW use 4k page. when doing foreign map, we should 16k align
   1.134 + * the address and map one more page to guarantee all 64k nvram data 
   1.135 + * can be got.
   1.136 + */
   1.137 +static int
   1.138 +copy_from_GFW_to_nvram(int xc_handle, uint32_t dom, int nvram_fd)
   1.139 +{
   1.140 +	xen_pfn_t *pfn_list = NULL;
   1.141 +	char *tmp_ptr = NULL;
   1.142 +	unsigned int nr_pages = 0;
   1.143 +	uint64_t addr_from_GFW_4k_align = 0;
   1.144 +	uint32_t offset = 0;
   1.145 +	uint64_t nvram_base_addr = 0;
   1.146 +	char buf[NVRAM_SIZE] = {0};
   1.147 +	int i;
   1.148 +
   1.149 +	
   1.150 +	// map one more page 
   1.151 +	nr_pages = (NVRAM_SIZE + PAGE_SIZE) >> PAGE_SHIFT;
   1.152 +	pfn_list = (xen_pfn_t *)malloc(sizeof(xen_pfn_t) * nr_pages);
   1.153 +	if ( NULL == pfn_list )
   1.154 +	{
   1.155 +		PERROR("Cannot allocate memory for nvram save!\n");
   1.156 +		close(nvram_fd);
   1.157 +		return -1;
   1.158 +	}
   1.159 +
   1.160 +	/* 
   1.161 +	 * GFW allocate memory dynamicly to save nvram data
   1.162 +	 * and save address of the dynamic memory at NVRAM_START. 
   1.163 +	 * To save nvram data to file, we must get the dynamic
   1.164 +	 * memory address first.
   1.165 +	 */
   1.166 +	pfn_list[0] = NVRAM_START >> PAGE_SHIFT;
   1.167 +	tmp_ptr = (char *)xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
   1.168 +			PROT_READ | PROT_WRITE, pfn_list[0]);
   1.169 +
   1.170 +	if ( NULL == tmp_ptr )
   1.171 +	{
   1.172 +		PERROR("Cannot get nvram data from GFW!\n");
   1.173 +		free(pfn_list);
   1.174 +		close(nvram_fd);
   1.175 +		return -1;
   1.176 +	}
   1.177 +
   1.178 +	addr_from_GFW_4k_align = *((uint64_t *)tmp_ptr);
   1.179 +	munmap(tmp_ptr, PAGE_SIZE);
   1.180 +
   1.181 +	// align address to 16k
   1.182 +	offset = addr_from_GFW_4k_align % ( 16 * MEM_K );
   1.183 +	addr_from_GFW_4k_align = addr_from_GFW_4k_align - offset;
   1.184 +	for ( i=0; i<nr_pages; i++ )
   1.185 +		pfn_list[i] = (addr_from_GFW_4k_align >> PAGE_SHIFT) + i;
   1.186 +
   1.187 +	tmp_ptr = (char *)xc_map_foreign_batch(xc_handle, dom,
   1.188 +						PROT_READ | PROT_WRITE, pfn_list, nr_pages);
   1.189 +	if ( NULL == tmp_ptr )
   1.190 +	{
   1.191 +		PERROR("Cannot get nvram data from GFW!\n");
   1.192 +		free(pfn_list);
   1.193 +		close(nvram_fd);
   1.194 +		return -1;
   1.195 +	}
   1.196 +
   1.197 +	// calculate nvram data base addrees
   1.198 +	nvram_base_addr = (uint64_t)(tmp_ptr + offset);
   1.199 +
   1.200 +	memcpy(buf, (void *)nvram_base_addr, NVRAM_SIZE);
   1.201 +	free(pfn_list);
   1.202 +	munmap(tmp_ptr, NVRAM_SIZE + PAGE_SIZE);
   1.203 +
   1.204 +	lseek(nvram_fd, 0, SEEK_SET);
   1.205 +	if ( write(nvram_fd, buf, NVRAM_SIZE) != NVRAM_SIZE )
   1.206 +	{
   1.207 +		PERROR("Save to nvram fail!\n");
   1.208 +		return -1;
   1.209 +	}
   1.210 +
   1.211 +	close(nvram_fd);
   1.212 +
   1.213 +	DPRINTF("Nvram save successful!\n");
   1.214 +
   1.215 +	return 0;
   1.216 +}
   1.217 +
   1.218 +int xc_ia64_save_to_nvram(int xc_handle, uint32_t dom) 
   1.219 +{
   1.220 +	uint64_t nvram_fd = 0;
   1.221 +	xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
   1.222 +
   1.223 +	if ( !IS_VALID_NVRAM_FD(nvram_fd) )
   1.224 +	{
   1.225 +		PERROR("Nvram not be initialized. Nvram save fail!\n");
   1.226 +		return -1;
   1.227 +	}
   1.228 +	return copy_from_GFW_to_nvram(xc_handle, dom, (int)nvram_fd);	
   1.229 +}
   1.230 +
   1.231 +#define NVRAM_FILE_PATH	"/usr/lib/xen/boot/nvram_"
   1.232 +int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom)
   1.233 +{
   1.234 +	int file_path_len = strlen(NVRAM_FILE_PATH);
   1.235 +	uint64_t nvram_fd = 0;
   1.236 +	char nvram_path[100] = {0};
   1.237 +
   1.238 +	strncpy(nvram_path, NVRAM_FILE_PATH, file_path_len);
   1.239 +	if ( file_path_len + strlen(dom_name) + 1 > sizeof(nvram_path) )
   1.240 +	{
   1.241 +		PERROR("Nvram file path is too long!\n");
   1.242 +		return -1;
   1.243 +	}
   1.244 +	strcpy(nvram_path + file_path_len, dom_name);
   1.245 +
   1.246 +	nvram_fd = nvram_init(nvram_path);
   1.247 +	if ( nvram_fd == (uint64_t)(-1) )
   1.248 +	{
   1.249 +		xc_set_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, 0);
   1.250 +		return -1;
   1.251 +	}
   1.252 +
   1.253 +	xc_set_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, nvram_fd);
   1.254 +	return 0; 
   1.255 +}
   1.256 +
   1.257  #define GFW_PAGES (GFW_SIZE >> PAGE_SHIFT)
   1.258  #define VGA_START_PAGE (VGA_IO_START >> PAGE_SHIFT)
   1.259  #define VGA_END_PAGE ((VGA_IO_START + VGA_IO_SIZE) >> PAGE_SHIFT)
   1.260 @@ -573,6 +767,7 @@ setup_guest(int xc_handle, uint32_t dom,
   1.261      unsigned long dom_memsize = memsize << 20;
   1.262      unsigned long nr_pages = memsize << (20 - PAGE_SHIFT);
   1.263      unsigned long vcpus;
   1.264 +	unsigned long nvram_start = NVRAM_START, nvram_fd = 0; 
   1.265      int rc;
   1.266      long i;
   1.267      DECLARE_DOMCTL;
   1.268 @@ -627,7 +822,7 @@ setup_guest(int xc_handle, uint32_t dom,
   1.269          goto error_out;
   1.270      }
   1.271  
   1.272 -    pfn_list[0] = IO_PAGE_START >> PAGE_SHIFT;
   1.273 +	pfn_list[0] = IO_PAGE_START >> PAGE_SHIFT;
   1.274      pfn_list[1] = STORE_PAGE_START >> PAGE_SHIFT;
   1.275      pfn_list[2] = BUFFER_IO_PAGE_START >> PAGE_SHIFT;
   1.276      pfn_list[3] = BUFFER_PIO_PAGE_START >> PAGE_SHIFT;
   1.277 @@ -662,10 +857,17 @@ setup_guest(int xc_handle, uint32_t dom,
   1.278          goto error_out;
   1.279      }
   1.280  
   1.281 +	xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
   1.282 +	if ( !IS_VALID_NVRAM_FD(nvram_fd) )
   1.283 +		nvram_start = 0;
   1.284 +	else
   1.285 +		if ( copy_from_nvram_to_GFW(xc_handle, dom, (int)nvram_fd ) == -1 )
   1.286 +			nvram_start = 0;
   1.287 +
   1.288      vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
   1.289  
   1.290      // Hand-off state passed to guest firmware 
   1.291 -    if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) {
   1.292 +    if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus, nvram_start) < 0) {
   1.293          PERROR("Could not build hob\n");
   1.294          goto error_out;
   1.295      }
     2.1 --- a/tools/libxc/xenctrl.h	Thu May 24 09:15:58 2007 +0100
     2.2 +++ b/tools/libxc/xenctrl.h	Thu May 24 09:54:03 2007 +0100
     2.3 @@ -847,4 +847,11 @@ int xc_get_hvm_param(int handle, domid_t
     2.4  int xc_alloc_real_mode_area(int xc_handle,
     2.5                              uint32_t domid,
     2.6                              unsigned int log);
     2.7 -#endif
     2.8 +
     2.9 +/* IA64 specific, nvram save */
    2.10 +int xc_ia64_save_to_nvram(int xc_handle, uint32_t dom);
    2.11 +
    2.12 +/* IA64 specific, nvram init */
    2.13 +int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom);
    2.14 +
    2.15 +#endif /* XENCTRL_H */
     3.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Thu May 24 09:15:58 2007 +0100
     3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Thu May 24 09:54:03 2007 +0100
     3.3 @@ -54,9 +54,9 @@ static PyObject *pyxc_error_to_exception
     3.4          return PyErr_SetFromErrno(xc_error_obj);
     3.5  
     3.6      if ( err->message[0] != '\0' )
     3.7 -	pyerr = Py_BuildValue("(iss)", err->code, desc, err->message);
     3.8 +        pyerr = Py_BuildValue("(iss)", err->code, desc, err->message);
     3.9      else
    3.10 -	pyerr = Py_BuildValue("(is)", err->code, desc);
    3.11 +        pyerr = Py_BuildValue("(is)", err->code, desc);
    3.12  
    3.13      xc_clear_last_error();
    3.14  
    3.15 @@ -163,6 +163,16 @@ static PyObject *pyxc_domain_unpause(XcO
    3.16      return dom_op(self, args, xc_domain_unpause);
    3.17  }
    3.18  
    3.19 +static PyObject *pyxc_domain_destroy_hook(XcObject *self, PyObject *args)
    3.20 +{
    3.21 +#ifdef __ia64__
    3.22 +    dom_op(self, args, xc_ia64_save_to_nvram);
    3.23 +#endif
    3.24 +
    3.25 +    Py_INCREF(zero);
    3.26 +    return zero;
    3.27 +}
    3.28 +
    3.29  static PyObject *pyxc_domain_destroy(XcObject *self, PyObject *args)
    3.30  {
    3.31      return dom_op(self, args, xc_domain_destroy);
    3.32 @@ -426,7 +436,7 @@ static PyObject *pyxc_linux_build(XcObje
    3.33  
    3.34      xc_dom_loginit();
    3.35      if (!(dom = xc_dom_allocate(cmdline, features)))
    3.36 -	return pyxc_error_to_exception();
    3.37 +        return pyxc_error_to_exception();
    3.38  
    3.39      if ( xc_dom_linux_build(self->xc_handle, dom, domid, mem_mb, image,
    3.40  			    ramdisk, flags, store_evtchn, &store_mfn,
    3.41 @@ -498,6 +508,23 @@ static PyObject *pyxc_get_hvm_param(XcOb
    3.42  
    3.43  }
    3.44  
    3.45 +#ifdef __ia64__
    3.46 +static PyObject *pyxc_nvram_init(XcObject *self,
    3.47 +                                 PyObject *args)
    3.48 +{
    3.49 +    char *dom_name;
    3.50 +    uint32_t dom;
    3.51 +
    3.52 +    if ( !PyArg_ParseTuple(args, "si", &dom_name, &dom) )
    3.53 +        return NULL;
    3.54 +
    3.55 +    xc_ia64_nvram_init(self->xc_handle, dom_name, dom);
    3.56 +
    3.57 +    Py_INCREF(zero);
    3.58 +    return zero;
    3.59 +}
    3.60 +#endif /* __ia64__ */
    3.61 +
    3.62  static PyObject *pyxc_hvm_build(XcObject *self,
    3.63                                  PyObject *args,
    3.64                                  PyObject *kwds)
    3.65 @@ -1156,6 +1183,13 @@ static PyMethodDef pyxc_methods[] = {
    3.66        " dom [int]:    Identifier of domain to be destroyed.\n\n"
    3.67        "Returns: [int] 0 on success; -1 on error.\n" },
    3.68  
    3.69 +    { "domain_destroy_hook", 
    3.70 +      (PyCFunction)pyxc_domain_destroy_hook, 
    3.71 +      METH_VARARGS, "\n"
    3.72 +      "Add a hook for arch stuff before destroy a domain.\n"
    3.73 +      " dom [int]:    Identifier of domain to be destroyed.\n\n"
    3.74 +      "Returns: [int] 0 on success; -1 on error.\n" },
    3.75 +
    3.76      { "domain_resume", 
    3.77        (PyCFunction)pyxc_domain_resume,
    3.78        METH_VARARGS, "\n"
    3.79 @@ -1397,7 +1431,13 @@ static PyMethodDef pyxc_methods[] = {
    3.80        " dom [int]: Identifier of domain.\n"
    3.81        " mem_kb [long]: .\n"
    3.82        "Returns: [int] 0 on success; -1 on error.\n" },
    3.83 -
    3.84 +#ifdef __ia64__
    3.85 +    { "nvram_init",
    3.86 +      (PyCFunction)pyxc_nvram_init,
    3.87 +      METH_VARARGS, "\n"
    3.88 +      "Init nvram in IA64 platform\n"
    3.89 +      "Returns: [int] 0 on success; -1 on error.\n" },
    3.90 +#endif /* __ia64__ */
    3.91      { "domain_ioport_permission",
    3.92        (PyCFunction)pyxc_domain_ioport_permission,
    3.93        METH_VARARGS | METH_KEYWORDS, "\n"
     4.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu May 24 09:15:58 2007 +0100
     4.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu May 24 09:54:03 2007 +0100
     4.3 @@ -1666,6 +1666,7 @@ class XendDomainInfo:
     4.4  
     4.5          self._cleanupVm()
     4.6          if self.dompath is not None:
     4.7 +            xc.domain_destroy_hook(self.domid)
     4.8              self.destroyDomain()
     4.9  
    4.10          self._cleanup_phantom_devs(paths)
     5.1 --- a/tools/python/xen/xend/image.py	Thu May 24 09:15:58 2007 +0100
     5.2 +++ b/tools/python/xen/xend/image.py	Thu May 24 09:54:03 2007 +0100
     5.3 @@ -469,6 +469,10 @@ class HVMImageHandler(ImageHandler):
     5.4  
     5.5  class IA64_HVM_ImageHandler(HVMImageHandler):
     5.6  
     5.7 +    def buildDomain(self):
     5.8 +        xc.nvram_init(self.vm.getName(), self.vm.getDomid())
     5.9 +        return HVMImageHandler.buildDomain(self)
    5.10 +
    5.11      def getRequiredAvailableMemory(self, mem_kb):
    5.12          page_kb = 16
    5.13          # ROM size for guest firmware, ioreq page, pio page and xenstore page
     6.1 --- a/xen/include/public/arch-ia64.h	Thu May 24 09:15:58 2007 +0100
     6.2 +++ b/xen/include/public/arch-ia64.h	Thu May 24 09:54:03 2007 +0100
     6.3 @@ -77,6 +77,7 @@ typedef unsigned long xen_ulong_t;
     6.4  
     6.5  #define MEM_G   (1UL << 30)
     6.6  #define MEM_M   (1UL << 20)
     6.7 +#define MEM_K   (1UL << 10)
     6.8  
     6.9  #define MMIO_START       (3 * MEM_G)
    6.10  #define MMIO_SIZE        (512 * MEM_M)
    6.11 @@ -108,6 +109,10 @@ typedef unsigned long xen_ulong_t;
    6.12  #define GFW_START        (4*MEM_G -16*MEM_M)
    6.13  #define GFW_SIZE         (16*MEM_M)
    6.14  
    6.15 +/* Nvram belongs to GFW memory space  */
    6.16 +#define NVRAM_SIZE       (MEM_K * 64)
    6.17 +#define NVRAM_START      (GFW_START + 10 * MEM_M)
    6.18 +
    6.19  struct pt_fpreg {
    6.20      union {
    6.21          unsigned long bits[2];
     7.1 --- a/xen/include/public/hvm/params.h	Thu May 24 09:15:58 2007 +0100
     7.2 +++ b/xen/include/public/hvm/params.h	Thu May 24 09:54:03 2007 +0100
     7.3 @@ -50,6 +50,11 @@
     7.4  
     7.5  #define HVM_PARAM_BUFIOREQ_PFN 6
     7.6  
     7.7 +#ifdef __ia64__
     7.8 +#define HVM_PARAM_NVRAM_FD     7
     7.9 +#define HVM_NR_PARAMS          8
    7.10 +#else
    7.11  #define HVM_NR_PARAMS          7
    7.12 +#endif
    7.13  
    7.14  #endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */