mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Like Xu <like.xu@linux.intel.com>,
	Jim Mattson <jmattson@google.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] KVM: x86/pmu: Support full width counting
Date: Mon, 4 May 2020 18:57:00 +0200	[thread overview]
Message-ID: <aa182eec-3d0b-1452-19cc-20654190a2ae@redhat.com> (raw)
In-Reply-To: <20200427071922.86257-1-like.xu@linux.intel.com>

On 27/04/20 09:19, Like Xu wrote:
> +	if (vmx_supported_perf_capabilities())
> +		kvm_cpu_cap_check_and_set(X86_FEATURE_PDCM);

I think we can always set it, worst case it will be zero.

However, blocking intel_pmu_set_msr altogether is incorrect.  Instead,
you need to:

- list the MSR in msr_based_features_all so that it appears in
KVM_GET_MSR_FEATURE_INDEX_LIST

- return the supported bits in vmx_get_msr_feature

- allow host-initiated writes (as long as they only set supported bits)
of the MSR in intel_pmu_set_msr.

Thanks,

Paolo


  reply	other threads:[~2020-05-04 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  7:19 Like Xu
2020-05-04 16:57 ` Paolo Bonzini [this message]
2020-05-07  2:22   ` Xu, Like

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=aa182eec-3d0b-1452-19cc-20654190a2ae@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=like.xu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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

Powered by JetHome