ia64/xen-unstable
changeset 18180:eb71d05f51a2
Move xen-pm options from dom0 cmdline option to start info.
Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.
signed-off-by: Wei Gang <gang.wei@intel.com>
Thus to avoid xen-pm being manually enforced by end user in dom0
cmdline but without enabling them in xen.
signed-off-by: Wei Gang <gang.wei@intel.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Jul 28 11:43:54 2008 +0100 (2008-07-28) |
parents | fa8a39619154 |
children | 0dc50e764c8c |
files | xen/arch/x86/domain_build.c xen/arch/x86/setup.c xen/include/public/xen.h |
line diff
1.1 --- a/xen/arch/x86/domain_build.c Mon Jul 28 11:40:21 2008 +0100 1.2 +++ b/xen/arch/x86/domain_build.c Mon Jul 28 11:43:54 2008 +0100 1.3 @@ -757,6 +757,7 @@ int __init construct_dom0( 1.4 si->shared_info = virt_to_maddr(d->shared_info); 1.5 1.6 si->flags = SIF_PRIVILEGED | SIF_INITDOMAIN; 1.7 + si->flags |= (xen_processor_pmbits << 8) & SIF_PM_MASK; 1.8 si->pt_base = vpt_start + 2 * PAGE_SIZE * !!is_pv_32on64_domain(d); 1.9 si->nr_pt_frames = nr_pt_pages; 1.10 si->mfn_list = vphysmap_start;
2.1 --- a/xen/arch/x86/setup.c Mon Jul 28 11:40:21 2008 +0100 2.2 +++ b/xen/arch/x86/setup.c Mon Jul 28 11:43:54 2008 +0100 2.3 @@ -997,7 +997,6 @@ void __init __start_xen(unsigned long mb 2.4 if ( (cmdline != NULL) || (kextra != NULL) ) 2.5 { 2.6 static char dom0_cmdline[MAX_GUEST_CMDLINE]; 2.7 - char xen_pm_param[32]; 2.8 2.9 cmdline = cmdline_cook(cmdline); 2.10 safe_strcpy(dom0_cmdline, cmdline); 2.11 @@ -1022,14 +1021,6 @@ void __init __start_xen(unsigned long mb 2.12 safe_strcat(dom0_cmdline, " acpi="); 2.13 safe_strcat(dom0_cmdline, acpi_param); 2.14 } 2.15 - if ( xen_cpuidle ) 2.16 - xen_processor_pmbits |= XEN_PROCESSOR_PM_CX; 2.17 - 2.18 - snprintf(xen_pm_param, sizeof(xen_pm_param), 2.19 - " xen_processor_pmbits=%d", xen_processor_pmbits); 2.20 - 2.21 - if ( !strstr(dom0_cmdline, "xen_processor_pmbits=") ) 2.22 - safe_strcat(dom0_cmdline, xen_pm_param); 2.23 2.24 cmdline = dom0_cmdline; 2.25 } 2.26 @@ -1041,6 +1032,9 @@ void __init __start_xen(unsigned long mb 2.27 _initrd_len = mod[initrdidx].mod_end - mod[initrdidx].mod_start; 2.28 } 2.29 2.30 + if ( xen_cpuidle ) 2.31 + xen_processor_pmbits |= XEN_PROCESSOR_PM_CX; 2.32 + 2.33 /* 2.34 * We're going to setup domain0 using the module(s) that we stashed safely 2.35 * above our heap. The second module, if present, is an initrd ramdisk.
3.1 --- a/xen/include/public/xen.h Mon Jul 28 11:40:21 2008 +0100 3.2 +++ b/xen/include/public/xen.h Mon Jul 28 11:43:54 2008 +0100 3.3 @@ -554,6 +554,7 @@ typedef struct start_info start_info_t; 3.4 /* These flags are passed in the 'flags' field of start_info_t. */ 3.5 #define SIF_PRIVILEGED (1<<0) /* Is the domain privileged? */ 3.6 #define SIF_INITDOMAIN (1<<1) /* Is this the initial control domain? */ 3.7 +#define SIF_PM_MASK (0xFF<<8) /* reserve 1 byte for xen-pm options */ 3.8 3.9 typedef struct dom0_vga_console_info { 3.10 uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */