]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: Use vmcs01's controls shadow to check for IRQ/NMI windows at VM-Enter
authorSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 19:14:46 +0000 (12:14 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 19 Dec 2024 15:34:13 +0000 (07:34 -0800)
commitc829d2c35650e9e24dc338234bd14e4c7c6231f5
treebba8d0814c37fb1f0d8e0a44752b978624227839
parentb2868b55cfef036b743a620de18cb3ff1d16b043
KVM: nVMX: Use vmcs01's controls shadow to check for IRQ/NMI windows at VM-Enter

Use vmcs01's execution controls shadow to check for IRQ/NMI windows after
a successful nested VM-Enter, instead of snapshotting the information prior
to emulating VM-Enter.  It's quite difficult to see that the entire reason
controls are snapshot prior nested VM-Enter is to read them from vmcs01
(vmcs02 is loaded if nested VM-Enter is successful).

That could be solved with a comment, but explicitly using vmcs01's shadow
makes the code self-documenting to a certain extent.

No functional change intended (vmcs01's execution controls must not be
modified during emulation of nested VM-Enter).

Link: https://lore.kernel.org/r/20241101191447.1807602-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c