On Fri, May 8, 2020 at 7:57 PM Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote: > > On Fri, May 08, 2020 at 08:27:53AM +0200, Uros Bizjak wrote: > > Move the definition of __ex to a common include to be > > shared between VMX and SVM. > > > > Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> > > Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx> > > --- > > arch/x86/include/asm/kvm_host.h | 2 ++ > > arch/x86/kvm/svm/svm.c | 2 -- > > arch/x86/kvm/vmx/ops.h | 2 -- > > 3 files changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > > index 35a915787559..4df0c07b0a62 100644 > > --- a/arch/x86/include/asm/kvm_host.h > > +++ b/arch/x86/include/asm/kvm_host.h > > @@ -1620,6 +1620,8 @@ asmlinkage void kvm_spurious_fault(void); > > "668: \n\t" \ > > _ASM_EXTABLE(666b, 667b) > > > > +#define __ex(x) __kvm_handle_fault_on_reboot(x) > > Moving this to asm/kvm_host.h is a bit sketchy as __ex() isn't exactly the > most unique name. arch/x86/kvm/x86.h would probably be a better > destination as it's "private". __ex() is only used in vmx.c, nested.c and > svm.c, all of which already include x86.h. I have put this define nearby __kvm_handle_fault_on_reboot, as __ex is its sole user. OTOH, it looks that __kvm_handle_fault_on_reboot definition and kvm_spurious_fault prototype can both be moved to x86.h. Uros.