diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-03-31 13:28:01 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-04-01 12:11:35 +0300 |
commit | 3c346c0c60ab06a021d1c0884a0ef494bc4ee3a7 (patch) | |
tree | 860cb0fd3c84ff826ff267151bfe6c0bf17abd10 /arch/x86/pci/legacy.c | |
parent | a58d9166a756a0f4a6618e4f593232593d6df134 (diff) | |
download | linux-3c346c0c60ab06a021d1c0884a0ef494bc4ee3a7.tar.xz |
KVM: SVM: ensure that EFER.SVME is set when running nested guest or on nested vmexit
Fixing nested_vmcb_check_save to avoid all TOC/TOU races
is a bit harder in released kernels, so do the bare minimum
by avoiding that EFER.SVME is cleared. This is problematic
because svm_set_efer frees the data structures for nested
virtualization if EFER.SVME is cleared.
Also check that EFER.SVME remains set after a nested vmexit;
clearing it could happen if the bit is zero in the save area
that is passed to KVM_SET_NESTED_STATE (the save area of the
nested state corresponds to the nested hypervisor's state
and is restored on the next nested vmexit).
Cc: stable@vger.kernel.org
Fixes: 2fcf4876ada ("KVM: nSVM: implement on demand allocation of the nested state")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/pci/legacy.c')
0 files changed, 0 insertions, 0 deletions