diff options
author | Hongyong Zang | 2011-11-21 11:56:18 +0100 |
---|---|---|
committer | Anthony Liguori | 2011-11-21 22:05:59 +0100 |
commit | ff51a738cf487811a7890d5292c38bc30eb54e45 (patch) | |
tree | 589ec85838d82ba75061b983b990fec5ec06cd12 /hw/ivshmem.c | |
parent | msix: avoid mask updates if mask is unchanged (diff) | |
download | qemu-ff51a738cf487811a7890d5292c38bc30eb54e45.tar.gz qemu-ff51a738cf487811a7890d5292c38bc30eb54e45.tar.xz qemu-ff51a738cf487811a7890d5292c38bc30eb54e45.zip |
ivshmem: fix PCI BAR2 registration during initialization
Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest.
As for pci_register_bar(), parameter MemoryRegion should be s->bar instead of s->ivshmem.
Reviewed-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Hongyong Zang <zanghongyong@huawei.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ivshmem.c')
-rw-r--r-- | hw/ivshmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c index a3a0e98451..7b4dbf66a9 100644 --- a/hw/ivshmem.c +++ b/hw/ivshmem.c @@ -699,7 +699,7 @@ static int pci_ivshmem_init(PCIDevice *dev) s->peers = g_malloc0(s->nb_peers * sizeof(Peer)); pci_register_bar(&s->dev, 2, - PCI_BASE_ADDRESS_SPACE_MEMORY, &s->ivshmem); + PCI_BASE_ADDRESS_SPACE_MEMORY, &s->bar); s->eventfd_chr = g_malloc0(s->vectors * sizeof(CharDriverState *)); |