]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Set EDX at INIT with CPUID.0x1, Family-Model-Stepping
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:32:42 +0000 (09:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:49 +0000 (11:01 -0400)
commit2083742e4fdc71666b8847d4d7770705cc6fba44
treef7429a74cff4e3faca66fd0905def61934091265
parentc2f4d9e99adc409f26440f5f0dbcfaf6a461d03f
KVM: VMX: Set EDX at INIT with CPUID.0x1, Family-Model-Stepping

Set EDX at RESET/INIT based on the userspace-defined CPUID model when
possible, i.e. when CPUID.0x1.EAX is defind by userspace.  At RESET/INIT,
all CPUs that support CPUID set EDX to the FMS enumerated in
CPUID.0x1.EAX.  If no CPUID match is found, fall back to KVM's default
of 0x600 (Family '6'), which is the least awful approximation of KVM's
virtual CPU model.

Fixes: b4d1853ff20b ("[PATCH] kvm: userspace interface")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c