public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Matthias Lange <matthias.lange@kernkonzept.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: svm: writes to MSR_K7_HWCR generates GPE in guest
Date: Wed, 09 Jul 2014 18:20:27 +0200	[thread overview]
Message-ID: <53BD6BCB.7070607@redhat.com> (raw)
In-Reply-To: <1403783415-30721-2-git-send-email-matthias.lange@kernkonzept.com>

Il 26/06/2014 13:50, Matthias Lange ha scritto:
> Since commit 575203 the MCE subsystem in the Linux kernel for AMD sets bit 18
> in MSR_K7_HWCR. Running such a kernel as a guest in KVM on an AMD host results
> in a GPE injected into the guest because kvm_set_msr_common returns 1. This
> patch fixes this by masking bit 18 from the MSR value desired by the guest.
>
> Signed-off-by: Matthias Lange <matthias.lange@kernkonzept.com>
> ---
>  arch/x86/kvm/x86.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 57eac30..24d70d4 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2029,6 +2029,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>  		data &= ~(u64)0x40;	/* ignore flush filter disable */
>  		data &= ~(u64)0x100;	/* ignore ignne emulation enable */
>  		data &= ~(u64)0x8;	/* ignore TLB cache disable */
> +		data &= ~(u64)0x40000;  /* ignore Mc status write enable */
>  		if (data != 0) {
>  			vcpu_unimpl(vcpu, "unimplemented HWCR wrmsr: 0x%llx\n",
>  				    data);
>

Thanks, looks good -- I queued it locally for now until I can test it on 
AMD.

Paolo

      reply	other threads:[~2014-07-09 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 11:50 [PATCH] KVM: svm: writes to MSR_K7_HWCR generates GPE in guest Matthias Lange
2014-06-26 11:50 ` Matthias Lange
2014-07-09 16:20   ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BD6BCB.7070607@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=matthias.lange@kernkonzept.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox