All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wei Huang <wehuang@redhat.com>, kvm@vger.kernel.org
Cc: gleb@kernel.org
Subject: Re: [PATCH 1/1] KVM: SVM: add rdmsr support for AMD event registers
Date: Mon, 18 Aug 2014 10:36:28 +0200	[thread overview]
Message-ID: <53F1BB0C.9000504@redhat.com> (raw)
In-Reply-To: <1407945974-27300-1-git-send-email-wehuang@redhat.com>

Il 13/08/2014 18:06, Wei Huang ha scritto:
> Current KVM only supports RDMSR for K7_EVNTSEL0 and K7_PERFCTR0
> MSRs. Reading the rest MSRs will trigger KVM to inject #GP into
> guest VM. This causes a warning message "Failed to access perfctr
> msr (MSR c0010001 is ffffffffffffffff)" on AMD host. This patch
> adds RDMSR support for all K7_EVNTSELn and K7_PERFCTRn registers
> and thus supresses the warning message.
> 
> Signed-off-by: Wei Huang <wehuang@redhat.com>
> ---
>  arch/x86/kvm/x86.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index ef432f8..3f10ca2 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2399,7 +2399,13 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
>  	case MSR_K7_HWCR:
>  	case MSR_VM_HSAVE_PA:
>  	case MSR_K7_EVNTSEL0:
> +	case MSR_K7_EVNTSEL1:
> +	case MSR_K7_EVNTSEL2:
> +	case MSR_K7_EVNTSEL3:
>  	case MSR_K7_PERFCTR0:
> +	case MSR_K7_PERFCTR1:
> +	case MSR_K7_PERFCTR2:
> +	case MSR_K7_PERFCTR3:
>  	case MSR_K8_INT_PENDING_MSG:
>  	case MSR_AMD64_NB_CFG:
>  	case MSR_FAM10H_MMIO_CONF_BASE:
> 

Thanks, applying for 3.18.

Paolo

  reply	other threads:[~2014-08-18  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 16:06 [PATCH 1/1] KVM: SVM: add rdmsr support for AMD event registers Wei Huang
2014-08-18  8:36 ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-08-13 15:58 Wei Huang
2014-08-13 16:04 ` Wei Huang

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=53F1BB0C.9000504@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=wehuang@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.