From patchwork Wed Nov 3 15:15:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: MSI broken? Date: Wed, 03 Nov 2010 05:15:27 -0000 From: Gerd Hoffmann X-Patchwork-Id: 70012 Message-Id: <4CD17C8F.8070506@redhat.com> To: Isaku Yamahata Cc: "qemu-devel@nongnu.org" Hi, >>> Let's track it down futher. >>> Were acpi_mem_writel() and apic_send_msi() in hw/apic.c called or not? >> >> No such function in my tree (savannah/master). >> >> Looks like some bits needed for msi are not merged yet? > > Sorry typo. s/acpi/apic/. The attached patch gives me: msi_notify:243 intel-hda:30 notify vector 0x0 address: 0xfee01008 data: 0x4151 apic_send_msi:775 dest 1 vector 81 dest_mode 0 trigger_mode 0 delivery 1 apic_find_dest:443 no apic found for dest 1 cheers, Gerd diff --git a/hw/apic.c b/hw/apic.c index 63d62c7..9b3ba10 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -439,6 +439,8 @@ static int apic_find_dest(uint8_t dest) return i; } + fprintf(stderr, "%s:%d no apic found for dest %d\n", + __FUNCTION__, __LINE__, dest); return -1; } @@ -769,6 +771,8 @@ static void apic_send_msi(target_phys_addr_t addr, uint32 data) uint8_t trigger_mode = (data >> MSI_DATA_TRIGGER_SHIFT) & 0x1; uint8_t delivery = (data >> MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7; /* XXX: Ignore redirection hint. */ + fprintf(stderr, "%s:%d dest %d vector %d dest_mode %d trigger_mode %d delivery %d\n", + __FUNCTION__, __LINE__, dest, vector, dest_mode, trigger_mode, delivery); apic_deliver_irq(dest, dest_mode, delivery, vector, 0, trigger_mode); }