Re: [Patch v4 07/13] perf/x86: Add constraint for guest perf metrics event

From: Namhyung Kim
Date: Sat Sep 30 2023 - 20:41:46 EST


Hello,

On Fri, Sep 29, 2023 at 8:29 PM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
> For things to work well in the "vPMU as a client of host perf" world,
> we need to have the following at a minimum:
> 1) Guaranteed identity mapping of guest PMCs to host PMCs, so that we
> don't have to intercept accesses to IA32_PERF_GLOBAL_CTRL.
> 2) Exclusive ownership of the PMU MSRs while in the KVM_RUN loop, so
> that we don't have to switch any PMU MSRs on VM-entry/VM-exit (with
> the exception of IA32_PERF_GLOBAL_CTRL, which has guest and host
> fields in the VMCS).

IIUC that means multiplexing should be handled in the guest.
Not sure it can support mixing host and guest events at the
same time.

Thanks,
Namhyung