From: David Hildenbrand Subject: Re: [PATCH] kvm: vmx: Properly handle machine check during VM-entry Date: Fri, 19 May 2017 15:39:12 +0200 Message-ID: References: <20170518230239.86518-1-jmattson@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Jim Mattson , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42570 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbdESNjO (ORCPT ); Fri, 19 May 2017 09:39:14 -0400 In-Reply-To: <20170518230239.86518-1-jmattson@google.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 19.05.2017 01:02, Jim Mattson wrote: > When bit 31 of the exit reason is set to indicate a VM-entry failure, > only the exit reason and exit qualification fields are set. All other > VM-exit information fields, including "VM-exit interruption > information," are unmodified. > > Fixes: 00eba012d53e6 ("KVM: VMX: Refactor vmx_complete_atomic_exit()") > Signed-off-by: Jim Mattson > --- > arch/x86/kvm/vmx.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index c6f4ad44aa95..e73977ec15df 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -8624,7 +8624,8 @@ static void vmx_complete_atomic_exit(struct vcpu_vmx *vmx) > exit_intr_info = vmx->exit_intr_info; > > /* Handle machine checks before interrupts are enabled */ > - if (is_machine_check(exit_intr_info)) > + if (vmx->exit_reason == EXIT_REASON_MCE_DURING_VMENTRY || > + is_machine_check(exit_intr_info)) > kvm_machine_check(); > > /* We need to handle NMIs before interrupts are enabled */ > This looks sane to me! -- Thanks, David