From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization Date: Mon, 21 Nov 2011 18:22:41 -0600 Message-ID: <4ECAEB51.4060904@redhat.com> References: <1321872978-3298-1-git-send-email-zanghongyong@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: avi@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, wusongwei@huawei.com, hanweidong@huawei.com, wuchangyi@huawei.com, louzhengwei@huawei.com, xiaowei.yang@huawei.com, james.chenjiabo@huawei.com, cam@cs.ualberta.ca To: zanghongyong@huawei.com Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:50501 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753130Ab1KVAWp (ORCPT ); Mon, 21 Nov 2011 19:22:45 -0500 Received: by yenq3 with SMTP id q3so5329293yen.19 for ; Mon, 21 Nov 2011 16:22:45 -0800 (PST) In-Reply-To: <1321872978-3298-1-git-send-email-zanghongyong@huawei.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/21/2011 04:56 AM, 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 Applied. Thanks. Regards, Anthony Liguori > --- > 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 *)); >