aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2010-07-29 09:37:48 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2010-07-29 14:11:33 -0400
commitca65f9fc0c447da5b270b05c41c21b19c88617c3 (patch)
tree7a8813233d867635d01cc2c8397099df4468751d /arch/x86
parentb98a409b80ac510c95b4f1bafdef28edaeabd3e7 (diff)
Introduce CONFIG_XEN_PVHVM compile option
This patch introduce a CONFIG_XEN_PVHVM compile time option to enable/disable Xen PV on HVM support. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/hypervisor.c2
-rw-r--r--arch/x86/xen/Kconfig5
-rw-r--r--arch/x86/xen/enlighten.c2
-rw-r--r--arch/x86/xen/mmu.c2
-rw-r--r--arch/x86/xen/platform-pci-unplug.c2
-rw-r--r--arch/x86/xen/time.c3
6 files changed, 14 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index 5bccedcb9121..8095f8611f8a 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -34,7 +34,7 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] =
34{ 34{
35 &x86_hyper_vmware, 35 &x86_hyper_vmware,
36 &x86_hyper_ms_hyperv, 36 &x86_hyper_ms_hyperv,
37#ifdef CONFIG_XEN 37#ifdef CONFIG_XEN_PVHVM
38 &x86_hyper_xen_hvm, 38 &x86_hyper_xen_hvm,
39#endif 39#endif
40}; 40};
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index b83e119fbeb0..68128a1b401a 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -13,6 +13,11 @@ config XEN
13 kernel to boot in a paravirtualized environment under the 13 kernel to boot in a paravirtualized environment under the
14 Xen hypervisor. 14 Xen hypervisor.
15 15
16config XEN_PVHVM
17 def_bool y
18 depends on XEN
19 depends on X86_LOCAL_APIC
20
16config XEN_MAX_DOMAIN_MEMORY 21config XEN_MAX_DOMAIN_MEMORY
17 int "Maximum allowed size of a domain in gigabytes" 22 int "Maximum allowed size of a domain in gigabytes"
18 default 8 if X86_32 23 default 8 if X86_32
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 75b479a684fd..6f5345378abc 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1282,6 +1282,7 @@ void xen_hvm_init_shared_info(void)
1282 } 1282 }
1283} 1283}
1284 1284
1285#ifdef CONFIG_XEN_PVHVM
1285static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self, 1286static int __cpuinit xen_hvm_cpu_notify(struct notifier_block *self,
1286 unsigned long action, void *hcpu) 1287 unsigned long action, void *hcpu)
1287{ 1288{
@@ -1338,3 +1339,4 @@ const __refconst struct hypervisor_x86 x86_hyper_xen_hvm = {
1338 .init_platform = xen_hvm_guest_init, 1339 .init_platform = xen_hvm_guest_init,
1339}; 1340};
1340EXPORT_SYMBOL(x86_hyper_xen_hvm); 1341EXPORT_SYMBOL(x86_hyper_xen_hvm);
1342#endif
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 84648c1bf138..413b19b3d0fe 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1942,6 +1942,7 @@ void __init xen_init_mmu_ops(void)
1942 pv_mmu_ops = xen_mmu_ops; 1942 pv_mmu_ops = xen_mmu_ops;
1943} 1943}
1944 1944
1945#ifdef CONFIG_XEN_PVHVM
1945static void xen_hvm_exit_mmap(struct mm_struct *mm) 1946static void xen_hvm_exit_mmap(struct mm_struct *mm)
1946{ 1947{
1947 struct xen_hvm_pagetable_dying a; 1948 struct xen_hvm_pagetable_dying a;
@@ -1973,6 +1974,7 @@ void __init xen_hvm_init_mmu_ops(void)
1973 if (is_pagetable_dying_supported()) 1974 if (is_pagetable_dying_supported())
1974 pv_mmu_ops.exit_mmap = xen_hvm_exit_mmap; 1975 pv_mmu_ops.exit_mmap = xen_hvm_exit_mmap;
1975} 1976}
1977#endif
1976 1978
1977#ifdef CONFIG_XEN_DEBUG_FS 1979#ifdef CONFIG_XEN_DEBUG_FS
1978 1980
diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
index 2f7f3fb34777..554c002a1e1a 100644
--- a/arch/x86/xen/platform-pci-unplug.c
+++ b/arch/x86/xen/platform-pci-unplug.c
@@ -32,6 +32,7 @@
32/* store the value of xen_emul_unplug after the unplug is done */ 32/* store the value of xen_emul_unplug after the unplug is done */
33int xen_platform_pci_unplug; 33int xen_platform_pci_unplug;
34EXPORT_SYMBOL_GPL(xen_platform_pci_unplug); 34EXPORT_SYMBOL_GPL(xen_platform_pci_unplug);
35#ifdef CONFIG_XEN_PVHVM
35static int xen_emul_unplug; 36static int xen_emul_unplug;
36 37
37static int __init check_platform_magic(void) 38static int __init check_platform_magic(void)
@@ -133,3 +134,4 @@ static int __init parse_xen_emul_unplug(char *arg)
133 return 0; 134 return 0;
134} 135}
135early_param("xen_emul_unplug", parse_xen_emul_unplug); 136early_param("xen_emul_unplug", parse_xen_emul_unplug);
137#endif
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c
index 4780e55886a5..2aab4a2b9100 100644
--- a/arch/x86/xen/time.c
+++ b/arch/x86/xen/time.c
@@ -516,6 +516,7 @@ __init void xen_init_time_ops(void)
516 x86_platform.set_wallclock = xen_set_wallclock; 516 x86_platform.set_wallclock = xen_set_wallclock;
517} 517}
518 518
519#ifdef CONFIG_XEN_PVHVM
519static void xen_hvm_setup_cpu_clockevents(void) 520static void xen_hvm_setup_cpu_clockevents(void)
520{ 521{
521 int cpu = smp_processor_id(); 522 int cpu = smp_processor_id();
@@ -544,4 +545,4 @@ __init void xen_hvm_init_time_ops(void)
544 x86_platform.get_wallclock = xen_get_wallclock; 545 x86_platform.get_wallclock = xen_get_wallclock;
545 x86_platform.set_wallclock = xen_set_wallclock; 546 x86_platform.set_wallclock = xen_set_wallclock;
546} 547}
547 548#endif