diff options
author | Maxim Levitsky <mlevitsk@redhat.com> | 2022-10-25 14:47:41 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-11-09 18:31:26 +0100 |
commit | fb28875fd7da184079150295da7ee8d80a70917e (patch) | |
tree | 73c75fa069173b462517317739a0f891679b45f9 /mm/hugetlb.c | |
parent | KVM: x86: SVM: don't save SVM state to SMRAM when VM is not long mode capable (diff) | |
download | linux-fb28875fd7da184079150295da7ee8d80a70917e.tar.xz linux-fb28875fd7da184079150295da7ee8d80a70917e.zip |
KVM: x86: smm: preserve interrupt shadow in SMRAM
When #SMI is asserted, the CPU can be in interrupt shadow due to sti or
mov ss.
It is not mandatory in Intel/AMD prm to have the #SMI blocked during the
shadow, and on top of that, since neither SVM nor VMX has true support
for SMI window, waiting for one instruction would mean single stepping
the guest.
Instead, allow #SMI in this case, but both reset the interrupt window and
stash its value in SMRAM to restore it on exit from SMM.
This fixes rare failures seen mostly on windows guests on VMX, when #SMI
falls on the sti instruction which mainfest in VM entry failure due
to EFLAGS.IF not being set, but STI interrupt window still being set
in the VMCS.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20221025124741.228045-24-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions