Sean Christopherson 957d0f70e9 KVM: x86/pmu: Zero out LBR capabilities during PMU refresh
Zero out the LBR capabilities during PMU refresh to avoid exposing LBRs
to the guest against userspace's wishes. If userspace modifies the
guest's CPUID model or invokes KVM_CAP_PMU_CAPABILITY to disable vPMU
after an initial KVM_SET_CPUID2, but before the first KVM_RUN, KVM will
retain the previous LBR info due to bailing before refreshing the LBR
descriptor.

Note, this is a very theoretical bug, there is no known use case where a
VMM would deliberately enable the vPMU via KVM_SET_CPUID2, and then later
disable the vPMU.

Link: https://lore.kernel.org/r/20230311004618.920745-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-04-06 14:58:43 -07:00
..
2023-02-26 11:53:25 -08:00
2023-02-25 09:11:30 -08:00
2023-03-02 09:45:34 -08:00
2023-02-25 11:30:21 -08:00
2023-03-23 16:10:01 -07:00
2022-04-14 14:09:43 +02:00
2023-02-21 17:07:39 -08:00
2022-07-25 10:32:32 +02:00
2023-01-25 12:21:04 +01:00