]> xenbits.xensource.com Git - qemu-xen-4.1-testing.git/commitdiff
qemu-xen: support PV on HVM MSIX remapping
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 5 Jan 2011 23:14:37 +0000 (23:14 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Jan 2011 23:14:37 +0000 (23:14 +0000)
Support PV on HVM MSIX remapping

The technique is the same used with MSI: if the guest enables an MSIX
passing 0 as vector number, then read the address and use it as pirq
number for the following mapping request to Xen.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/pt-msi.c

index f0fb3e31d5fbeab90ef9e0059a9d06f4ae83d0db..b01744ed520d32dbc53dee9d37674eed24f0bd08 100644 (file)
@@ -300,6 +300,14 @@ static int pt_msix_update_one(struct pt_dev *dev, int entry_nr)
     if ( !entry->flags )
         return 0;
 
+    if (!gvec) {
+        /* if gvec is 0, the guest is asking for a particular pirq that
+         * is passed as dest_id */
+        pirq = ((gaddr >> 32) & 0xffffff00) |
+               (((gaddr & 0xffffffff) >> MSI_TARGET_CPU_SHIFT) & 0xff);
+        PT_LOG("pt_msix_update_one requested pirq = %d\n", pirq);
+    }
+
     /* Check if this entry is already mapped */
     if ( entry->pirq == -1 )
     {