kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization
@ 2011-11-21 10:56 zanghongyong
  2011-11-21 12:16 ` Avi Kivity
  2011-11-22  0:22 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: zanghongyong @ 2011-11-21 10:56 UTC (permalink / raw)
  To: avi, qemu-devel, kvm
  Cc: james.chenjiabo, wuchangyi, xiaowei.yang, hanweidong,
	zanghongyong, wusongwei, louzhengwei, cam

From: Hongyong Zang <zanghongyong@huawei.com>

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 <zanghongyong@huawei.com>
---
 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 *));
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization
  2011-11-21 10:56 [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization zanghongyong
@ 2011-11-21 12:16 ` Avi Kivity
  2011-11-22  0:22 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2011-11-21 12:16 UTC (permalink / raw)
  To: zanghongyong, Anthony Liguori
  Cc: qemu-devel, kvm, james.chenjiabo, wuchangyi, xiaowei.yang,
	hanweidong, wusongwei, louzhengwei, cam

On 11/21/2011 12:56 PM, zanghongyong@huawei.com wrote:
> From: Hongyong Zang <zanghongyong@huawei.com>
>
> 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 <zanghongyong@huawei.com>
> ---
>  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 <avi@redhat.com>

This is 1.0 worthy.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization
  2011-11-21 10:56 [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization zanghongyong
  2011-11-21 12:16 ` Avi Kivity
@ 2011-11-22  0:22 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2011-11-22  0:22 UTC (permalink / raw)
  To: zanghongyong
  Cc: avi, qemu-devel, kvm, wusongwei, hanweidong, wuchangyi,
	louzhengwei, xiaowei.yang, james.chenjiabo, cam

On 11/21/2011 04:56 AM, zanghongyong@huawei.com wrote:
> From: Hongyong Zang<zanghongyong@huawei.com>
>
> 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<zanghongyong@huawei.com>

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 *));
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-22  0:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 10:56 [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization zanghongyong
2011-11-21 12:16 ` Avi Kivity
2011-11-22  0:22 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).