WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [qemu-xen-unstable] passthrough: support PV on HVM MSI r

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] passthrough: support PV on HVM MSI remapping
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Fri, 19 Nov 2010 11:05:04 -0800
Delivery-date: Fri, 19 Nov 2010 11:05:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 1c0663380cec9ae6d01e189dbe963f76f92fd5a0
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Fri Nov 19 18:50:07 2010 +0000

    passthrough: support PV on HVM MSI remapping
    
    If the guest enables an MSI 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@xxxxxxxxxxxxx>
---
 hw/pt-msi.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index b59b4fa..f0fb3e3 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -65,6 +65,7 @@ static void msix_set_enable(struct pt_dev *dev, int en)
 int pt_msi_setup(struct pt_dev *dev)
 {
     int pirq = -1;
+    uint8_t gvec = 0;
 
     if ( !(dev->msi->flags & MSI_FLAG_UNINIT) )
     {
@@ -72,6 +73,15 @@ int pt_msi_setup(struct pt_dev *dev)
         return -1;
     }
 
+    gvec = dev->msi->data & 0xFF;
+    if (!gvec) {
+        /* if gvec is 0, the guest is asking for a particular pirq that
+         * is passed as dest_id */
+        pirq = (dev->msi->addr_hi & 0xffffff00) |
+               ((dev->msi->addr_lo >> MSI_TARGET_CPU_SHIFT) & 0xff);
+        PT_LOG("pt_msi_setup requested pirq = %d\n", pirq);
+    }
+
     if ( xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN, &pirq,
                                  PCI_DEVFN(dev->pci_dev->dev,
                                            dev->pci_dev->func),
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] passthrough: support PV on HVM MSI remapping, Ian Jackson <=