From: Aaron Lewis <aaronlewis@google.com>
To: Jim Mattson <jmattson@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, seanjc@google.com
Subject: Re: [PATCH v4 7/7] selftests: kvm/x86: Test masked events
Date: Tue, 20 Sep 2022 15:24:27 +0000 [thread overview]
Message-ID: <CAAAPnDGho40t6K5MTjZtQ4==bpdcsnDEVv=e3Y4fLuhQ6NMDKQ@mail.gmail.com> (raw)
In-Reply-To: <CALMp9eR0mC3VTFkUv1USHcG_9gANG3OzyzcXPo4EsXwtv4vN8Q@mail.gmail.com>
>
>
> > +static bool supports_event_mem_inst_retired(void)
> > +{
> > + uint32_t eax, ebx, ecx, edx;
> > +
> > + cpuid(1, &eax, &ebx, &ecx, &edx);
> > + assert(x86_family(eax) == 0x6);
>
> This seems aggressive. Even if Linux no longer runs on Pentium 4, what
> about Xeon Phi?
>
I'll make it a branch.
> > @@ -505,6 +826,13 @@ int main(int argc, char *argv[])
> > test_not_member_deny_list(vcpu);
> > test_not_member_allow_list(vcpu);
> >
> > + if (use_intel_pmu() && supports_event_mem_inst_retired())
>
> Do we need to verify that 3 or more general purpose counters are available?
I'll add a check for that.
>
> > + vcpu2 = vm_vcpu_add(vm, 2, intel_masked_events_guest_code);
> > + else if (use_amd_pmu())
>
> Do we need to verify that the CPU is Zen[123]?
use_amd_pmu() does that already.
prev parent reply other threads:[~2022-09-20 15:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 16:21 [PATCH v4 0/7] Introduce and test masked events Aaron Lewis
2022-08-31 16:21 ` [PATCH v4 1/7] kvm: x86/pmu: Correct the mask used in a pmu event filter lookup Aaron Lewis
2022-09-14 18:15 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 2/7] kvm: x86/pmu: Remove invalid raw events from the pmu event filter Aaron Lewis
2022-09-14 18:17 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 3/7] kvm: x86/pmu: prepare the pmu event filter for masked events Aaron Lewis
2022-09-14 18:25 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 4/7] kvm: x86/pmu: Introduce masked events to the pmu event filter Aaron Lewis
2022-09-14 18:45 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 5/7] selftests: kvm/x86: Add flags when creating a " Aaron Lewis
2022-09-14 18:47 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 6/7] selftests: kvm/x86: Add testing for KVM_SET_PMU_EVENT_FILTER Aaron Lewis
2022-09-14 19:00 ` Jim Mattson
2022-08-31 16:21 ` [PATCH v4 7/7] selftests: kvm/x86: Test masked events Aaron Lewis
2022-09-14 20:12 ` Jim Mattson
2022-09-20 15:24 ` Aaron Lewis [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='CAAAPnDGho40t6K5MTjZtQ4==bpdcsnDEVv=e3Y4fLuhQ6NMDKQ@mail.gmail.com' \
--to=aaronlewis@google.com \
--cc=jmattson@google.com \
--cc=kvm@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).