[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] ia64: configure VHPT size per domain: common part
# HG changeset patch # User Keir Fraser <keir@xxxxxxxxxxxxx> # Date 1192782475 -3600 # Node ID c5530fbbe9d0fb23de657532197aeb67d9ae6e02 # Parent 218f054a3587840c1b1725fa8da138a5fb4801bf ia64: configure VHPT size per domain: common part Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx> --- tools/examples/xmexample.vti | 4 ++++ tools/libxc/xc_dom_ia64.c | 1 + tools/python/xen/xend/XendConfig.py | 2 +- tools/python/xen/xend/XendConstants.py | 2 ++ tools/python/xen/xend/image.py | 23 +++++++++++++++++++++-- tools/python/xen/xm/create.py | 9 ++++++++- tools/python/xen/xm/xenapi_create.py | 2 +- xen/include/public/domctl.h | 1 + xen/include/public/hvm/params.h | 3 ++- 9 files changed, 41 insertions(+), 6 deletions(-) diff -r 218f054a3587 -r c5530fbbe9d0 tools/examples/xmexample.vti --- a/tools/examples/xmexample.vti Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/examples/xmexample.vti Fri Oct 19 09:27:55 2007 +0100 @@ -34,6 +34,10 @@ name = "ExampleVTIDomain" #cpus = "" # leave to Xen to pick #cpus = "0" # all vcpus run on CPU0 #cpus = "0-3,5,^1" # run on cpus 0,2,3,5 + +# Log2 of VHPT size, default=23 (8MB), minimum=15 (32KB). +# In Windows OS, smaller size shows better performance. +#vhpt = 23 # Optionally define mac and/or bridge for the network interfaces. # Random MACs are assigned if not given. diff -r 218f054a3587 -r c5530fbbe9d0 tools/libxc/xc_dom_ia64.c --- a/tools/libxc/xc_dom_ia64.c Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/libxc/xc_dom_ia64.c Fri Oct 19 09:27:55 2007 +0100 @@ -260,6 +260,7 @@ int arch_setup_bootearly(struct xc_dom_i domctl.u.arch_setup.bp = (dom->start_info_pfn << PAGE_SHIFT) + sizeof(start_info_t); domctl.u.arch_setup.maxmem = dom->total_pages << PAGE_SHIFT; + domctl.u.arch_setup.vhpt_size_log2 = dom->flags; rc = do_domctl(dom->guest_xc, &domctl); return rc; } diff -r 218f054a3587 -r c5530fbbe9d0 tools/python/xen/xend/XendConfig.py --- a/tools/python/xen/xend/XendConfig.py Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/python/xen/xend/XendConfig.py Fri Oct 19 09:27:55 2007 +0100 @@ -127,7 +127,7 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl', 'soundhw','stdvga', 'usb', 'usbdevice', 'vnc', 'vncconsole', 'vncdisplay', 'vnclisten', - 'vncpasswd', 'vncunused', 'xauthority', 'pci'] + 'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt'] # Xen API console 'other_config' keys. XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten', diff -r 218f054a3587 -r c5530fbbe9d0 tools/python/xen/xend/XendConstants.py --- a/tools/python/xen/xend/XendConstants.py Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/python/xen/xend/XendConstants.py Fri Oct 19 09:27:55 2007 +0100 @@ -43,6 +43,8 @@ HVM_PARAM_PAE_ENABLED = 4 HVM_PARAM_PAE_ENABLED = 4 HVM_PARAM_IOREQ_PFN = 5 HVM_PARAM_BUFIOREQ_PFN = 6 +HVM_PARAM_NVRAM_FD = 7 +HVM_PARAM_VHPT_SIZE = 8 restart_modes = [ "restart", diff -r 218f054a3587 -r c5530fbbe9d0 tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/python/xen/xend/image.py Fri Oct 19 09:27:55 2007 +0100 @@ -197,6 +197,7 @@ class LinuxImageHandler(ImageHandler): class LinuxImageHandler(ImageHandler): ostype = "linux" + flags = 0 def buildDomain(self): store_evtchn = self.vm.getStorePort() @@ -213,6 +214,8 @@ class LinuxImageHandler(ImageHandler): log.debug("ramdisk = %s", self.ramdisk) log.debug("vcpus = %d", self.vm.getVCpuCount()) log.debug("features = %s", self.vm.getFeatures()) + if arch.type == "ia64": + log.debug("vhpt = %d", self.flags) return xc.linux_build(domid = self.vm.getDomid(), memsize = mem_mb, @@ -221,7 +224,8 @@ class LinuxImageHandler(ImageHandler): console_evtchn = console_evtchn, cmdline = self.cmdline, ramdisk = self.ramdisk, - features = self.vm.getFeatures()) + features = self.vm.getFeatures(), + flags = self.flags) class PPC_LinuxImageHandler(LinuxImageHandler): @@ -500,8 +504,13 @@ class HVMImageHandler(ImageHandler): class IA64_HVM_ImageHandler(HVMImageHandler): + def configure(self, vmConfig): + HVMImageHandler.configure(self, vmConfig) + self.vhpt = int(vmConfig['platform'].get('vhpt', 0)) + def buildDomain(self): xc.nvram_init(self.vm.getName(), self.vm.getDomid()) + xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_VHPT_SIZE, self.vhpt) return HVMImageHandler.buildDomain(self) def getRequiredAvailableMemory(self, mem_kb): @@ -517,6 +526,16 @@ class IA64_HVM_ImageHandler(HVMImageHand def getRequiredShadowMemory(self, shadow_mem_kb, maxmem_kb): # Explicit shadow memory is not a concept return 0 + +class IA64_Linux_ImageHandler(LinuxImageHandler): + + def configure(self, vmConfig): + LinuxImageHandler.configure(self, vmConfig) + self.vhpt = int(vmConfig['platform'].get('vhpt', 0)) + + def buildDomain(self): + self.flags = self.vhpt + return LinuxImageHandler.buildDomain(self) class X86_HVM_ImageHandler(HVMImageHandler): @@ -562,7 +581,7 @@ _handlers = { "linux": PPC_LinuxImageHandler, }, "ia64": { - "linux": LinuxImageHandler, + "linux": IA64_Linux_ImageHandler, "hvm": IA64_HVM_ImageHandler, }, "x86": { diff -r 218f054a3587 -r c5530fbbe9d0 tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/python/xen/xm/create.py Fri Oct 19 09:27:55 2007 +0100 @@ -210,6 +210,10 @@ gopts.var('vcpu_avail', val='VCPUS', fn=set_long, default=None, use="Bitmask for virtual CPUs to make available immediately.") +gopts.var('vhpt', val='VHPT', + fn=set_int, default=0, + use="Log2 of domain VHPT size for IA64.") + gopts.var('cpu_cap', val='CAP', fn=set_int, default=None, use="""Set the maximum amount of cpu. @@ -555,7 +559,10 @@ def configure_image(vals): if vals.builder == 'hvm': configure_hvm(config_image, vals) - + + if vals.vhpt != 0: + config_image.append(['vhpt', vals.vhpt]) + return config_image def configure_disks(config_devs, vals): diff -r 218f054a3587 -r c5530fbbe9d0 tools/python/xen/xm/xenapi_create.py --- a/tools/python/xen/xm/xenapi_create.py Thu Oct 18 16:17:53 2007 +0100 +++ b/tools/python/xen/xm/xenapi_create.py Fri Oct 19 09:27:55 2007 +0100 @@ -818,7 +818,7 @@ class sxp2xml: def extract_platform(self, image, document): - platform_keys = ['acpi', 'apic', 'pae'] + platform_keys = ['acpi', 'apic', 'pae', 'vhpt'] def extract_platform_key(key): platform = document.createElement("platform") diff -r 218f054a3587 -r c5530fbbe9d0 xen/include/public/domctl.h --- a/xen/include/public/domctl.h Thu Oct 18 16:17:53 2007 +0100 +++ b/xen/include/public/domctl.h Fri Oct 19 09:27:55 2007 +0100 @@ -380,6 +380,7 @@ typedef struct xen_domctl_arch_setup { uint64_aligned_t maxmem; /* Highest memory address for MDT. */ uint64_aligned_t xsi_va; /* Xen shared_info area virtual address. */ uint32_t hypercall_imm; /* Break imm for Xen hypercalls. */ + int8_t vhpt_size_log2; /* Log2 of VHPT size. */ #endif } xen_domctl_arch_setup_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_arch_setup_t); diff -r 218f054a3587 -r c5530fbbe9d0 xen/include/public/hvm/params.h --- a/xen/include/public/hvm/params.h Thu Oct 18 16:17:53 2007 +0100 +++ b/xen/include/public/hvm/params.h Fri Oct 19 09:27:55 2007 +0100 @@ -52,7 +52,8 @@ #ifdef __ia64__ #define HVM_PARAM_NVRAM_FD 7 -#define HVM_NR_PARAMS 8 +#define HVM_PARAM_VHPT_SIZE 8 +#define HVM_NR_PARAMS 9 #else #define HVM_NR_PARAMS 7 #endif _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |