linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Like Xu <like.xu.linux@gmail.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] KVM: x86/svm/pmu: Add AMD PerfMonV2 support
Date: Wed, 9 Nov 2022 17:54:42 +0800	[thread overview]
Message-ID: <107f4040-e4cd-82df-01bc-f0d6a22be053@gmail.com> (raw)
In-Reply-To: <Y1sKf/PgwHwtAibK@google.com>

On 28/10/2022 6:47 am, Sean Christopherson wrote:
> What happens if userspace sets X86_FEATURE_PERFCTR_CORE when its not supported?
> E.g. will KVM be coerced into taking a #GP on a non-existent counter?

I'm getting a bit tired of this generic issue, what does KVM need to do when the 
KVM user space
sets a capability that KVM doesn't support (like cpuid). Should it change the 
guest cpuid audibly
or silently ? Should it report an error when the guest uses this unsupported 
capability at run time,
or should it just let the KVM report an error when user space setting the cpuid ?

For vPMU, I may prefer to report an error when setting the vpmu capability (via 
cpuid or perf_cap).

Please let me know what you think and make it law as an example to others.

Thanks,
Like Xu

  reply	other threads:[~2022-11-09  9:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  9:34 [PATCH v2 0/3] KVM: x86: Add AMD Guest PerfMonV2 PMU support Like Xu
2022-09-19  9:34 ` [PATCH v2 1/3] KVM: x86/pmu: Make part of the Intel v2 PMU MSRs handling x86 generic Like Xu
2022-09-22  0:20   ` Jim Mattson
2022-09-22  5:47     ` Like Xu
2022-09-22  6:20       ` Like Xu
2022-10-27 22:14         ` Sean Christopherson
2022-10-07 22:19       ` Sean Christopherson
2022-10-27 22:10   ` Sean Christopherson
2022-09-19  9:34 ` [PATCH v2 2/3] KVM: x86/svm/pmu: Add AMD PerfMonV2 support Like Xu
2022-09-21  0:06   ` Jim Mattson
2022-10-27 22:47   ` Sean Christopherson
2022-11-09  9:54     ` Like Xu [this message]
2022-11-09 14:51       ` Sean Christopherson
2022-09-19  9:34 ` [PATCH v2 3/3] KVM: x86/cpuid: Add AMD CPUID ExtPerfMonAndDbg leaf 0x80000022 Like Xu
2022-09-21  0:02   ` Jim Mattson
2022-10-27 22:37   ` Sean Christopherson
2022-11-10  9:26     ` Like Xu
2022-11-10 17:34       ` Sean Christopherson

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=107f4040-e4cd-82df-01bc-f0d6a22be053@gmail.com \
    --to=like.xu.linux@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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;
as well as URLs for NNTP newsgroup(s).