KVM: nSVM: Disable intercept of VINTR if saved L1 host RFLAGS.IF is 0
authorSantosh Shukla <Santosh.Shukla@amd.com>
Mon, 27 Feb 2023 08:40:07 +0000 (14:10 +0530)
committerSean Christopherson <seanjc@google.com>
Wed, 22 Mar 2023 19:19:40 +0000 (12:19 -0700)
commit7334ede457c6f1f7a26344ed25928f63f9a53a8d
tree5a874e7c36695bb1f539d47277a95bcd996f69d6
parent5faaffab5ba8cd4f3781b90cccd47440b54aea5b
KVM: nSVM: Disable intercept of VINTR if saved L1 host RFLAGS.IF is 0

Disable intercept of virtual interrupts (used to detect interrupt windows)
if the saved host (L1) RFLAGS.IF is '0', as the effective RFLAGS.IF for L1
interrupts will never be set while L2 is running (L2's RFLAGS.IF doesn't
affect L1 IRQs when virtual interrupts are enabled).

Suggested-by: Sean Christopherson <seanjc@google.com>
Link: https://lkml.kernel.org/r/Y9hybI65So5X2LFg%40google.com
Signed-off-by: Santosh Shukla <Santosh.Shukla@amd.com>
Link: https://lore.kernel.org/r/20230227084016.3368-3-santosh.shukla@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c