qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8
@ 2016-11-17 15:26 Marc-André Lureau
  2016-11-17 15:26 ` [Qemu-devel] [PULL 1/1] ivshmem: Fix 64 bit memory bar configuration Marc-André Lureau
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marc-André Lureau @ 2016-11-17 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Marc-André Lureau

The following changes since commit b0bcc86d2a87456f5a276f941dc775b265b309cf:

  Update version for v2.8.0-rc0 release (2016-11-15 20:55:12 +0000)

are available in the git repository at:

  git@github.com:elmarco/qemu.git tags/ivshmem-pull-request

for you to fetch changes up to b2b79a696052040389e0f9980801a880ce5a6ae3:

  ivshmem: Fix 64 bit memory bar configuration (2016-11-17 18:39:59 +0400)

----------------------------------------------------------------

----------------------------------------------------------------

Zhuang Yanying (1):
  ivshmem: Fix 64 bit memory bar configuration

 hw/misc/ivshmem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.10.0

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

* [Qemu-devel] [PULL 1/1] ivshmem: Fix 64 bit memory bar configuration
  2016-11-17 15:26 [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Marc-André Lureau
@ 2016-11-17 15:26 ` Marc-André Lureau
  2016-11-18 14:56 ` [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Stefan Hajnoczi
  2016-11-18 14:59 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Marc-André Lureau @ 2016-11-17 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Zhuang Yanying, Marc-André Lureau

From: Zhuang Yanying <ann.zhuangyanying@huawei.com>

Device ivshmem property use64=0 is designed to make the device
expose a 32 bit shared memory BAR instead of 64 bit one.  The
default is a 64 bit BAR, except pc-1.2 and older retain a 32 bit
BAR.  A 32 bit BAR can support only up to 1 GiB of shared memory.

This worked as designed until commit 5400c02 accidentally flipped
its sense: since then, we misinterpret use64=0 as use64=1 and vice
versa.  Worse, the default got flipped as well.  Devices
ivshmem-plain and ivshmem-doorbell are not affected.

Fix by restoring the test of IVShmemState member not_legacy_32bit
that got messed up in commit 5400c02.  Also update its
initialization for devices ivhsmem-plain and ivshmem-doorbell.
Without that, they'd regress to 32 bit BARs.

Signed-off-by: Zhuang Yanying <ann.zhuangyanying@huawei.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1479385863-7648-1-git-send-email-ann.zhuangyanying@huawei.com>
---
 hw/misc/ivshmem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 230e51b..abeaf3d 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -858,7 +858,7 @@ static void ivshmem_common_realize(PCIDevice *dev, Error **errp)
     pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY,
                      &s->ivshmem_mmio);
 
-    if (!s->not_legacy_32bit) {
+    if (s->not_legacy_32bit) {
         attr |= PCI_BASE_ADDRESS_MEM_TYPE_64;
     }
 
@@ -1045,6 +1045,7 @@ static void ivshmem_plain_init(Object *obj)
                              ivshmem_check_memdev_is_busy,
                              OBJ_PROP_LINK_UNREF_ON_RELEASE,
                              &error_abort);
+    s->not_legacy_32bit = 1;
 }
 
 static void ivshmem_plain_realize(PCIDevice *dev, Error **errp)
@@ -1116,6 +1117,7 @@ static void ivshmem_doorbell_init(Object *obj)
 
     s->features |= (1 << IVSHMEM_MSI);
     s->legacy_size = SIZE_MAX;  /* whatever the server sends */
+    s->not_legacy_32bit = 1;
 }
 
 static void ivshmem_doorbell_realize(PCIDevice *dev, Error **errp)
-- 
2.10.0

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

* Re: [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8
  2016-11-17 15:26 [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Marc-André Lureau
  2016-11-17 15:26 ` [Qemu-devel] [PULL 1/1] ivshmem: Fix 64 bit memory bar configuration Marc-André Lureau
