Patchwork MSI broken?

login
register
mail settings
Submitter Gerd Hoffmann
Date Nov. 3, 2010, 3:15 p.m.
Message ID <4CD17C8F.8070506@redhat.com>
Download mbox | patch
Permalink /patch/70012/
State New
Headers show

Comments

Gerd Hoffmann - Nov. 3, 2010, 3:15 p.m.
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

Patch

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);
 }