Re: [PATCH v2 04/22] x86/kvm: Don't call kvm_spurious_fault() from .fixup
From: Josh Poimboeuf
Date: Thu Jul 18 2019 - 10:03:25 EST
On Thu, Jul 18, 2019 at 06:16:54AM -0700, Sean Christopherson wrote:
> > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> > > index 0cc5b611a113..8282b8d41209 100644
> > > --- a/arch/x86/include/asm/kvm_host.h
> > > +++ b/arch/x86/include/asm/kvm_host.h
> > > @@ -1496,25 +1496,29 @@ 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)
> > >
> > > +asmlinkage void __noreturn kvm_spurious_fault(void);
>
> With __noreturn added, can the entry in __dead_end_function() in
> tools/objtool/check.c be removed?
No, that's actually still needed because objtool can't see the
__noreturn annotation. So it still needs to know that the "call
kvm_spurious_fault" doesn't return.
--
Josh