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] qemu-xen: if pirq == 0 fall back to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] qemu-xen: if pirq == 0 fall back to emulated MSIs
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 5 Jan 2011 16:05:15 -0800
Delivery-date: Wed, 05 Jan 2011 16:05:29 -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 6df21b765eafcae5d891d5a8092e6f8b74c93031
Author: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date:   Wed Jan 5 23:16:54 2011 +0000

    qemu-xen: if pirq == 0 fall back to emulated MSIs
    
    If the pirq requested is 0, it probably means that the guest is
    misconfigured, so fall back to the emulated code path.
    
    This patch depends on "qemu-xen: support PV on HVM MSIX remapping".
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 hw/pt-msi.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index b01744e..71fa6f0 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -79,7 +79,12 @@ int pt_msi_setup(struct pt_dev *dev)
          * 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 (!pirq)
+            /* this probably identifies an misconfiguration of the guest,
+             * try the emulated path */
+            pirq = -1;
+        else
+            PT_LOG("pt_msi_setup requested pirq = %d\n", pirq);
     }
 
     if ( xc_physdev_map_pirq_msi(xc_handle, domid, AUTO_ASSIGN, &pirq,
@@ -305,7 +310,12 @@ static int pt_msix_update_one(struct pt_dev *dev, int 
entry_nr)
          * 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);
+        if (!pirq)
+            /* this probably identifies an misconfiguration of the guest,
+             * try the emulated path */
+            pirq = -1;
+        else
+            PT_LOG("pt_msix_update_one requested pirq = %d\n", pirq);
     }
 
     /* Check if this entry is already mapped */
--
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] qemu-xen: if pirq == 0 fall back to emulated MSIs, Ian Jackson <=