diff options
| author | Radim Krčmář <rkrcmar@redhat.com> | 2016-12-15 12:06:45 -0500 |
|---|---|---|
| committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-01-09 08:46:13 -0500 |
| commit | f98a3efb284a7950745d6c95be489193e6d4c657 (patch) | |
| tree | f8ee4928fefe9bde8d7d2c64159125ad9d71a764 | |
| parent | 63dbe14d39b0505e3260bed92e5f4905f49c09d9 (diff) | |
KVM: x86: use delivery to self in hyperv synic
Interrupt to self can be sent without knowing the APIC ID.
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | arch/x86/kvm/hyperv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 1572c35b4f1a..08b27e0c7b71 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c | |||
| @@ -305,13 +305,13 @@ static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint) | |||
| 305 | return -ENOENT; | 305 | return -ENOENT; |
| 306 | 306 | ||
| 307 | memset(&irq, 0, sizeof(irq)); | 307 | memset(&irq, 0, sizeof(irq)); |
| 308 | irq.dest_id = kvm_apic_id(vcpu->arch.apic); | 308 | irq.shorthand = APIC_DEST_SELF; |
| 309 | irq.dest_mode = APIC_DEST_PHYSICAL; | 309 | irq.dest_mode = APIC_DEST_PHYSICAL; |
| 310 | irq.delivery_mode = APIC_DM_FIXED; | 310 | irq.delivery_mode = APIC_DM_FIXED; |
| 311 | irq.vector = vector; | 311 | irq.vector = vector; |
| 312 | irq.level = 1; | 312 | irq.level = 1; |
| 313 | 313 | ||
| 314 | ret = kvm_irq_delivery_to_apic(vcpu->kvm, NULL, &irq, NULL); | 314 | ret = kvm_irq_delivery_to_apic(vcpu->kvm, vcpu->arch.apic, &irq, NULL); |
| 315 | trace_kvm_hv_synic_set_irq(vcpu->vcpu_id, sint, irq.vector, ret); | 315 | trace_kvm_hv_synic_set_irq(vcpu->vcpu_id, sint, irq.vector, ret); |
| 316 | return ret; | 316 | return ret; |
| 317 | } | 317 | } |
