debuggers.hg

changeset 19940:d768628c28a4

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@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jul 06 11:58:02 2009 +0100 (2009-07-06)
parents 0ab211e699e6
children 65a68b980cc3
files xen/arch/x86/hvm/vmsi.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmsi.c	Mon Jul 06 11:57:18 2009 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmsi.c	Mon Jul 06 11:58:02 2009 +0100
     1.3 @@ -290,7 +290,7 @@ static int msixtbl_write(struct vcpu *v,
     1.4          goto out;
     1.5  
     1.6      entry = msixtbl_find_entry(v, address);
     1.7 -    nr_entry = (address - entry->gtable) % PCI_MSIX_ENTRY_SIZE;
     1.8 +    nr_entry = (address - entry->gtable) / PCI_MSIX_ENTRY_SIZE;
     1.9  
    1.10      offset = address & (PCI_MSIX_ENTRY_SIZE - 1);
    1.11      if ( offset != PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET)