]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - arch/x86/kvm/x86.c
KVM: SVM: detect opening of SMI window using STGI intercept
authorLadi Prosek <lprosek@redhat.com>
Tue, 17 Oct 2017 14:02:39 +0000 (16:02 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 18 Oct 2017 19:21:22 +0000 (21:21 +0200)
commitcc3d967f7e32ceeb9b78dc962126ebcf1a2b24b2
treeb5a6a7dc1f6c9c181be3bab24d05b5066b423ce0
parent9b8ebbdb74b5ad76b9dfd8b101af17839174b126
KVM: SVM: detect opening of SMI window using STGI intercept

Commit 05cade71cf3b ("KVM: nSVM: fix SMI injection in guest mode") made
KVM mask SMI if GIF=0 but it didn't do anything to unmask it when GIF is
enabled.

The issue manifests for me as a significantly longer boot time of Windows
guests when running with SMM-enabled OVMF.

This commit fixes it by intercepting STGI instead of requesting immediate
exit if the reason why SMM was masked is GIF.

Fixes: 05cade71cf3b ("KVM: nSVM: fix SMI injection in guest mode")
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c