KVM: nSVM: extract svm_set_gif
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 22 May 2020 16:18:27 +0000 (12:18 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:01 +0000 (04:26 -0400)
commitffdf7f9e80ac1b6fea3bc6a65ea1f264bc226eab
treedad2f1c89aa23f816bebc1aa1ffb287b225069c1
parent31031098feb9e1233176896d31eaf766c13429df
KVM: nSVM: extract svm_set_gif

Extract the code that is needed to implement CLGI and STGI,
so that we can run it from VMRUN and vmexit (and in the future,
KVM_SET_NESTED_STATE).  Skip the request for KVM_REQ_EVENT unless needed,
subsuming the evaluate_pending_interrupts optimization that is found
in enter_svm_guest_mode.

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