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

[Xen-devel][PATCH]x86: hvm: fix get msix entry error

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel][PATCH]x86: hvm: fix get msix entry error
From: "Zhang, Yang" <yang.zhang@xxxxxxxxx>
Date: Mon, 6 Jul 2009 14:12:04 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Fraser <keir.fraser@xxxxxxxxxxxxx>, "He, Qing" <qing.he@xxxxxxxxx>
Delivery-date: Sun, 05 Jul 2009 23:14:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acn+AK6NcoNVDxP+Ti2KFSRfEg7bHQ==
Thread-topic: [Xen-devel][PATCH]x86: hvm: fix get msix entry error
There is a mistake to get the msix entry number. It should be 
divide instead of modulus.

Signed-off-by: Yang Zhang <yang.zhang@xxxxxxxxx>
Signed-off-by: Qing He <qing.he@xxxxxxxxx>

diff -r 112680f620bf xen/arch/x86/hvm/vmsi.c
--- a/xen/arch/x86/hvm/vmsi.c   Mon Jun 08 18:23:57 2009 +0100
+++ b/xen/arch/x86/hvm/vmsi.c   Mon Jul 06 13:06:03 2009 +0800
@@ -290,7 +290,7 @@
         goto out;
 
     entry = msixtbl_find_entry(v, address);
-    nr_entry = (address - entry->gtable) % PCI_MSIX_ENTRY_SIZE;
+    nr_entry = (address - entry->gtable) / PCI_MSIX_ENTRY_SIZE;
 
     offset = address & (PCI_MSIX_ENTRY_SIZE - 1);
     if ( offset != PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET)

Attachment: fix_get_msixtbl_entry_error.patch
Description: fix_get_msixtbl_entry_error.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel][PATCH]x86: hvm: fix get msix entry error, Zhang, Yang <=