diff options
author | Sean Christopherson <seanjc@google.com> | 2024-11-28 04:33:35 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-12-19 01:19:29 +0300 |
commit | a2a791e8208623b1575f21c7ec559df095c0a96e (patch) | |
tree | 99340378928ab30be9a5d27640a4817477c6779c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 08833719e77041e331f6193878f1b944744b9068 (diff) | |
download | linux-a2a791e8208623b1575f21c7ec559df095c0a96e.tar.xz |
KVM: selftests: Refresh vCPU CPUID cache in __vcpu_get_cpuid_entry()
Refresh selftests' CPUID cache in the vCPU structure when querying a CPUID
entry so that tests don't consume stale data when KVM modifies CPUID as a
side effect to a completely unrelated change. E.g. KVM adjusts OSXSAVE in
response to CR4.OSXSAVE changes.
Unnecessarily invoking KVM_GET_CPUID is suboptimal, but vcpu->cpuid exists
to simplify selftests development, not for performance reasons. And,
unfortunately, trying to handle the side effects in tests or other flows
is unpleasant, e.g. selftests could manually refresh if KVM_SET_SREGS is
successful, but that would still leave a gap with respect to guest CR4
changes.
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-9-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