提交 ff51a738 编写于 作者: H Hongyong Zang 提交者: Anthony Liguori

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: NAvi Kivity <avi@redhat.com>
Signed-off-by: NHongyong Zang <zanghongyong@huawei.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 ae392c41
......@@ -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 *));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册