@ 2016-11-18 14:56 ` Stefan Hajnoczi
  2016-11-18 15:01   ` Marc-André Lureau
  2016-11-18 14:59 ` Stefan Hajnoczi
  2 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2016-11-18 14:56 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: qemu-devel, peter.maydell

[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]

On Thu, Nov 17, 2016 at 07:26:12PM +0400, Marc-André Lureau wrote:
> The following changes since commit b0bcc86d2a87456f5a276f941dc775b265b309cf:
> 
>   Update version for v2.8.0-rc0 release (2016-11-15 20:55:12 +0000)
> 
> are available in the git repository at:
> 
>   git@github.com:elmarco/qemu.git tags/ivshmem-pull-request

This is not a publicly accessible repo URL.  I will manually fetch from
your repo this time but please update your git-config(1) with a separate
private pushurl and public url:

[remote "github"]
    url = https://github.com/elmarco/qemu.git
    pushurl = git@github.com:elmarco/qemu.git

> 
> for you to fetch changes up to b2b79a696052040389e0f9980801a880ce5a6ae3:
> 
>   ivshmem: Fix 64 bit memory bar configuration (2016-11-17 18:39:59 +0400)
> 
> ----------------------------------------------------------------
> 
> ----------------------------------------------------------------
> 
> Zhuang Yanying (1):
>   ivshmem: Fix 64 bit memory bar configuration
> 
>  hw/misc/ivshmem.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> -- 
> 2.10.0
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8
  2016-11-17 15:26 [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Marc-André Lureau
  2016-11-17 15:26 ` [Qemu-devel] [PULL 1/1] ivshmem: Fix 64 bit memory bar configuration Marc-André Lureau
  2016-11-18 14:56 ` [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Stefan Hajnoczi
@ 2016-11-18 14:59 ` Stefan Hajnoczi
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2016-11-18 14:59 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: qemu-devel, peter.maydell

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

On Thu, Nov 17, 2016 at 07:26:12PM +0400, Marc-André Lureau wrote:
> The following changes since commit b0bcc86d2a87456f5a276f941dc775b265b309cf:
> 
>   Update version for v2.8.0-rc0 release (2016-11-15 20:55:12 +0000)
> 
> are available in the git repository at:
> 
>   git@github.com:elmarco/qemu.git tags/ivshmem-pull-request
> 
> for you to fetch changes up to b2b79a696052040389e0f9980801a880ce5a6ae3:
> 
>   ivshmem: Fix 64 bit memory bar configuration (2016-11-17 18:39:59 +0400)
> 
> ----------------------------------------------------------------
> 
> ----------------------------------------------------------------
> 
> Zhuang Yanying (1):
>   ivshmem: Fix 64 bit memory bar configuration
> 
>  hw/misc/ivshmem.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> -- 
> 2.10.0
> 
> 

Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8
  2016-11-18 14:56 ` [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Stefan Hajnoczi
@ 2016-11-18 15:01   ` Marc-André Lureau
  0 siblings, 0 replies; 5+ messages in thread
From: Marc-André Lureau @ 2016-11-18 15:01 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: peter.maydell, qemu-devel

Hi

On Fri, Nov 18, 2016 at 6:57 PM Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Thu, Nov 17, 2016 at 07:26:12PM +0400, Marc-André Lureau wrote:
> > The following changes since commit
> b0bcc86d2a87456f5a276f941dc775b265b309cf:
> >
> >   Update version for v2.8.0-rc0 release (2016-11-15 20:55:12 +0000)
> >
> > are available in the git repository at:
> >
> >   git@github.com:elmarco/qemu.git tags/ivshmem-pull-request
>
> This is not a publicly accessible repo URL.  I will manually fetch from
> your repo this time but please update your git-config(1) with a separate
> private pushurl and public url:
>
> [remote "github"]
>     url = https://github.com/elmarco/qemu.git
>     pushurl = git@github.com:elmarco/qemu.git
>

fixed, thanks


>
> >
> > for you to fetch changes up to b2b79a696052040389e0f9980801a880ce5a6ae3:
> >
> >   ivshmem: Fix 64 bit memory bar configuration (2016-11-17 18:39:59
> +0400)
> >
> > ----------------------------------------------------------------
> >
> > ----------------------------------------------------------------
> >
> > Zhuang Yanying (1):
> >   ivshmem: Fix 64 bit memory bar configuration
> >
> >  hw/misc/ivshmem.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > --
> > 2.10.0
> >
> >
>
-- 
Marc-André Lureau

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

end of thread, other threads:[~2016-11-18 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 15:26 [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Marc-André Lureau
2016-11-17 15:26 ` [Qemu-devel] [PULL 1/1] ivshmem: Fix 64 bit memory bar configuration Marc-André Lureau
2016-11-18 14:56 ` [Qemu-devel] [PULL 0/1] ivshmem fix for 2.8 Stefan Hajnoczi
2016-11-18 15:01   ` Marc-André Lureau
2016-11-18 14:59 ` Stefan Hajnoczi

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).