diff options
author | Sean Christopherson <seanjc@google.com> | 2024-11-28 04:33:58 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-12-19 01:19:54 +0300 |
commit | 8c01290bda1ab957c0b6d4640bdb351985a26123 (patch) | |
tree | 4a63dd8982ff0ccc61a471f49a11571c055c6598 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 6174004ebd2508556204255757fd77fbc10009f9 (diff) | |
download | linux-8c01290bda1ab957c0b6d4640bdb351985a26123.tar.xz |
KVM: x86: Swap incoming guest CPUID into vCPU before massaging in KVM_SET_CPUID2
When handling KVM_SET_CPUID{,2}, swap the old and new CPUID arrays and
lengths before processing the new CPUID, and simply undo the swap if
setting the new CPUID fails for whatever reason.
To keep the diff reasonable, continue passing the entry array and length
to most helpers, and defer the more complete cleanup to future commits.
For any sane VMM, setting "bad" CPUID state is not a hot path (or even
something that is surviable), and setting guest CPUID before it's known
good will allow removing all of KVM's infrastructure for processing CPUID
entries directly (as opposed to operating on vcpu->arch.cpuid_entries).
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-32-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