mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
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>
This commit is contained in:
parent
0a5f784273
commit
30811174f0
@ -668,8 +668,6 @@ int svm_deliver_avic_intr(struct kvm_vcpu *vcpu, int vec)
|
|||||||
if (!vcpu->arch.apicv_active)
|
if (!vcpu->arch.apicv_active)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
kvm_lapic_set_irr(vec, vcpu->arch.apic);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pairs with the smp_mb_*() after setting vcpu->guest_mode in
|
* Pairs with the smp_mb_*() after setting vcpu->guest_mode in
|
||||||
* vcpu_enter_guest() to ensure the write to the vIRR is ordered before
|
* vcpu_enter_guest() to ensure the write to the vIRR is ordered before
|
||||||
|
@ -3304,8 +3304,8 @@ static void svm_deliver_interrupt(struct kvm_lapic *apic, int delivery_mode,
|
|||||||
{
|
{
|
||||||
struct kvm_vcpu *vcpu = apic->vcpu;
|
struct kvm_vcpu *vcpu = apic->vcpu;
|
||||||
|
|
||||||
if (svm_deliver_avic_intr(vcpu, vector)) {
|
|
||||||
kvm_lapic_set_irr(vector, apic);
|
kvm_lapic_set_irr(vector, apic);
|
||||||
|
if (svm_deliver_avic_intr(vcpu, vector)) {
|
||||||
kvm_make_request(KVM_REQ_EVENT, vcpu);
|
kvm_make_request(KVM_REQ_EVENT, vcpu);
|
||||||
kvm_vcpu_kick(vcpu);
|
kvm_vcpu_kick(vcpu);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user