From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization Date: Mon, 21 Nov 2011 14:16:31 +0200 Message-ID: <4ECA411F.4020903@redhat.com> References: <1321872978-3298-1-git-send-email-zanghongyong@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, james.chenjiabo@huawei.com, wuchangyi@huawei.com, xiaowei.yang@huawei.com, hanweidong@huawei.com, wusongwei@huawei.com, louzhengwei@huawei.com, cam@cs.ualberta.ca To: zanghongyong@huawei.com, Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54144 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752371Ab1KUMQq (ORCPT ); Mon, 21 Nov 2011 07:16:46 -0500 In-Reply-To: <1321872978-3298-1-git-send-email-zanghongyong@huawei.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/21/2011 12:56 PM, zanghongyong@huawei.com wrote: > From: Hongyong Zang > > 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. > > Signed-off-by: Hongyong Zang > --- > hw/ivshmem.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/ivshmem.c b/hw/ivshmem.c > index 242fbea..2ecf658 100644 > --- a/hw/ivshmem.c > +++ b/hw/ivshmem.c > @@ -694,7 +694,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 *)); > Reviewed-by: Avi Kivity This is 1.0 worthy. -- error compiling committee.c: too many arguments to function