mbox series

[PULL,00/19] machine queue, 2018-01-18

Message ID 20180118021000.27203-1-ehabkost@redhat.com
Headers show
Series machine queue, 2018-01-18 | expand

Message

Eduardo Habkost Jan. 18, 2018, 2:09 a.m. UTC
The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:

  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)

are available in the Git repository at:

  git://github.com/ehabkost/qemu.git tags/machine-next-pull-request

for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:

  fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)

----------------------------------------------------------------
machine queue, 2018-01-18

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

Eduardo Habkost (6):
  machine: Replace has_dynamic_sysbus with list of allowed devices
  hw/arm/virt: Allow only supported dynamic sysbus devices
  ppc: e500: Allow only supported dynamic sysbus devices
  spapr: Allow only supported dynamic sysbus devices
  xen: Add only xen-sysdev to dynamic sysbus device list
  q35: Allow only supported dynamic sysbus devices

Haozhong Zhang (3):
  hostmem-file: add "align" option
  nvdimm: add a macro for property "label-size"
  nvdimm: add 'unarmed' option

Igor Mammedov (2):
  numa: fix missing '-numa cpu' in '-help' output
  possible_cpus: add CPUArchId::type field

Marc-André Lureau (2):
  memfd: split qemu_memfd_alloc()
  memfd: remove needless include

Marcel Apfelbaum (1):
  fw_cfg: fix memory corruption when all fw_cfg slots are used

Stefan Hajnoczi (2):
  qemu-options: document missing memory-backend-file options
  qemu-options: document memory-backend-ram

Thomas Huth (3):
  qdev_monitor: Simplify error handling in qdev_device_add()
  qdev: Check for the availability of a hotplug controller before adding
    a device
  scripts: Remove fixed entries from the device-crash-test

 docs/nvdimm.txt            | 31 ++++++++++++++++++++++
 include/exec/memory.h      |  3 +++
 include/hw/boards.h        |  7 ++++-
 include/hw/mem/nvdimm.h    | 12 +++++++++
 include/hw/qdev-core.h     |  1 +
 include/qemu/memfd.h       |  1 +
 backends/hostmem-file.c    | 41 +++++++++++++++++++++++++++-
 exec.c                     |  8 +++++-
 hw/acpi/nvdimm.c           |  7 +++++
 hw/arm/virt.c              |  8 ++++--
 hw/core/machine.c          | 55 ++++++++++++++++++++++++--------------
 hw/core/qdev.c             | 28 ++++++++++++++------
 hw/i386/pc.c               |  4 ++-
 hw/i386/pc_q35.c           |  5 +++-
 hw/mem/nvdimm.c            | 28 +++++++++++++++++++-
 hw/nvram/fw_cfg.c          |  6 +++--
 hw/ppc/e500plat.c          |  4 ++-
 hw/ppc/spapr.c             | 15 ++++++-----
 hw/s390x/s390-virtio-ccw.c |  1 +
 hw/xen/xen_backend.c       |  2 +-
 memory.c                   |  2 ++
 numa.c                     |  2 +-
 qdev-monitor.c             | 21 +++++++++------
 util/memfd.c               | 63 ++++++++++++++++++++++++-------------------
 vl.c                       |  3 +--
 qemu-options.hx            | 66 ++++++++++++++++++++++++++++++++++++++++------
 scripts/device-crash-test  |  8 ------
 27 files changed, 332 insertions(+), 100 deletions(-)

Comments

Peter Maydell Jan. 18, 2018, 3:22 p.m. UTC | #1
On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
>
> for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
>
>   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
>
> ----------------------------------------------------------------
> machine queue, 2018-01-18
>
> ----------------------------------------------------------------

Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
format string problem:

In file included from /home/peter.maydell/qemu/exec.c:20:0:
/home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
/home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
'%llx' expects argument of type 'long long unsigned int', but argument
7 has type 'size_t {aka unsigned int}' [-Werror=format=]
                         (fmt), ## __VA_ARGS__)
                         ^
