Skip to content

Commit 3081117

Browse files
committed
KVM: SVM: set IRR in svm_deliver_interrupt
SVM has to set IRR for both the AVIC and the software-LAPIC case, so pull it up to the common function that handles both configurations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 0a5f784 commit 3081117

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

arch/x86/kvm/svm/avic.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,6 @@ int svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec)
668668
if (!vcpu->arch.apicv_active)
669669
return -1;
670670

671-
kvm_lapic_set_irr(vec, vcpu->arch.apic);
672-
673671
/*
674672
* Pairs with the smp_mb_*() after setting vcpu->guest_mode in
675673
* vcpu_enter_guest() to ensure the write to the vIRR is ordered before

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,8 +3304,8 @@ static void svm_deliver_interrupt(struct kvm_lapic *apic, int delivery_mode,
33043304
{
33053305
struct kvm_vcpu *vcpu = apic->vcpu;
33063306

3307+
kvm_lapic_set_irr(vector, apic);
33073308
if (svm_deliver_avic_intr(vcpu, vector)) {
3308-
kvm_lapic_set_irr(vector, apic);
33093309
kvm_make_request(KVM_REQ_EVENT, vcpu);
33103310
kvm_vcpu_kick(vcpu);
33113311
} else {

0 commit comments

Comments
 (0)