]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: implement nested vGIF
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 22 Mar 2022 17:40:48 +0000 (19:40 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:41:23 +0000 (05:41 -0400)
commit998c93e920a453e6df6ec608de59d4a19df663bb
treef24077ecf15276437cda83d5982aa236a6e76300
parent2ed38210b89c1cc188a11f72f97172afc77b62d9
KVM: x86: nSVM: implement nested vGIF

In case L1 enables vGIF for L2, the L2 cannot affect L1's GIF, regardless
of STGI/CLGI intercepts, and since VM entry enables GIF, this means
that L1's GIF is always 1 while L2 is running.

Thus in this case leave L1's vGIF in vmcb01, while letting L2
control the vGIF thus implementing nested vGIF.

Also allow KVM to toggle L1's GIF during nested entry/exit
by always using vmcb01.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220322174050.241850-5-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h