diff options
author | Sean Christopherson <seanjc@google.com> | 2024-11-28 04:33:59 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-12-19 01:19:55 +0300 |
commit | 63d8c702c2d41d070c84d97069a71ade808f8054 (patch) | |
tree | e3a04acbce29baaf8428524910e49ee416dc37b1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 8c01290bda1ab957c0b6d4640bdb351985a26123 (diff) | |
download | linux-63d8c702c2d41d070c84d97069a71ade808f8054.tar.xz |
KVM: x86: Clear PV_UNHALT for !HLT-exiting only when userspace sets CPUID
Now that KVM disallows disabling HLT-exiting after vCPUs have been created,
i.e. now that it's impossible for kvm_hlt_in_guest() to change while vCPUs
are running, apply KVM's PV_UNHALT quirk only when userspace is setting
guest CPUID.
Opportunistically rename the helper to make it clear that KVM's behavior
is a quirk that should never have been added. KVM's documentation
explicitly states that userspace should not advertise PV_UNHALT if
HLT-exiting is disabled, but for unknown reasons, commit caa057a2cad6
("KVM: X86: Provide a capability to disable HLT intercepts") didn't stop
at documenting the requirement and also massaged the incoming guest CPUID.
Unfortunately, it's quite likely that userspace has come to rely on KVM's
behavior, i.e. the code can't simply be deleted. The only reason KVM
doesn't have an "official" quirk is that there is no known use case where
disabling the quirk would make sense, i.e. letting userspace disable the
quirk would further increase KVM's burden without any benefit.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-33-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions