From: Borislav Petkov <bp@suse.de>
Date: Fri May 25 19:24:16 CEST 2018
Subject: kabi: Fix kvm kABI
Patch-mainline: no, SUSE-specific
References: bsc#1087082 CVE-2018-3639
... due to
bc226f07dcd3 ("KVM: SVM: Implement VIRT_SPEC_CTRL support for SSBD")
changing kvm_x86_ops' member.
[js] hopefully there are no out-of-tree drivers to define struct
kvm_x86_ops globally (like svm and vmx do).
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/include/asm/kvm_host.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -938,7 +938,7 @@ struct kvm_x86_ops {
int (*hardware_setup)(void); /* __init */
void (*hardware_unsetup)(void); /* __exit */
bool (*cpu_has_accelerated_tpr)(void);
- bool (*has_emulated_msr)(int index);
+ bool (*cpu_has_high_real_mode_segbase)(void);
void (*cpuid_update)(struct kvm_vcpu *vcpu);
struct kvm *(*vm_alloc)(void);
@@ -1106,6 +1106,11 @@ struct kvm_x86_ops {
int (*get_msr_feature)(struct kvm_msr_entry *entry);
+
+#ifndef __GENKSYMS__
+ bool (*has_emulated_msr)(int index);
+#endif
+
bool (*need_emulation_on_page_fault)(struct kvm_vcpu *vcpu);
};