ia64/xen-unstable
changeset 16187:dc2ff26bbdf6
ia64: Fix ia64 PV domain creation with new vhpt-size parameter.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author | Keir Fraser <keir@xensource.com> |
---|---|
date | Mon Oct 22 14:21:13 2007 +0100 (2007-10-22) |
parents | 3e7c86602c70 |
children | 368f563f2fd0 |
files | tools/libxc/xc_dom.h tools/libxc/xc_dom_ia64.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/image.py |
line diff
1.1 --- a/tools/libxc/xc_dom.h Mon Oct 22 14:19:22 2007 +0100 1.2 +++ b/tools/libxc/xc_dom.h Mon Oct 22 14:21:13 2007 +0100 1.3 @@ -95,6 +95,7 @@ struct xc_dom_image { 1.4 1.5 int guest_xc; 1.6 domid_t guest_domid; 1.7 + int8_t vhpt_size_log2; /* for IA64 */ 1.8 int shadow_enabled; 1.9 1.10 int xen_version;
2.1 --- a/tools/libxc/xc_dom_ia64.c Mon Oct 22 14:19:22 2007 +0100 2.2 +++ b/tools/libxc/xc_dom_ia64.c Mon Oct 22 14:21:13 2007 +0100 2.3 @@ -260,7 +260,7 @@ int arch_setup_bootearly(struct xc_dom_i 2.4 domctl.u.arch_setup.bp = (dom->start_info_pfn << PAGE_SHIFT) 2.5 + sizeof(start_info_t); 2.6 domctl.u.arch_setup.maxmem = dom->total_pages << PAGE_SHIFT; 2.7 - domctl.u.arch_setup.vhpt_size_log2 = dom->flags; 2.8 + domctl.u.arch_setup.vhpt_size_log2 = dom->vhpt_size_log2; 2.9 rc = do_domctl(dom->guest_xc, &domctl); 2.10 return rc; 2.11 }
3.1 --- a/tools/python/xen/lowlevel/xc/xc.c Mon Oct 22 14:19:22 2007 +0100 3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Mon Oct 22 14:21:13 2007 +0100 3.3 @@ -413,6 +413,7 @@ static PyObject *pyxc_linux_build(XcObje 3.4 char *image, *ramdisk = NULL, *cmdline = "", *features = NULL; 3.5 int flags = 0; 3.6 int store_evtchn, console_evtchn; 3.7 + int vhpt = 0; 3.8 unsigned int mem_mb; 3.9 unsigned long store_mfn = 0; 3.10 unsigned long console_mfn = 0; 3.11 @@ -425,20 +426,23 @@ static PyObject *pyxc_linux_build(XcObje 3.12 "console_evtchn", "image", 3.13 /* optional */ 3.14 "ramdisk", "cmdline", "flags", 3.15 - "features", NULL }; 3.16 + "features", "vhpt", NULL }; 3.17 3.18 - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssis", kwd_list, 3.19 + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssisi", kwd_list, 3.20 &domid, &store_evtchn, &mem_mb, 3.21 &console_evtchn, &image, 3.22 /* optional */ 3.23 &ramdisk, &cmdline, &flags, 3.24 - &features) ) 3.25 + &features, &vhpt) ) 3.26 return NULL; 3.27 3.28 xc_dom_loginit(); 3.29 if (!(dom = xc_dom_allocate(cmdline, features))) 3.30 return pyxc_error_to_exception(); 3.31 3.32 + /* for IA64 */ 3.33 + dom->vhpt_size_log2 = vhpt; 3.34 + 3.35 if ( xc_dom_linux_build(self->xc_handle, dom, domid, mem_mb, image, 3.36 ramdisk, flags, store_evtchn, &store_mfn, 3.37 console_evtchn, &console_mfn) != 0 ) {
4.1 --- a/tools/python/xen/xend/image.py Mon Oct 22 14:19:22 2007 +0100 4.2 +++ b/tools/python/xen/xend/image.py Mon Oct 22 14:21:13 2007 +0100 4.3 @@ -198,6 +198,7 @@ class LinuxImageHandler(ImageHandler): 4.4 4.5 ostype = "linux" 4.6 flags = 0 4.7 + vhpt = 0 4.8 4.9 def buildDomain(self): 4.10 store_evtchn = self.vm.getStorePort() 4.11 @@ -225,7 +226,8 @@ class LinuxImageHandler(ImageHandler): 4.12 cmdline = self.cmdline, 4.13 ramdisk = self.ramdisk, 4.14 features = self.vm.getFeatures(), 4.15 - flags = self.flags) 4.16 + flags = self.flags, 4.17 + vhpt = self.vhpt) 4.18 4.19 class PPC_LinuxImageHandler(LinuxImageHandler): 4.20 4.21 @@ -533,9 +535,6 @@ class IA64_Linux_ImageHandler(LinuxImage 4.22 LinuxImageHandler.configure(self, vmConfig) 4.23 self.vhpt = int(vmConfig['platform'].get('vhpt', 0)) 4.24 4.25 - def buildDomain(self): 4.26 - self.flags = self.vhpt 4.27 - return LinuxImageHandler.buildDomain(self) 4.28 4.29 class X86_HVM_ImageHandler(HVMImageHandler): 4.30