]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 17 Jan 2022 15:05:39 +0000 (16:05 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Jan 2022 17:25:46 +0000 (12:25 -0500)
commit6726e065e7bd9d28c6db5f9e2e15bd120ab44f8d
tree984415f8a96b776099ee7acb4ef5596d8a603a49
parent7e46b32355f70a002d46fdbc1829ca0a2ddb7ae8
KVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries

kvm_update_cpuid_runtime() mangles CPUID data coming from userspace
VMM after updating 'vcpu->arch.cpuid_entries', this makes it
impossible to compare an update with what was previously
supplied. Introduce __kvm_update_cpuid_runtime() version which can be
used to tweak the input before it goes to 'vcpu->arch.cpuid_entries'
so the upcoming update check can compare tweaked data.

No functional change intended.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220117150542.2176196-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c