Messages in this thread | | | From | Jim Mattson <> | Date | Thu, 12 May 2022 15:43:38 -0700 | Subject | Re: [PATCH 1/3] KVM: x86: Signal #GP, not -EPERM, on bad WRMSR(MCi_CTL/STATUS) |
| |
On Thu, May 12, 2022 at 3:27 PM Sean Christopherson <seanjc@google.com> wrote: > > Return '1', not '-1', when handling an illegal WRMSR to a MCi_CTL or > MCi_STATUS MSR. The behavior of "all zeros' or "all ones" for CTL MSRs > is architectural, as is the "only zeros" behavior for STATUS MSRs. I.e. > the intent is to inject a #GP, not exit to userspace due to an unhandled > emulation case. Returning '-1' gets interpreted as -EPERM up the stack > and effecitvely kills the guest. > > Fixes: 890ca9aefa78 ("KVM: Add MCE support") > Fixes: 9ffd986c6e4e ("KVM: X86: #GP when guest attempts to write MCi_STATUS register w/o 0") > Cc: stable@vger.kernel.org > Signed-off-by: Sean Christopherson <seanjc@google.com> > --- Reviewed-by: Jim Mattson <jmattson@google.com>
| |