[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fe374ae-9611-1f29-32f0-e8fce126cd41@redhat.com>
Date: Fri, 19 Jul 2019 23:41:20 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: "H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/5] KVM: x86: Don't check kvm_rebooting in
__kvm_handle_fault_on_reboot()
On 19/07/19 22:41, Sean Christopherson wrote:
> Remove the kvm_rebooting check from VMX/SVM instruction exception fixup
> now that kvm_spurious_fault() conditions its BUG() on !kvm_rebooting.
> Because the 'cleanup_insn' functionally is also gone, deferring to
> kvm_spurious_fault() means __kvm_handle_fault_on_reboot() can eliminate
> its .fixup code entirely and have its exception table entry branch
> directly to the call to kvm_spurious_fault().
>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Josh Poimboeuf <jpoimboe@...hat.com>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@...el.com>
> ---
> arch/x86/include/asm/kvm_host.h | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 92c59cd923b6..a5ae5562ce0a 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -1511,13 +1511,7 @@ asmlinkage void kvm_spurious_fault(void);
> "667: \n\t" \
> "call kvm_spurious_fault \n\t" \
> "668: \n\t" \
> - ".pushsection .fixup, \"ax\" \n\t" \
> - "700: \n\t" \
> - "cmpb $0, kvm_rebooting\n\t" \
> - "je 667b \n\t" \
> - "jmp 668b \n\t" \
> - ".popsection \n\t" \
> - _ASM_EXTABLE(666b, 700b)
> + _ASM_EXTABLE(666b, 667b)
>
> #define KVM_ARCH_WANT_MMU_NOTIFIER
> int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end);
>
Acked-by: Paolo Bonzini <pbonzini@...hat.com>
Powered by blists - more mailing lists