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-devel

RE: [Xen-devel] [PATCH] ioemu-remote&ioemu: fix offset of MSI-X memoryma

To: "Yuji Shimada" <shimada-yxb@xxxxxxxxxxxxxxx>, "Ian Jackson" <ian.jackson@xxxxxxxxxxxxx>, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] ioemu-remote&ioemu: fix offset of MSI-X memorymapped table.
From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
Date: Fri, 5 Sep 2008 16:37:45 +0800
Cc:
Delivery-date: Fri, 05 Sep 2008 01:38:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080905164500.C3FD.SHIMADA-YXB@xxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080905164500.C3FD.SHIMADA-YXB@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckPK9JnwcDAlETKS+WUD9VnDyAbOQABqoxQ
Thread-topic: [Xen-devel] [PATCH] ioemu-remote&ioemu: fix offset of MSI-X memorymapped table.
Great!  I can confirm this patch fixes the issue I meet with.

Thanks!
-- Dexuan


-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Yuji Shimada
Sent: 2008年9月5日 15:48
To: Ian Jackson; Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu-remote&ioemu: fix offset of MSI-X 
memorymapped table.

This patch fixes offset of MSI-X memory mapped table.

Current code does not set dev->msix->table_off variable.
The offset of MSI-X memory mapped table is treated as 0.
The wrong region is unmapped from guest physical memory space.
As a result, guest device driver can't access memory mapped resource.

The patch fixes this issue. My MegaRAID SAS assigned to guest domain
becomes working with the patch.

Thanks,

Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>

diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index 511eb56..c515c02 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -313,7 +313,7 @@ int pt_msix_init(struct pt_dev *dev, int pos)
 
     table_off = pci_read_long(pd, pos + PCI_MSIX_TABLE);
     bar_index = dev->msix->bar_index = table_off & PCI_MSIX_BIR;
-    table_off &= table_off & ~PCI_MSIX_BIR;
+    table_off = dev->msix->table_off = table_off & ~PCI_MSIX_BIR;
     dev->msix->table_base = dev->pci_dev->base_addr[bar_index];
     PT_LOG("get MSI-X table bar base %llx\n",
            (unsigned long long)dev->msix->table_base);



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

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