/home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
         error_setg(errp, "aligment 0x%" PRIx64
         ^


thanks
-- PMM
Philippe Mathieu-Daudé Jan. 18, 2018, 3:36 p.m. UTC | #2
On 01/18/2018 12:22 PM, Peter Maydell wrote:
> On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
>> The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
>>
>>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
>>
>> are available in the Git repository at:
>>
>>   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
>>
>> for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
>>
>>   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
>>
>> ----------------------------------------------------------------
>> machine queue, 2018-01-18
>>
>> ----------------------------------------------------------------
> 
> Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> format string problem:
> 
> In file included from /home/peter.maydell/qemu/exec.c:20:0:
> /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> '%llx' expects argument of type 'long long unsigned int', but argument
> 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
>                          (fmt), ## __VA_ARGS__)
>                          ^
> /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
>          error_setg(errp, "aligment 0x%" PRIx64
>          ^

Eduardo you can quickly check that running:

  $ make docker-test-build@debian-win32-cross
  (or use the debian-armel-cross image, but win32 is often weirder)

I hope one day compiler get smart enough to automatically fix those
mistakes :)
Eduardo Habkost Jan. 18, 2018, 7:59 p.m. UTC | #3
On Thu, Jan 18, 2018 at 12:36:19PM -0300, Philippe Mathieu-Daudé wrote:
> On 01/18/2018 12:22 PM, Peter Maydell wrote:
> > On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> >> The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
> >>
> >>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
> >>
> >> for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
> >>
> >>   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
> >>
> >> ----------------------------------------------------------------
> >> machine queue, 2018-01-18
> >>
> >> ----------------------------------------------------------------
> > 
> > Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> > format string problem:
> > 
> > In file included from /home/peter.maydell/qemu/exec.c:20:0:
> > /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> > /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> > '%llx' expects argument of type 'long long unsigned int', but argument
> > 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
> >                          (fmt), ## __VA_ARGS__)
> >                          ^
> > /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
> >          error_setg(errp, "aligment 0x%" PRIx64
> >          ^
> 
> Eduardo you can quickly check that running:
> 
>   $ make docker-test-build@debian-win32-cross
>   (or use the debian-armel-cross image, but win32 is often weirder)
> 
> I hope one day compiler get smart enough to automatically fix those
> mistakes :)

I just ran that, no warnings at all.
Eduardo Habkost Jan. 18, 2018, 8:14 p.m. UTC | #4
On Thu, Jan 18, 2018 at 12:36:19PM -0300, Philippe Mathieu-Daudé wrote:
> On 01/18/2018 12:22 PM, Peter Maydell wrote:
> > On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> >> The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
> >>
> >>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
> >>
> >> for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
> >>
> >>   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
> >>
> >> ----------------------------------------------------------------
> >> machine queue, 2018-01-18
> >>
> >> ----------------------------------------------------------------
> > 
> > Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> > format string problem:
> > 
> > In file included from /home/peter.maydell/qemu/exec.c:20:0:
> > /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> > /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> > '%llx' expects argument of type 'long long unsigned int', but argument
> > 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
> >                          (fmt), ## __VA_ARGS__)
> >                          ^
> > /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
> >          error_setg(errp, "aligment 0x%" PRIx64
> >          ^
> 
> Eduardo you can quickly check that running:
> 
>   $ make docker-test-build@debian-win32-cross
>   (or use the debian-armel-cross image, but win32 is often weirder)
> 
> I hope one day compiler get smart enough to automatically fix those
> mistakes :)

Reproduced using "make docker-test-build@debian-armel-cross".
Eduardo Habkost Jan. 18, 2018, 9:20 p.m. UTC | #5
On Thu, Jan 18, 2018 at 03:22:05PM +0000, Peter Maydell wrote:
> On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
> >
> >   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
> >
> > are available in the Git repository at:
> >
> >   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
> >
> > for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
> >
> >   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
> >
> > ----------------------------------------------------------------
> > machine queue, 2018-01-18
> >
> > ----------------------------------------------------------------
> 
> Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> format string problem:
> 
> In file included from /home/peter.maydell/qemu/exec.c:20:0:
> /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> '%llx' expects argument of type 'long long unsigned int', but argument
> 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
>                          (fmt), ## __VA_ARGS__)
>                          ^
> /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
>          error_setg(errp, "aligment 0x%" PRIx64
>          ^

Sorry for not catching this.  Fixup will be included on a new
pull request:

diff --git a/exec.c b/exec.c
index 00055559b8..7bba8ef4ab 100644
--- a/exec.c
+++ b/exec.c
@@ -1613,8 +1613,8 @@ static void *file_ram_alloc(RAMBlock *block,
 
     block->page_size = qemu_fd_getpagesize(fd);
     if (block->mr->align % block->page_size) {
-        error_setg(errp, "aligment 0x%" PRIx64
-                   " must be multiples of page size 0x%" PRIx64,
+        error_setg(errp, "alignment 0x%" PRIx64
+                   " must be multiples of page size 0x%zd",
                    block->mr->align, block->page_size);
         return NULL;
     }
Haozhong Zhang Jan. 19, 2018, 12:47 a.m. UTC | #6
On 01/18/18 19:20 -0200, Eduardo Habkost wrote:
> On Thu, Jan 18, 2018 at 03:22:05PM +0000, Peter Maydell wrote:
> > On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > > The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
> > >
> > >   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
> > >
> > > are available in the Git repository at:
> > >
> > >   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
> > >
> > > for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
> > >
> > >   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
> > >
> > > ----------------------------------------------------------------
> > > machine queue, 2018-01-18
> > >
> > > ----------------------------------------------------------------
> > 
> > Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> > format string problem:
> > 
> > In file included from /home/peter.maydell/qemu/exec.c:20:0:
> > /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> > /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> > '%llx' expects argument of type 'long long unsigned int', but argument
> > 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
> >                          (fmt), ## __VA_ARGS__)
> >                          ^
> > /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
> >          error_setg(errp, "aligment 0x%" PRIx64
> >          ^
> 
> Sorry for not catching this.  Fixup will be included on a new
> pull request:
> 
> diff --git a/exec.c b/exec.c
> index 00055559b8..7bba8ef4ab 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1613,8 +1613,8 @@ static void *file_ram_alloc(RAMBlock *block,
>  
>      block->page_size = qemu_fd_getpagesize(fd);
>      if (block->mr->align % block->page_size) {
> -        error_setg(errp, "aligment 0x%" PRIx64
> -                   " must be multiples of page size 0x%" PRIx64,
> +        error_setg(errp, "alignment 0x%" PRIx64
> +                   " must be multiples of page size 0x%zd",
                                                       ^^^^^^ 0x%zx, or remove the prefix '0x'

>                     block->mr->align, block->page_size);
>          return NULL;
>      }
> 
> -- 
> Eduardo
>
Eduardo Habkost Jan. 19, 2018, 1:15 p.m. UTC | #7
On Fri, Jan 19, 2018 at 08:47:28AM +0800, Haozhong Zhang wrote:
> On 01/18/18 19:20 -0200, Eduardo Habkost wrote:
> > On Thu, Jan 18, 2018 at 03:22:05PM +0000, Peter Maydell wrote:
> > > On 18 January 2018 at 02:09, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > > > The following changes since commit 8e5dc9ba49743b46d955ec7dacb04e42ae7ada7c:
> > > >
> > > >   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180116' into staging (2018-01-16 17:36:39 +0000)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > >   git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
> > > >
> > > > for you to fetch changes up to 901cc8d31f36ac82824ab68f656ab7050404100c:
> > > >
> > > >   fw_cfg: fix memory corruption when all fw_cfg slots are used (2018-01-17 23:04:37 -0200)
> > > >
> > > > ----------------------------------------------------------------
> > > > machine queue, 2018-01-18
> > > >
> > > > ----------------------------------------------------------------
> > > 
> > > Hi. I'm afraid this doesn't build on 32-bit hosts, due to a
> > > format string problem:
> > > 
> > > In file included from /home/peter.maydell/qemu/exec.c:20:0:
> > > /home/peter.maydell/qemu/exec.c: In function 'file_ram_alloc':
> > > /home/peter.maydell/qemu/include/qapi/error.h:162:25: error: format
> > > '%llx' expects argument of type 'long long unsigned int', but argument
> > > 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
> > >                          (fmt), ## __VA_ARGS__)
> > >                          ^
> > > /home/peter.maydell/qemu/exec.c:1616:9: note: in expansion of macro 'error_setg'
> > >          error_setg(errp, "aligment 0x%" PRIx64
> > >          ^
> > 
> > Sorry for not catching this.  Fixup will be included on a new
> > pull request:
> > 
> > diff --git a/exec.c b/exec.c
> > index 00055559b8..7bba8ef4ab 100644
> > --- a/exec.c
> > +++ b/exec.c
> > @@ -1613,8 +1613,8 @@ static void *file_ram_alloc(RAMBlock *block,
> >  
> >      block->page_size = qemu_fd_getpagesize(fd);
> >      if (block->mr->align % block->page_size) {
> > -        error_setg(errp, "aligment 0x%" PRIx64
> > -                   " must be multiples of page size 0x%" PRIx64,
> > +        error_setg(errp, "alignment 0x%" PRIx64
> > +                   " must be multiples of page size 0x%zd",
>                                                        ^^^^^^ 0x%zx, or remove the prefix '0x'

Oops.  Luckily the pull request wasn't submitted yet.