]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: do not reset microcode version on INIT or RESET
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Feb 2020 17:40:58 +0000 (18:40 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 12 Feb 2020 08:25:37 +0000 (09:25 +0100)
commitc4ab361b50a89b6430556fb9396883b0870ab3c8
tree62cc4b32e5e9ad2c06348cdb2749ec043ff04c25
parent900abd43b6d837ba70928a9ee9599ba3be1d2fb6
KVM: x86: do not reset microcode version on INIT or RESET

Do not initialize the microcode version at RESET or INIT, only on vCPU
creation.   Microcode updates are not lost during INIT, and exact
behavior across a warm RESET is not specified by the architecture.

Since we do not support a microcode update directly from the hypervisor,
but only as a result of userspace setting the microcode version MSR,
it's simpler for userspace if we do nothing in KVM and let userspace
emulate behavior for RESET as it sees fit.

Userspace can tie the fix to the availability of MSR_IA32_UCODE_REV in
the list of emulated MSRs.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx/vmx.c