diff options
| author | Radim Krčmář <rkrcmar@redhat.com> | 2016-10-10 17:28:43 +0200 |
|---|---|---|
| committer | Eduardo Habkost <ehabkost@redhat.com> | 2016-10-17 15:44:49 -0200 |
| commit | 267ee357153bb61870b60da69ba9f839ddb0e32e (patch) | |
| tree | 00d445a965aa271f50d8740ba131b9159e9277ce /hw/i386/xen/xen_apic.c | |
| parent | 2f114315dcf239bc513f18ae0b04b5df81cae059 (diff) | |
| download | focaccia-qemu-267ee357153bb61870b60da69ba9f839ddb0e32e.tar.gz focaccia-qemu-267ee357153bb61870b60da69ba9f839ddb0e32e.zip | |
apic: add send_msi() to APICCommonClass
The MMIO based interface to APIC doesn't work well with MSIs that have upper address bits set (remapped x2APIC MSIs). A specialized interface is a quick and dirty way to avoid the shortcoming. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/i386/xen/xen_apic.c')
| -rw-r--r-- | hw/i386/xen/xen_apic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/xen/xen_apic.c b/hw/i386/xen/xen_apic.c index 21d68ee04b..55769eba7e 100644 --- a/hw/i386/xen/xen_apic.c +++ b/hw/i386/xen/xen_apic.c @@ -68,6 +68,11 @@ static void xen_apic_external_nmi(APICCommonState *s) { } +static void xen_send_msi(MSIMessage *msi) +{ + xen_hvm_inject_msi(msi->address, msi->data); +} + static void xen_apic_class_init(ObjectClass *klass, void *data) { APICCommonClass *k = APIC_COMMON_CLASS(klass); @@ -78,6 +83,7 @@ static void xen_apic_class_init(ObjectClass *klass, void *data) k->get_tpr = xen_apic_get_tpr; k->vapic_base_update = xen_apic_vapic_base_update; k->external_nmi = xen_apic_external_nmi; + k->send_msi = xen_send_msi; } static const TypeInfo xen_apic_info = { |