ia64/xen-unstable

changeset 18443:1a785d213573

ioemu: fix 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.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Sep 05 11:18:20 2008 +0100 (2008-09-05)
parents 392b04ccaf3c
children be573a356c90
files tools/ioemu/hw/pt-msi.c
line diff
     1.1 --- a/tools/ioemu/hw/pt-msi.c	Thu Sep 04 16:29:38 2008 +0100
     1.2 +++ b/tools/ioemu/hw/pt-msi.c	Fri Sep 05 11:18:20 2008 +0100
     1.3 @@ -313,7 +313,7 @@ int pt_msix_init(struct pt_dev *dev, int
     1.4  
     1.5      table_off = pci_read_long(pd, pos + PCI_MSIX_TABLE);
     1.6      bar_index = dev->msix->bar_index = table_off & PCI_MSIX_BIR;
     1.7 -    table_off &= table_off & ~PCI_MSIX_BIR;
     1.8 +    table_off = dev->msix->table_off = table_off & ~PCI_MSIX_BIR;
     1.9      dev->msix->table_base = dev->pci_dev->base_addr[bar_index];
    1.10      PT_LOG("get MSI-X table bar base %llx\n",
    1.11             (unsigned long long)dev->msix->table_base);