KVM: SVM: preserve VGIF across VMCB switch
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 May 2020 16:28:52 +0000 (12:28 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:01 +0000 (04:26 -0400)
commit91b7130cb6606d8c6b3b77e54426b3f3a83f48b1
treeb827895cb360d8b6efd71f9c7304716aa923f53d
parentffdf7f9e80ac1b6fea3bc6a65ea1f264bc226eab
KVM: SVM: preserve VGIF across VMCB switch

There is only one GIF flag for the whole processor, so make sure it is not clobbered
when switching to L2 (in which case we also have to include the V_GIF_ENABLE_MASK,
lest we confuse enable_gif/disable_gif/gif_set).  When going back, L1 could in
theory have entered L2 without issuing a CLGI so make sure the svm_set_gif is
done last, after svm->vmcb->control.int_ctl has been copied back from hsave.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c