Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread Anthony Liguori

On 11/21/2011 04:56 AM, zanghongy...@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 *));






Re: [Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread Avi Kivity
On 11/21/2011 12:56 PM, zanghongy...@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




[Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread zanghongyong
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 *));
 
-- 
1.7.1