Commit 65297341 authored by Uros Bizjak's avatar Uros Bizjak Committed by Paolo Bonzini
Browse files

KVM: x86: Move declaration of kvm_spurious_fault() to x86.h



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: default avatarUros Bizjak <ubizjak@gmail.com>
[sean: rebased to a series without __ex()/__kvm_handle_fault_on_reboot()]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210809173955.1710866-3-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ad0577c3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

#include <linux/compiler_types.h>

#include <asm/kvm_host.h>
#include "x86.h"

#define svm_asm(insn, clobber...)				\
do {								\
+1 −1
Original line number Diff line number Diff line
@@ -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,
+2 −0
Original line number Diff line number Diff line
@@ -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)
{
	/*