summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorZhenzhong Duan2019-07-11 14:02:09 +0200
committerJuergen Gross2019-07-17 08:09:58 +0200
commit30978346372e5c43a652cfbd4533c6bd5427c33b (patch)
tree0fb7e6a976d391af1469f7c4e210bef06e7ef5cb /arch/x86/include
parentx86/xen: Mark xen_hvm_need_lapic() and xen_x2apic_para_available() as __init (diff)
downloadkernel-qcow2-linux-30978346372e5c43a652cfbd4533c6bd5427c33b.tar.gz
kernel-qcow2-linux-30978346372e5c43a652cfbd4533c6bd5427c33b.tar.xz
kernel-qcow2-linux-30978346372e5c43a652cfbd4533c6bd5427c33b.zip
x86: Add "nopv" parameter to disable PV extensions
In virtualization environment, PV extensions (drivers, interrupts, timers, etc) are enabled in the majority of use cases which is the best option. However, in some cases (kexec not fully working, benchmarking) we want to disable PV extensions. We have "xen_nopv" for that purpose but only for XEN. For a consistent admin experience a common command line parameter "nopv" set across all PV guest implementations is a better choice. There are guest types which just won't work without PV extensions, like Xen PV, Xen PVH and jailhouse. add a "ignore_nopv" member to struct hypervisor_x86 set to true for those guest types and call the detect functions only if nopv is false or ignore_nopv is true. Suggested-by: Juergen Gross <jgross@suse.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com> Reviewed-by: Juergen Gross <jgross@suse.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/hypervisor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index 50a30f6c668b..f7b4c5338428 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -53,8 +53,12 @@ struct hypervisor_x86 {
/* runtime callbacks */
struct x86_hyper_runtime runtime;
+
+ /* ignore nopv parameter */
+ bool ignore_nopv;
};
+extern bool nopv;
extern enum x86_hypervisor_type x86_hyper_type;
extern void init_hypervisor_platform(void);
static inline bool hypervisor_is_type(enum x86_hypervisor_type type)