From: Sean Christopherson <seanjc@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: Konstantin Khorenko <khorenko@virtuozzo.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Denis V. Lunev" <den@virtuozzo.com>
Subject: Re: [PATCH 0/1] KVM: x86/vPMU: Speed up vmexit for AMD Zen 4 CPUs
Date: Thu, 9 Nov 2023 17:14:05 -0800 [thread overview]
Message-ID: <ZU2D3f6kc0MDzNR5@google.com> (raw)
In-Reply-To: <ZU1-sTcb2fvU2TYZ@google.com>
On Fri, Nov 10, 2023, Sean Christopherson wrote:
> On Thu, Nov 09, 2023, Jim Mattson wrote:
> > On Thu, Nov 9, 2023 at 3:42 PM Sean Christopherson <seanjc@google.com> wrote:
> > > static inline bool pmc_is_eventsel_match(struct kvm_pmc *pmc, u64 eventsel)
> > > {
> > > return !((pmc->eventsel ^ eventsel) & AMD64_RAW_EVENT_MASK_NB);
> > > }
> >
> > The top nybble of AMD's 3-nybble event select collides with Intel's
> > IN_TX and IN_TXCP bits. I think we can assert that the vCPU can't be
> > in a transaction if KVM is emulating an instruction, but this probably
> > merits a comment.
>
> Argh, more pre-existing crud. This is silly, the vendor mask is already in
> kvm_pmu_ops.EVENTSEL_EVENT. What's one more patch...
Ah, I see what your saying. Checking the bits is actually correct, probably through
sheer dumb luck. I'll expand the comment to cover that and the reserved bits.
prev parent reply other threads:[~2023-11-10 1:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 18:06 [PATCH 0/1] KVM: x86/vPMU: Speed up vmexit for AMD Zen 4 CPUs Konstantin Khorenko
2023-11-09 18:06 ` [PATCH 1/1] KVM: x86/vPMU: Check PMU is enabled for vCPU before searching for PMC Konstantin Khorenko
2023-11-09 20:09 ` Sean Christopherson
2023-11-09 20:13 ` Jim Mattson
2023-11-09 23:05 ` Sean Christopherson
2023-11-09 18:18 ` KVM: x86/vPMU/AMD: Can we detect PMU is off for a VM? Konstantin Khorenko
2023-11-09 22:52 ` Jim Mattson
2023-11-09 23:46 ` Denis V. Lunev
2023-11-10 0:01 ` Dongli Zhang
2023-11-13 9:31 ` Denis V. Lunev
2023-11-13 14:14 ` Dongli Zhang
2023-11-13 14:42 ` Denis V. Lunev
2023-11-13 16:17 ` Dongli Zhang
2023-11-13 16:33 ` Denis V. Lunev
2023-11-10 0:02 ` Jim Mattson
2023-11-09 22:44 ` [PATCH 0/1] KVM: x86/vPMU: Speed up vmexit for AMD Zen 4 CPUs Jim Mattson
2023-11-09 23:42 ` Sean Christopherson
2023-11-10 0:17 ` Jim Mattson
2023-11-10 0:52 ` Sean Christopherson
2023-11-10 1:14 ` Sean Christopherson [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=ZU2D3f6kc0MDzNR5@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=den@virtuozzo.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=khorenko@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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