diff options
| author | Vishal Annapurve <vannapurve@google.com> | 2026-05-22 18:15:34 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-27 01:13:54 +0300 |
| commit | 986833d381d2c48bdfa52652006f445570aea0e4 (patch) | |
| tree | 3762fb5e9a3b91f17512ceb5797b30777fda047f /scripts | |
| parent | 0de1020f7bbb3e1c9cd5b6f3eb4bdd661b1ff735 (diff) | |
| download | linux-986833d381d2c48bdfa52652006f445570aea0e4.tar.xz | |
KVM: x86: Treat KVM's virtual PMU as disabled for TDX VMs
Introduce a "protected PMU" concept, and use it to disable KVM's virtual
PMU for TDX VMs, as the PMU state for TDX VMs is virtualized by the TDX
Module[1], i.e. _can't_ emulated/virtualized by KVM, and KVM doesn't yet
support enabling/exposing PMU functionality for/to TDX VMs. For now,
simply treat the PMU as disabled, as it's not clear what all needs to be
changed, e.g. KVM needs to do at least:
1) Configure TD_PARAMS to allow guests to use performance monitoring.
2) Restrict the TD to a subset of the PEBS counters if supported.
3) Limit the TD to setup a certain perfmon events using basic/enhanced
event filtering.
Explicitly disallow enabling the PMU via KVM_CAP_PMU_CAPABILITY for VMs
with a protected PMU to prevent userspace from circumventing KVM's
protections.
Link: https://cdrdv2.intel.com/v1/dl/getContent/733575 Section 15.2[1]
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vishal Annapurve <vannapurve@google.com>
Link: https://patch.msgid.link/20260522151534.652522-1-vannapurve@google.com
[sean: massage shortlog and changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
