KVM: SVM: Enable Virtual GIF feature
authorJanakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Wed, 23 Aug 2017 14:57:19 +0000 (09:57 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Aug 2017 16:37:37 +0000 (18:37 +0200)
commit640bd6e5752274f7dbd2a0a6642fe2db85813bd9
tree3393a98d92845e49f878954c44e48adb605c06a4
parentd837312dfd5bed79ff6576e83dda3cddbe5c7ec7
KVM: SVM: Enable Virtual GIF feature

Enable the Virtual GIF feature. This is done by setting bit 25 at position
60h in the vmcb.

With this feature enabled, the processor uses bit 9 at position 60h as the
virtual GIF when executing STGI/CLGI instructions.

Since the execution of STGI by the L1 hypervisor does not cause a return to
the outermost (L0) hypervisor, the enable_irq_window and enable_nmi_window
are modified.

The IRQ window will be opened even if GIF is not set, under the assumption
that on resuming the L1 hypervisor the IRQ will be held pending until the
processor executes the STGI instruction.

For the NMI window, the STGI intercept is set. This will assist in opening
the window only when GIF=1.

Signed-off-by: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/svm.h
arch/x86/kvm/svm.c