summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2022-01-25 03:59:39 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-10 13:50:30 -0500
commit9b44423bf4c8570834679879a8d26928d9e962e2 (patch)
treebed23fab62a81e2e9bce38011d10e3342136c009 /crypto
parent23e5092b6e2ad1b2c77c05f8c5124a735908b4ab (diff)
downloadlinux-9b44423bf4c8570834679879a8d26928d9e962e2.tar.bz2
KVM: VMX: Dont' send posted IRQ if vCPU == this vCPU and vCPU is IN_GUEST_MODE
When delivering a virtual interrupt, don't actually send a posted interrupt if the target vCPU is also the currently running vCPU and is IN_GUEST_MODE, in which case the interrupt is being sent from a VM-Exit fastpath and the core run loop in vcpu_enter_guest() will manually move the interrupt from the PIR to vmcs.GUEST_RVI. IRQs are disabled while IN_GUEST_MODE, thus there's no possibility of the virtual interrupt being sent from anything other than KVM, i.e. KVM won't suppress a wake event from an IRQ handler (see commit fdba608f15e2, "KVM: VMX: Wake vCPU when delivering posted IRQ even if vCPU == this vCPU"). Eliding the posted interrupt restores the performance provided by the combination of commits 379a3c8ee444 ("KVM: VMX: Optimize posted-interrupt delivery for timer fastpath") and 26efe2fd92e5 ("KVM: VMX: Handle preemption timer fastpath"). Thanks Sean for better comments. Suggested-by: Chao Gao <chao.gao@intel.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Message-Id: <1643111979-36447-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions