]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: more strict SMM checks when returning to nested guest
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 27 Aug 2020 16:27:20 +0000 (19:27 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 12 Sep 2020 16:21:43 +0000 (12:21 -0400)
commitb0d2efaad18dce94b94cb23908b2d884f1ddb4d4
treef35f5e852cb09aea39105ff567448437fa99293d
parent2ea628aaf02a3fd6a87e1b79e6f6b8a660408e6c
KVM: nSVM: more strict SMM checks when returning to nested guest

* check that guest is 64 bit guest, otherwise the SVM related fields
  in the smm state area are not defined

* If the SMM area indicates that SMM interrupted a running guest,
  check that EFER.SVME which is also saved in this area is set, otherwise
  the guest might have tampered with SMM save area, and so indicate
  emulation failure which should triple fault the guest.

* Check that that guest CPUID supports SVM (due to the same issue as above)

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200827162720.278690-4-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c