From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>,
Jim Mattson <jmattson@google.com>
Cc: Marc Orr <marcorr@google.com>,
kvm@vger.kernel.org,
Sean Christopherson <sean.j.christopherson@intel.com>
Subject: Re: [PATCH] kvm: vmx: Limit guest PMCs to those supported on the host
Date: Tue, 1 Oct 2019 15:28:49 +0200 [thread overview]
Message-ID: <08e172b2-eb75-04af-0b63-b0516c8455e1@redhat.com> (raw)
In-Reply-To: <87blv03dm7.fsf@vitty.brq.redhat.com>
On 01/10/19 13:32, Vitaly Kuznetsov wrote:
> Jim Mattson <jmattson@google.com> writes:
>
>> KVM can only virtualize as many PMCs as the host supports.
>>
>> Limit the number of generic counters and fixed counters to the number
>> of corresponding counters supported on the host, rather than to
>> INTEL_PMC_MAX_GENERIC and INTEL_PMC_MAX_FIXED, respectively.
>>
>> Note that INTEL_PMC_MAX_GENERIC is currently 32, which exceeds the 18
>> contiguous MSR indices reserved by Intel for event selectors. Since
>> the existing code relies on a contiguous range of MSR indices for
>> event selectors, it can't possibly work for more than 18 general
>> purpose counters.
>
> Should we also trim msrs_to_save[] by removing impossible entries
> (18-31) then?
Yes, I'll send a patch in a second.
Paolo
next prev parent reply other threads:[~2019-10-01 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 23:38 [PATCH] kvm: vmx: Limit guest PMCs to those supported on the host Jim Mattson
2019-10-01 11:32 ` Vitaly Kuznetsov
2019-10-01 13:28 ` Paolo Bonzini [this message]
2019-10-01 14:07 ` Jim Mattson
2019-10-01 14:24 ` Paolo Bonzini
2019-10-01 14:30 ` Jim Mattson
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=08e172b2-eb75-04af-0b63-b0516c8455e1@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=marcorr@google.com \
--cc=sean.j.christopherson@intel.com \
--cc=vkuznets@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox