summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorZhenzhong Duan2019-07-16 06:26:09 +0200
committerJuergen Gross2019-07-17 08:09:59 +0200
commitbef6e0ae7420bfddfb150dda529bbe835f87b9f2 (patch)
tree0a40c3408e37c9ddb6579f23d3d7f84f57807be4 /arch/x86/kernel
parentx86/paravirt: Remove const mark from x86_hyper_xen_hvm variable (diff)
downloadkernel-qcow2-linux-bef6e0ae7420bfddfb150dda529bbe835f87b9f2.tar.gz
kernel-qcow2-linux-bef6e0ae7420bfddfb150dda529bbe835f87b9f2.tar.xz
kernel-qcow2-linux-bef6e0ae7420bfddfb150dda529bbe835f87b9f2.zip
x86/xen: Add "nopv" support for HVM guest
PVH guest needs PV extentions to work, so "nopv" parameter should be ignored for PVH but not for HVM guest. If PVH guest boots up via the Xen-PVH boot entry, xen_pvh is set early, we know it's PVH guest and ignore "nopv" parameter directly. If PVH guest boots up via the normal boot entry same as HVM guest, it's hard to distinguish PVH and HVM guest at that time. In this case, we have to panic early if PVH is detected and nopv is enabled to avoid a worse situation later. Remove static from bool_x86_init_noop/x86_op_int_noop so they could be used globally. Move xen_platform_hvm() after xen_hvm_guest_late_init() to avoid compile error. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Juergen Gross <jgross@suse.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/x86_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 50a2b492fdd6..1bef687faf22 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -29,8 +29,8 @@ void x86_init_noop(void) { }
void __init x86_init_uint_noop(unsigned int unused) { }
static int __init iommu_init_noop(void) { return 0; }
static void iommu_shutdown_noop(void) { }
-static bool __init bool_x86_init_noop(void) { return false; }
-static void x86_op_int_noop(int cpu) { }
+bool __init bool_x86_init_noop(void) { return false; }
+void x86_op_int_noop(int cpu) { }
/*
* The platform setup functions are preset with the default functions