]> www.infradead.org Git - users/willy/xarray.git/commitdiff
KVM: x86: Move declaration of kvm_spurious_fault() to x86.h
authorUros Bizjak <ubizjak@gmail.com>
Mon, 9 Aug 2021 17:39:55 +0000 (10:39 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 13 Aug 2021 07:35:16 +0000 (03:35 -0400)
Move the declaration of kvm_spurious_fault() to KVM's "private" x86.h,
it should never be called by anything other than low level KVM code.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
[sean: rebased to a series without __ex()/__kvm_handle_fault_on_reboot()]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210809173955.1710866-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/svm_ops.h
arch/x86/kvm/vmx/vmx_ops.h
arch/x86/kvm/x86.h

index 8c8aa8ab5f0bf155a771ceac8dd12eecbd7ded4c..a612d213be5cda5b7d5a2969174e30bc9b07de2b 100644 (file)
@@ -1811,8 +1811,6 @@ enum {
 #define kvm_arch_vcpu_memslots_id(vcpu) ((vcpu)->arch.hflags & HF_SMM_MASK ? 1 : 0)
 #define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, (role).smm)
 
-void kvm_spurious_fault(void);
-
 #define KVM_ARCH_WANT_MMU_NOTIFIER
 
 int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v);
index 8170f2a5a16f7bd1c4acd6748725fec2d1af0273..22e2b019de3787a98b2c8de29920dbf5afcab0a3 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <linux/compiler_types.h>
 
-#include <asm/kvm_host.h>
+#include "x86.h"
 
 #define svm_asm(insn, clobber...)                              \
 do {                                                           \
index c0d74b994b56e7c031474bab051f57890900d7c7..9e9ef47e988c12f66ec3240de8994b1f15c67251 100644 (file)
@@ -4,11 +4,11 @@
 
 #include <linux/nospec.h>
 
-#include <asm/kvm_host.h>
 #include <asm/vmx.h>
 
 #include "evmcs.h"
 #include "vmcs.h"
+#include "x86.h"
 
 asmlinkage void vmread_error(unsigned long field, bool fault);
 __attribute__((regparm(0))) void vmread_error_trampoline(unsigned long field,
index 44ae10312740001a907c96765b09c41c0e8e0614..7d66d63dc55a6dae442fe23818034a5a06aa78d2 100644 (file)
@@ -8,6 +8,8 @@
 #include "kvm_cache_regs.h"
 #include "kvm_emulate.h"
 
+void kvm_spurious_fault(void);
+
 static __always_inline void kvm_guest_enter_irqoff(void)
 {
        /*