Skip to contentSkip to conversation

qemu-xen: support PV on HVM MSIX remapping

PATCH Applied Stefano Stabellini 2 participants 2 messages Nov 26, 2010 – Jan 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-xen: support PV on HVM MSIX remapping

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.

hw/pt-msi.c +8 -0
index f0fb3e3..b01744e 100644
@@ -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 )
     {
Applied
#1 lore raw

Stefano Stabellini writes ("[Xen-devel] [PATCH] qemu-xen: support PV on HVM MSIX remapping"):

Quoted 1 line

Support PV on HVM MSIX remapping

Applied, thanks.

Ian.