From 267ee357153bb61870b60da69ba9f839ddb0e32e Mon Sep 17 00:00:00 2001 From: Radim Krčmář Date: Mon, 10 Oct 2016 17:28:43 +0200 Subject: apic: add send_msi() to APICCommonClass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Peter Xu Signed-off-by: Radim Krčmář Signed-off-by: Eduardo Habkost --- hw/i386/xen/xen_apic.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hw/i386/xen/xen_apic.c') 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 = { -- cgit 1.4.1