[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALMp9eQ9_nkK35T2vS+=ujiRAO2kiYJcZLUFSeizWmAc89zjXg@mail.gmail.com>
Date: Thu, 13 Jun 2019 10:24:58 -0700
From: Jim Mattson <jmattson@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kvm list <kvm@...r.kernel.org>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>, stable@...r.kernel.org
Subject: Re: [PATCH 01/43] KVM: VMX: Fix handling of #MC that occurs during VM-Entry
On Thu, Jun 13, 2019 at 10:03 AM Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> From: Sean Christopherson <sean.j.christopherson@...el.com>
>
> A previous fix to prevent KVM from consuming stale VMCS state after a
> failed VM-Entry inadvertantly blocked KVM's handling of machine checks
> that occur during VM-Entry.
>
> Per Intel's SDM, a #MC during VM-Entry is handled in one of three ways,
> depending on when the #MC is recognoized. As it pertains to this bug
> fix, the third case explicitly states EXIT_REASON_MCE_DURING_VMENTRY
> is handled like any other VM-Exit during VM-Entry, i.e. sets bit 31 to
> indicate the VM-Entry failed.
>
> If a machine-check event occurs during a VM entry, one of the following occurs:
> - The machine-check event is handled as if it occurred before the VM entry:
> ...
> - The machine-check event is handled after VM entry completes:
> ...
> - A VM-entry failure occurs as described in Section 26.7. The basic
> exit reason is 41, for "VM-entry failure due to machine-check event".
>
> Explicitly handle EXIT_REASON_MCE_DURING_VMENTRY as a one-off case in
> vmx_vcpu_run() instead of binning it into vmx_complete_atomic_exit().
> Doing so allows vmx_vcpu_run() to handle VMX_EXIT_REASONS_FAILED_VMENTRY
> in a sane fashion and also simplifies vmx_complete_atomic_exit() since
> VMCS.VM_EXIT_INTR_INFO is guaranteed to be fresh.
>
> Fixes: b060ca3b2e9e7 ("kvm: vmx: Handle VMLAUNCH/VMRESUME failure properly")
I'm never going to live down that subject line, am I? :-)
Reviewed-by: Jim Mattson <jmattson@...gle.com>
Powered by blists - more mailing lists