[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABOYuvZ9SZAWeRkrhhhpMM4XwzMzXv9A1WDpc6z8SUBquf0SFQ@mail.gmail.com>
Date: Thu, 10 Feb 2022 11:55:45 -0800
From: David Dunn <daviddunn@...gle.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Jim Mattson <jmattson@...gle.com>,
Dave Hansen <dave.hansen@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Like Xu <like.xu.linux@...il.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Like Xu <likexu@...cent.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH kvm/queue v2 2/3] perf: x86/core: Add interface to query
perfmon_event_map[] directly
Kan,
On Thu, Feb 10, 2022 at 11:46 AM Liang, Kan <kan.liang@...ux.intel.com> wrote:
> No, we don't, at least for Linux. Because the host own everything. It
> doesn't need the MSR to tell which one is in use. We track it in an SW way.
>
> For the new request from the guest to own a counter, I guess maybe it is
> worth implementing it. But yes, the existing/legacy guest never check
> the MSR.
This is the expectation of all software that uses the PMU in every
guest. It isn't just the Linux perf system.
The KVM vPMU model we have today results in the PMU utilizing software
simply not working properly in a guest. The only case that can
consistently "work" today is not giving the guest a PMU at all.
And that's why you are hearing requests to gift the entire PMU to the
guest while it is running. All existing PMU software knows about the
various constraints on exactly how each MSR must be used to get sane
data. And by gifting the entire PMU it allows that software to work
properly. But that has to be controlled by policy at host level such
that the owner of the host knows that they are not going to have PMU
visibility into guests that have control of PMU.
Dave Dunn
Powered by blists - more mailing lists