All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25
@ 2017-09-24 21:22 Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 01/31] configure: Remove unused code (found by shellcheck) Michael Tokarev
                   ` (31 more replies)
  0 siblings, 32 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Tokarev, qemu-trivial

This is a collection of trivial stuff collected for quite some time.
It includes various stuff, and just one series from
Philippe Mathieu-Daudé (MAINTAINERS update), - other his series are
in the works.

Thanks,

/mjt

The following changes since commit 460b6c8e581aa06b86f59eebd9e52edfe7adf417:

  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-09-23 12:55:40 +0100)

are available in the git repository at:

  git://git.corpit.ru/qemu.git tags/trivial-patches-fetch

for you to fetch changes up to 97fb016a2aae686098f01d1c2dc194ed0f8e1c36:

  hw/isa/pc87312: Mark the device with user_creatable = false (2017-09-25 00:09:11 +0300)

----------------------------------------------------------------
trivial patches for 2017-09-25

----------------------------------------------------------------
Alistair Francis (1):
      target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro

Eduardo Otubo (2):
      filter-mirror: segfault when specifying non existent device
      dma/i82374: avoid double creation of i82374 device

Eric Blake (2):
      osdep: Fix ROUND_UP(64-bit, 32-bit)
      nbd-client: Use correct macro parenthesization

KONRAD Frederic (1):
      aux-to-i2c-bridge: don't allow user to create one

Kamil Rytarowski (2):
      Replace round_page() with TARGET_PAGE_ALIGN()
      Drop gld linker usage on SunOS

Liang Yan (2):
      hw/display/xenfb.c: Add trace_xenfb_key_event
      chardev/baum: fix baum that releases brlapi twice

Michael Tokarev (1):
      remove trailing whitespace from qemu-options.hx

Peter Maydell (1):
      util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT

Philippe Mathieu-Daudé (14):
      MAINTAINERS: add missing ARM entries
      MAINTAINERS: add missing STM32 entry
      MAINTAINERS: add missing entry for vhost
      MAINTAINERS: add missing VMWare entry
      MAINTAINERS: add missing Guest Agent entries
      MAINTAINERS: add missing qcow2 entry
      MAINTAINERS: add missing PCI entries
      MAINTAINERS: add missing SSI entries
      MAINTAINERS: add missing entries for throttling infra
      MAINTAINERS: add missing AIO entry
      MAINTAINERS: add missing entry for Generic Loader
      MAINTAINERS: add missing Cryptography entry
      MAINTAINERS: update docs/devel/ entries
      MAINTAINERS: update docs/interop/ entries

Stefan Weil (1):
      configure: Remove unused code (found by shellcheck)

Thomas Huth (4):
      trivial: Add missing "-m" parameter in docs/memory-hotplug.txt
      hw/display/virtio-gpu: Put the virtio-gpu-device into the display category
      tests/boot-sector: Increase timeout to 600 seconds
      hw/isa/pc87312: Mark the device with user_creatable = false

 MAINTAINERS                 | 42 ++++++++++++++++++++++++++++++++----------
 block/nbd-client.c          |  4 ++--
 chardev/baum.c              |  1 +
 configure                   | 17 +++++++++++++++--
 docs/memory-hotplug.txt     |  2 +-
 hw/display/trace-events     |  1 +
 hw/display/virtio-gpu.c     |  1 +
 hw/display/xenfb.c          |  1 +
 hw/dma/i82374.c             |  5 +++++
 hw/isa/pc87312.c            |  2 ++
 hw/misc/auxbus.c            | 11 +++++++++++
 hw/ppc/mac_newworld.c       | 11 +++--------
 hw/ppc/mac_oldworld.c       | 11 +++--------
 include/qemu/osdep.h        |  6 +++---
 include/qemu/thread-posix.h |  2 +-
 net/filter-mirror.c         | 14 +++++++++++---
 qemu-options.hx             |  4 ++--
 target/xtensa/op_helper.c   |  4 ++--
 tests/boot-sector.c         |  4 ++--
 util/qemu-thread-posix.c    | 10 +++++-----
 20 files changed, 104 insertions(+), 49 deletions(-)

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

* [Qemu-devel] [PULL 01/31] configure: Remove unused code (found by shellcheck)
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 02/31] Replace round_page() with TARGET_PAGE_ALIGN() Michael Tokarev
                   ` (30 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, qemu-trivial, Michael Tokarev

From: Stefan Weil <sw@weilnetz.de>

smartcard_cflags is no longer needed since commit
0b22ef0f57a8910d849602bef0940edcd0553d2c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index 133a5757ef..12d4e4ebfa 100755
--- a/configure
+++ b/configure
@@ -4229,7 +4229,6 @@ EOF
 fi
 
 # check for smartcard support
-smartcard_cflags=""
 if test "$smartcard" != "no"; then
     if $pkg_config libcacard; then
         libcacard_cflags=$($pkg_config --cflags libcacard)
-- 
2.11.0

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

* [Qemu-devel] [PULL 02/31] Replace round_page() with TARGET_PAGE_ALIGN()
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 01/31] configure: Remove unused code (found by shellcheck) Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 03/31] MAINTAINERS: add missing ARM entries Michael Tokarev
                   ` (29 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kamil Rytarowski, qemu-trivial, Michael Tokarev

From: Kamil Rytarowski <n54@gmx.com>

This change fixes conflict with the DragonFly BSD headers.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/ppc/mac_newworld.c | 11 +++--------
 hw/ppc/mac_oldworld.c | 11 +++--------
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 33b46cb50b..d013c412d6 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -124,11 +124,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
-{
-    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
-}
-
 static void ppc_core99_reset(void *opaque)
 {
     PowerPCCPU *cpu = opaque;
@@ -252,7 +247,7 @@ static void ppc_core99_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -260,11 +255,11 @@ static void ppc_core99_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 193b9047d9..61838c3e6f 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -66,11 +66,6 @@ static uint64_t translate_kernel_address(void *opaque, uint64_t addr)
     return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
 }
 
-static hwaddr round_page(hwaddr addr)
-{
-    return (addr + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK;
-}
-
 static void ppc_heathrow_reset(void *opaque)
 {
     PowerPCCPU *cpu = opaque;
@@ -187,7 +182,7 @@ static void ppc_heathrow_init(MachineState *machine)
         }
         /* load initrd */
         if (initrd_filename) {
-            initrd_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            initrd_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
             initrd_size = load_image_targphys(initrd_filename, initrd_base,
                                               ram_size - initrd_base);
             if (initrd_size < 0) {
@@ -195,11 +190,11 @@ static void ppc_heathrow_init(MachineState *machine)
                              initrd_filename);
                 exit(1);
             }
-            cmdline_base = round_page(initrd_base + initrd_size);
+            cmdline_base = TARGET_PAGE_ALIGN(initrd_base + initrd_size);
         } else {
             initrd_base = 0;
             initrd_size = 0;
-            cmdline_base = round_page(kernel_base + kernel_size + KERNEL_GAP);
+            cmdline_base = TARGET_PAGE_ALIGN(kernel_base + kernel_size + KERNEL_GAP);
         }
         ppc_boot_device = 'm';
     } else {
-- 
2.11.0

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

* [Qemu-devel] [PULL 03/31] MAINTAINERS: add missing ARM entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 01/31] configure: Remove unused code (found by shellcheck) Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 02/31] Replace round_page() with TARGET_PAGE_ALIGN() Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 04/31] MAINTAINERS: add missing STM32 entry Michael Tokarev
                   ` (28 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ffcd25bf1f..8593bfa09f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -380,6 +380,7 @@ M: Peter Maydell <peter.maydell@linaro.org>
 L: qemu-arm@nongnu.org
 S: Maintained
 F: hw/char/pl011.c
+F: include/hw/char/pl011.h
 F: hw/display/pl110*
 F: hw/dma/pl080.c
 F: hw/dma/pl330.c
@@ -403,13 +404,15 @@ F: hw/intc/gic_internal.h
 F: hw/misc/a9scu.c
 F: hw/misc/arm11scu.c
 F: hw/timer/a9gtimer*
-F: hw/timer/arm_*
-F: include/hw/arm/arm.h
+F: hw/timer/arm*
+F: include/hw/arm/arm*.h
 F: include/hw/intc/arm*
 F: include/hw/misc/a9scu.h
 F: include/hw/misc/arm11scu.h
 F: include/hw/timer/a9gtimer.h
 F: include/hw/timer/arm_mptimer.h
+F: include/hw/timer/armv7m_systick.h
+F: tests/test-arm-mptimer.c
 
 Exynos
 M: Igor Mitsyanko <i.mitsyanko@gmail.com>
@@ -512,6 +515,7 @@ M: Peter Maydell <peter.maydell@linaro.org>
 L: qemu-arm@nongnu.org
 S: Maintained
 F: hw/*/versatile*
+F: hw/misc/arm_sysctl.c
 
 Xilinx Zynq
 M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 04/31] MAINTAINERS: add missing STM32 entry
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (2 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 03/31] MAINTAINERS: add missing ARM entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 05/31] MAINTAINERS: add missing entry for vhost Michael Tokarev
                   ` (27 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 8593bfa09f..09e8e964ba 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -552,6 +552,7 @@ F: hw/char/stm32f2xx_usart.c
 F: hw/timer/stm32f2xx_timer.c
 F: hw/adc/*
 F: hw/ssi/stm32f2xx_spi.c
+F: include/hw/*/stm32*.h
 
 Netduino 2
 M: Alistair Francis <alistair@alistair23.me>
-- 
2.11.0

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

* [Qemu-devel] [PULL 05/31] MAINTAINERS: add missing entry for vhost
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (3 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 04/31] MAINTAINERS: add missing STM32 entry Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 06/31] MAINTAINERS: add missing VMWare entry Michael Tokarev
                   ` (26 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 09e8e964ba..96ba0ffba6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1034,6 +1034,7 @@ vhost
 M: Michael S. Tsirkin <mst@redhat.com>
 S: Supported
 F: hw/*/*vhost*
+F: docs/interop/vhost-user.txt
 
 virtio
 M: Michael S. Tsirkin <mst@redhat.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 06/31] MAINTAINERS: add missing VMWare entry
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (4 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 05/31] MAINTAINERS: add missing entry for vhost Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 07/31] MAINTAINERS: add missing Guest Agent entries Michael Tokarev
                   ` (25 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 96ba0ffba6..4d7a06a0ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1132,6 +1132,7 @@ M: Dmitry Fleytman <dmitry@daynix.com>
 S: Maintained
 F: hw/net/vmxnet*
 F: hw/scsi/vmw_pvscsi*
+F: tests/vmxnet3-test.c
 
 Rocker
 M: Jiri Pirko <jiri@resnulli.us>
-- 
2.11.0

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

* [Qemu-devel] [PULL 07/31] MAINTAINERS: add missing Guest Agent entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (5 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 06/31] MAINTAINERS: add missing VMWare entry Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 08/31] MAINTAINERS: add missing qcow2 entry Michael Tokarev
                   ` (24 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4d7a06a0ed..f86c68a107 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1462,6 +1462,10 @@ QEMU Guest Agent
 M: Michael Roth <mdroth@linux.vnet.ibm.com>
 S: Maintained
 F: qga/
+F: qemu-ga.texi
+F: scripts/qemu-guest-agent/
+F: tests/test-qga.c
+F: docs/interop/qemu-ga-ref.texi
 T: git git://github.com/mdroth/qemu.git qga
 
 QOM
-- 
2.11.0

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

* [Qemu-devel] [PULL 08/31] MAINTAINERS: add missing qcow2 entry
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (6 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 07/31] MAINTAINERS: add missing Guest Agent entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 09/31] MAINTAINERS: add missing PCI entries Michael Tokarev
                   ` (23 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index f86c68a107..b77131ec5f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1872,6 +1872,7 @@ M: Max Reitz <mreitz@redhat.com>
 L: qemu-block@nongnu.org
 S: Supported
 F: block/qcow2*
+F: docs/interop/qcow2.txt
 
 qcow
 M: Kevin Wolf <kwolf@redhat.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 09/31] MAINTAINERS: add missing PCI entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (7 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 08/31] MAINTAINERS: add missing qcow2 entry Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 10/31] MAINTAINERS: add missing SSI entries Michael Tokarev
                   ` (22 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index b77131ec5f..dcd07505b0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -930,6 +930,8 @@ F: include/hw/pci/*
 F: hw/misc/pci-testdev.c
 F: hw/pci/*
 F: hw/pci-bridge/*
+F: docs/pci*
+F: docs/specs/*pci*
 
 ACPI/SMBIOS
 M: Michael S. Tsirkin <mst@redhat.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 10/31] MAINTAINERS: add missing SSI entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (8 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 09/31] MAINTAINERS: add missing PCI entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 11/31] MAINTAINERS: add missing entries for throttling infra Michael Tokarev
                   ` (21 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Alistair Francis volunteered :)

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index dcd07505b0..041605ce13 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -990,10 +990,13 @@ F: hw/scsi/lsi53c895a.c
 
 SSI
 M: Peter Crosthwaite <crosthwaite.peter@gmail.com>
+M: Alistair Francis <alistair.francis@xilinx.com>
 S: Maintained
 F: hw/ssi/*
 F: hw/block/m25p80.c
+F: include/hw/ssi/ssi.h
 X: hw/ssi/xilinx_*
+F: tests/m25p80-test.c
 
 Xilinx SPI
 M: Alistair Francis <alistair.francis@xilinx.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 11/31] MAINTAINERS: add missing entries for throttling infra
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (9 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 10/31] MAINTAINERS: add missing SSI entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 12/31] MAINTAINERS: add missing AIO entry Michael Tokarev
                   ` (20 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 041605ce13..c40935f441 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1595,8 +1595,10 @@ M: Alberto Garcia <berto@igalia.com>
 S: Supported
 F: block/throttle-groups.c
 F: include/block/throttle-groups.h
-F: include/qemu/throttle.h
+F: include/qemu/throttle*.h
 F: util/throttle.c
+F: docs/throttle.txt
+F: tests/test-throttle.c
 L: qemu-block@nongnu.org
 
 UUID
-- 
2.11.0

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

* [Qemu-devel] [PULL 12/31] MAINTAINERS: add missing AIO entry
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (10 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 11/31] MAINTAINERS: add missing entries for throttling infra Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 13/31] MAINTAINERS: add missing entry for Generic Loader Michael Tokarev
                   ` (19 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index c40935f441..4ab3bdda29 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1229,6 +1229,7 @@ F: util/aio-*.c
 F: block/io.c
 F: migration/block*
 F: include/block/aio.h
+F: scripts/qemugdb/aio.py
 T: git git://github.com/stefanha/qemu.git block
 
 Block SCSI subsystem
-- 
2.11.0

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

* [Qemu-devel] [PULL 13/31] MAINTAINERS: add missing entry for Generic Loader
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (11 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 12/31] MAINTAINERS: add missing AIO entry Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 14/31] MAINTAINERS: add missing Cryptography entry Michael Tokarev
                   ` (18 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4ab3bdda29..1c659a94d0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1168,6 +1168,7 @@ M: Alistair Francis <alistair.francis@xilinx.com>
 S: Maintained
 F: hw/core/generic-loader.c
 F: include/hw/core/generic-loader.h
+F: docs/generic-loader.txt
 
 CHRP NVRAM
 M: Thomas Huth <thuth@redhat.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 14/31] MAINTAINERS: add missing Cryptography entry
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (12 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 13/31] MAINTAINERS: add missing entry for Generic Loader Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 15/31] MAINTAINERS: update docs/devel/ entries Michael Tokarev
                   ` (17 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1c659a94d0..1a5cd3c05c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1561,6 +1561,7 @@ S: Maintained
 F: crypto/
 F: include/crypto/
 F: tests/test-crypto-*
+F: tests/benchmark-crypto-*
 F: qemu.sasl
 
 Coroutines
-- 
2.11.0

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

* [Qemu-devel] [PULL 15/31] MAINTAINERS: update docs/devel/ entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (13 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 14/31] MAINTAINERS: add missing Cryptography entry Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 16/31] MAINTAINERS: update docs/interop/ entries Michael Tokarev
                   ` (16 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

moved in commit ac06724a7158

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1a5cd3c05c..f4444467e0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1440,7 +1440,7 @@ F: tests/test-qapi-*.c
 F: tests/test-qmp-*.c
 F: tests/test-visitor-serialization.c
 F: scripts/qapi*
-F: docs/qapi*
+F: docs/devel/qapi*
 T: git git://repo.or.cz/qemu/armbru.git qapi-next
 
 QAPI Schema
@@ -1492,7 +1492,7 @@ M: Markus Armbruster <armbru@redhat.com>
 S: Supported
 F: qmp.c
 F: monitor.c
-F: docs/*qmp-*
+F: docs/devel/*qmp-*
 F: scripts/qmp/
 F: tests/qmp-test.c
 T: git git://repo.or.cz/qemu/armbru.git qapi-next
@@ -1523,7 +1523,7 @@ S: Maintained
 F: trace/
 F: scripts/tracetool.py
 F: scripts/tracetool/
-F: docs/tracing.txt
+F: docs/devel/tracing.txt
 T: git git://github.com/stefanha/qemu.git tracing
 
 TPM
@@ -1546,7 +1546,7 @@ F: include/migration/
 F: migration/
 F: scripts/vmstate-static-checker.py
 F: tests/vmstate-static-checker-data/
-F: docs/migration.txt
+F: docs/devel/migration.txt
 F: qapi/migration.json
 
 Seccomp
@@ -1945,5 +1945,5 @@ Documentation
 Build system architecture
 M: Daniel P. Berrange <berrange@redhat.com>
 S: Odd Fixes
-F: docs/build-system.txt
+F: docs/devel/build-system.txt
 
-- 
2.11.0

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

* [Qemu-devel] [PULL 16/31] MAINTAINERS: update docs/interop/ entries
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (14 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 15/31] MAINTAINERS: update docs/devel/ entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 17/31] filter-mirror: segfault when specifying non existent device Michael Tokarev
                   ` (15 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

moved in commit 7746cf8aab68

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Fam Zheng <famz@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index f4444467e0..932443df41 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1271,7 +1271,7 @@ F: block/dirty-bitmap.c
 F: include/qemu/hbitmap.h
 F: include/block/dirty-bitmap.h
 F: tests/test-hbitmap.c
-F: docs/bitmaps.md
+F: docs/interop/bitmaps.rst
 T: git git://github.com/famz/qemu.git bitmaps
 T: git git://github.com/jnsnow/qemu.git bitmaps
 
@@ -1857,7 +1857,7 @@ M: Denis V. Lunev <den@openvz.org>
 L: qemu-block@nongnu.org
 S: Supported
 F: block/parallels.c
-F: docs/specs/parallels.txt
+F: docs/interop/parallels.txt
 
 qed
 M: Stefan Hajnoczi <stefanha@redhat.com>
-- 
2.11.0

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

* [Qemu-devel] [PULL 17/31] filter-mirror: segfault when specifying non existent device
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (15 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 16/31] MAINTAINERS: update docs/interop/ entries Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 18/31] util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT Michael Tokarev
                   ` (14 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eduardo Otubo, qemu-trivial, Michael Tokarev

From: Eduardo Otubo <otubo@redhat.com>

When using filter-mirror like the example below where the interface
'ndev0' does not exist on the host, QEMU crashes into segmentation
fault.

 $ qemu-system-x86_64 -S -machine pc -netdev user,id=ndev0 -object filter-mirror,id=test-object,netdev=ndev0

This happens because the function filter_mirror_setup() does not checks
if the device actually exists and still keep on processing calling
qemu_chr_find(). This patch fixes this issue.

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 net/filter-mirror.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/net/filter-mirror.c b/net/filter-mirror.c
index 90e2c92337..e18a4b16a0 100644
--- a/net/filter-mirror.c
+++ b/net/filter-mirror.c
@@ -213,14 +213,22 @@ static void filter_mirror_setup(NetFilterState *nf, Error **errp)
     MirrorState *s = FILTER_MIRROR(nf);
     Chardev *chr;
 
+    if (s->outdev == NULL) {
+        goto err;
+    }
+
     chr = qemu_chr_find(s->outdev);
+
     if (chr == NULL) {
-        error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
-                  "Device '%s' not found", s->outdev);
-        return;
+        goto err;
     }
 
     qemu_chr_fe_init(&s->chr_out, chr, errp);
+
+err:
+    error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found",
+              nf->netdev_id);
+    return;
 }
 
 static void redirector_rs_finalize(SocketReadState *rs)
-- 
2.11.0

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

* [Qemu-devel] [PULL 18/31] util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (16 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 17/31] filter-mirror: segfault when specifying non existent device Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 19/31] aux-to-i2c-bridge: don't allow user to create one Michael Tokarev
                   ` (13 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-trivial, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

In qemu-thread-posix.c we have two implementations of the
various qemu_sem_* functions, one of which uses native POSIX
sem_* and the other of which emulates them with pthread conditions.
This is necessary because not all our host OSes support
sem_timedwait().

Instead of a hard-coded list of OSes which don't implement
sem_timedwait(), which gets out of date, make configure
test for the presence of the function and set a new
CONFIG_HAVE_SEM_TIMEDWAIT appropriately.

In particular, newer NetBSDs have sem_timedwait(), so this
commit will switch them over to using it. OSX still does
not have an implementation.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 configure                   | 15 +++++++++++++++
 include/qemu/thread-posix.h |  2 +-
 util/qemu-thread-posix.c    | 10 +++++-----
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 12d4e4ebfa..1f7b4f03ce 100755
--- a/configure
+++ b/configure
@@ -4425,6 +4425,18 @@ if compile_prog "" "" ; then
 fi
 
 ##########################################
+# check if we have sem_timedwait
+
+sem_timedwait=no
+cat > $TMPC << EOF
+#include <semaphore.h>
+int main(void) { return sem_timedwait(0, 0); }
+EOF
+if compile_prog "" "" ; then
+    sem_timedwait=yes
+fi
+
+##########################################
 # check if trace backend exists
 
 $python "$source_path/scripts/tracetool.py" "--backends=$trace_backends" --check-backends  > /dev/null 2> /dev/null
@@ -5678,6 +5690,9 @@ fi
 if test "$inotify1" = "yes" ; then
   echo "CONFIG_INOTIFY1=y" >> $config_host_mak
 fi
+if test "$sem_timedwait" = "yes" ; then
+  echo "CONFIG_SEM_TIMEDWAIT=y" >> $config_host_mak
+fi
 if test "$byteswap_h" = "yes" ; then
   echo "CONFIG_BYTESWAP_H=y" >> $config_host_mak
 fi
diff --git a/include/qemu/thread-posix.h b/include/qemu/thread-posix.h
index e5e3a0ff97..f4296d31c4 100644
--- a/include/qemu/thread-posix.h
+++ b/include/qemu/thread-posix.h
@@ -21,7 +21,7 @@ struct QemuCond {
 };
 
 struct QemuSemaphore {
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     pthread_mutex_t lock;
     pthread_cond_t cond;
     unsigned int count;
diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
index 4e95d272dc..7306475899 100644
--- a/util/qemu-thread-posix.c
+++ b/util/qemu-thread-posix.c
@@ -168,7 +168,7 @@ void qemu_sem_init(QemuSemaphore *sem, int init)
 {
     int rc;
 
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     rc = pthread_mutex_init(&sem->lock, NULL);
     if (rc != 0) {
         error_exit(rc, __func__);
@@ -196,7 +196,7 @@ void qemu_sem_destroy(QemuSemaphore *sem)
 
     assert(sem->initialized);
     sem->initialized = false;
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     rc = pthread_cond_destroy(&sem->cond);
     if (rc < 0) {
         error_exit(rc, __func__);
@@ -218,7 +218,7 @@ void qemu_sem_post(QemuSemaphore *sem)
     int rc;
 
     assert(sem->initialized);
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     pthread_mutex_lock(&sem->lock);
     if (sem->count == UINT_MAX) {
         rc = EINVAL;
@@ -256,7 +256,7 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
     struct timespec ts;
 
     assert(sem->initialized);
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     rc = 0;
     compute_abs_deadline(&ts, ms);
     pthread_mutex_lock(&sem->lock);
@@ -304,7 +304,7 @@ void qemu_sem_wait(QemuSemaphore *sem)
     int rc;
 
     assert(sem->initialized);
-#if defined(__APPLE__) || defined(__NetBSD__)
+#ifndef CONFIG_SEM_TIMEDWAIT
     pthread_mutex_lock(&sem->lock);
     while (sem->count == 0) {
         rc = pthread_cond_wait(&sem->cond, &sem->lock);
-- 
2.11.0

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

* [Qemu-devel] [PULL 19/31] aux-to-i2c-bridge: don't allow user to create one
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (17 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 18/31] util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 20/31] hw/display/xenfb.c: Add trace_xenfb_key_event Michael Tokarev
                   ` (12 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: KONRAD Frederic, qemu-trivial, Michael Tokarev

From: KONRAD Frederic <frederic.konrad@adacore.com>

This device is private and is created once per aux-bus.
So don't allow the user to create one from command-line.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/misc/auxbus.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index 8a90ddda84..1182745044 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -210,6 +210,16 @@ struct AUXTOI2CState {
     I2CBus *i2c_bus;
 };
 
+static void aux_bridge_class_init(ObjectClass *oc, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(oc);
+
+    /* This device is private and is created only once for each
+     * aux-bus in aux_init_bus(..). So don't allow the user to add one.
+     */
+    dc->user_creatable = false;
+}
+
 static void aux_bridge_init(Object *obj)
 {
     AUXTOI2CState *s = AUXTOI2C(obj);
@@ -225,6 +235,7 @@ static inline I2CBus *aux_bridge_get_i2c_bus(AUXTOI2CState *bridge)
 static const TypeInfo aux_to_i2c_type_info = {
     .name = TYPE_AUXTOI2C,
     .parent = TYPE_DEVICE,
+    .class_init = aux_bridge_class_init,
     .instance_size = sizeof(AUXTOI2CState),
     .instance_init = aux_bridge_init
 };
-- 
2.11.0

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

* [Qemu-devel] [PULL 20/31] hw/display/xenfb.c: Add trace_xenfb_key_event
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (18 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 19/31] aux-to-i2c-bridge: don't allow user to create one Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 21/31] remove trailing whitespace from qemu-options.hx Michael Tokarev
                   ` (11 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Liang Yan, qemu-trivial, Michael Tokarev

From: Liang Yan <lyan@suse.com>

It may be better to add a trace event to monitor the last moment of
a key event from QEMU to guest VM

Signed-off-by: Liang Yan <lyan@suse.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/display/trace-events | 1 +
 hw/display/xenfb.c      | 1 +
 2 files changed, 2 insertions(+)

diff --git a/hw/display/trace-events b/hw/display/trace-events
index ed8cca0755..da498c1def 100644
--- a/hw/display/trace-events
+++ b/hw/display/trace-events
@@ -6,6 +6,7 @@ jazz_led_write(uint64_t addr, uint8_t new) "write addr=0x%"PRIx64": 0x%x"
 
 # hw/display/xenfb.c
 xenfb_mouse_event(void *opaque, int dx, int dy, int dz, int button_state, int abs_pointer_wanted) "%p x %d y %d z %d bs 0x%x abs %d"
+xenfb_key_event(void *opaque, int scancode, int button_state) "%p scancode %d bs 0x%x"
 xenfb_input_connected(void *xendev, int abs_pointer_wanted) "%p abs %d"
 
 # hw/display/g364fb.c
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index df8b78f6f4..8e2547ac05 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -290,6 +290,7 @@ static void xenfb_key_event(void *opaque, int scancode)
 	scancode |= 0x80;
 	xenfb->extended = 0;
     }
+    trace_xenfb_key_event(opaque, scancode2linux[scancode], down);
     xenfb_send_key(xenfb, down, scancode2linux[scancode]);
 }
 
-- 
2.11.0

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

* [Qemu-devel] [PULL 21/31] remove trailing whitespace from qemu-options.hx
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (19 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 20/31] hw/display/xenfb.c: Add trace_xenfb_key_event Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 22/31] chardev/baum: fix baum that releases brlapi twice Michael Tokarev
                   ` (10 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Tokarev, qemu-trivial

Remove trailing whitespace in qemu-options documentation, as it causes
reproducibility issues depending on the echo implementation used by
the Makefile.

Reported-By: Vagrant Cascadian <vagrant@debian.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 qemu-options.hx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index 77859a248c..39225ae6c3 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -284,8 +284,8 @@ Set default value of @var{driver}'s property @var{prop} to @var{value}, e.g.:
 qemu-system-i386 -global ide-hd.physical_block_size=4096 disk-image.img
 @end example
 
-In particular, you can use this to set driver properties for devices which are 
-created automatically by the machine model. To create a device which is not 
+In particular, you can use this to set driver properties for devices which are
+created automatically by the machine model. To create a device which is not
 created automatically and set properties on it, use -@option{device}.
 
 -global @var{driver}.@var{prop}=@var{value} is shorthand for -global
-- 
2.11.0

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

* [Qemu-devel] [PULL 22/31] chardev/baum: fix baum that releases brlapi twice
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (20 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 21/31] remove trailing whitespace from qemu-options.hx Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 23/31] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt Michael Tokarev
                   ` (9 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Liang Yan, qemu-trivial, Michael Tokarev

From: Liang Yan <lyan@suse.com>

Error process of baum_chr_open needs to set brlapi null, so it won't
get released twice in char_braille_finalize, which will cause
"/usr/bin/qemu-system-x86_64: double free or corruption (!prev)"

Signed-off-by: Liang Yan <lyan@suse.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 chardev/baum.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/chardev/baum.c b/chardev/baum.c
index 302dd9666c..67fd783a59 100644
--- a/chardev/baum.c
+++ b/chardev/baum.c
@@ -643,6 +643,7 @@ static void baum_chr_open(Chardev *chr,
         error_setg(errp, "brlapi__openConnection: %s",
                    brlapi_strerror(brlapi_error_location()));
         g_free(handle);
+        baum->brlapi = NULL;
         return;
     }
     baum->deferred_init = 0;
-- 
2.11.0

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

* [Qemu-devel] [PULL 23/31] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (21 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 22/31] chardev/baum: fix baum that releases brlapi twice Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 24/31] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro Michael Tokarev
                   ` (8 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The example obviously lacks the "-m" parameter.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 docs/memory-hotplug.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/memory-hotplug.txt b/docs/memory-hotplug.txt
index 56bdd0a47b..d96397c1af 100644
--- a/docs/memory-hotplug.txt
+++ b/docs/memory-hotplug.txt
@@ -24,7 +24,7 @@ Where,
 
 For example, the following command-line:
 
- qemu [...] 1G,slots=3,maxmem=4G
+ qemu [...] -m 1G,slots=3,maxmem=4G
 
 Creates a guest with 1GB of memory and three hotpluggable memory slots.
 The hotpluggable memory slots are empty when the guest is booted, so all
-- 
2.11.0

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

* [Qemu-devel] [PULL 24/31] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (22 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 23/31] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 25/31] osdep: Fix ROUND_UP(64-bit, 32-bit) Michael Tokarev
                   ` (7 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alistair Francis, qemu-trivial, Michael Tokarev

From: Alistair Francis <alistair.francis@xilinx.com>

Instead of using the hardcoded (MemTxAttrs){0} for no memory attributes
let's use the already defined MEMTXATTRS_UNSPECIFIED macro instead.

This is technically a change of behaviour as MEMTXATTRS_UNSPECIFIED sets
the unspecified field to 1, but it doesn't look like anything is
checking this field.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 target/xtensa/op_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c
index 519fbeddd6..3d990c0caa 100644
--- a/target/xtensa/op_helper.c
+++ b/target/xtensa/op_helper.c
@@ -1025,11 +1025,11 @@ void HELPER(ule_s)(CPUXtensaState *env, uint32_t br, float32 a, float32 b)
 uint32_t HELPER(rer)(CPUXtensaState *env, uint32_t addr)
 {
     return address_space_ldl(env->address_space_er, addr,
-                             (MemTxAttrs){0}, NULL);
+                             MEMTXATTRS_UNSPECIFIED, NULL);
 }
 
 void HELPER(wer)(CPUXtensaState *env, uint32_t data, uint32_t addr)
 {
     address_space_stl(env->address_space_er, addr, data,
-                      (MemTxAttrs){0}, NULL);
+                      MEMTXATTRS_UNSPECIFIED, NULL);
 }
-- 
2.11.0

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

* [Qemu-devel] [PULL 25/31] osdep: Fix ROUND_UP(64-bit, 32-bit)
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (23 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 24/31] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 26/31] hw/display/virtio-gpu: Put the virtio-gpu-device into the display category Michael Tokarev
                   ` (6 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Blake, qemu-trivial, qemu-stable, Michael Tokarev

From: Eric Blake <eblake@redhat.com>

When using bit-wise operations that exploit the power-of-two
nature of the second argument of ROUND_UP(), we still need to
ensure that the mask is as wide as the first argument (done
by using a ternary to force proper arithmetic promotion).
Unpatched, ROUND_UP(2ULL*1024*1024*1024*1024, 512U) produces 0,
instead of the intended 2TiB, because negation of an unsigned
32-bit quantity followed by widening to 64-bits does not
sign-extend the mask.

Broken since its introduction in commit 292c8e50 (v1.5.0).
Callers that passed the same width type to both macro parameters,
or that had other code to ensure the first parameter's maximum
runtime value did not exceed the second parameter's width, are
unaffected, but I did not audit to see which (if any) existing
clients of the macro could trigger incorrect behavior (I found
the bug while adding a new use of the macro).

While preparing the patch, checkpatch complained about poor
spacing, so I also fixed that here and in the nearby DIV_ROUND_UP.

CC: qemu-trivial@nongnu.org
CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/qemu/osdep.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 72b75bf044..9dd318a7dd 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -205,13 +205,13 @@ extern int daemon(int, int);
 
 /* Round number up to multiple. Requires that d be a power of 2 (see
  * QEMU_ALIGN_UP for a safer but slower version on arbitrary
- * numbers) */
+ * numbers); works even if d is a smaller type than n.  */
 #ifndef ROUND_UP
-#define ROUND_UP(n,d) (((n) + (d) - 1) & -(d))
+#define ROUND_UP(n, d) (((n) + (d) - 1) & -(0 ? (n) : (d)))
 #endif
 
 #ifndef DIV_ROUND_UP
-#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
 #endif
 
 /*
-- 
2.11.0

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

* [Qemu-devel] [PULL 26/31] hw/display/virtio-gpu: Put the virtio-gpu-device into the display category
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (24 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 25/31] osdep: Fix ROUND_UP(64-bit, 32-bit) Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 27/31] nbd-client: Use correct macro parenthesization Michael Tokarev
                   ` (5 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The virtio-gpu-pci device is already in the display category, so the
virtio-gpu-device should be there, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/display/virtio-gpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 3a8f1e1a2d..6b5f119d96 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1321,6 +1321,7 @@ static void virtio_gpu_class_init(ObjectClass *klass, void *data)
 
     vdc->reset = virtio_gpu_reset;
 
+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
     dc->props = virtio_gpu_properties;
     dc->vmsd = &vmstate_virtio_gpu;
     dc->hotpluggable = false;
-- 
2.11.0

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

* [Qemu-devel] [PULL 27/31] nbd-client: Use correct macro parenthesization
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (25 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 26/31] hw/display/virtio-gpu: Put the virtio-gpu-device into the display category Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 28/31] dma/i82374: avoid double creation of i82374 device Michael Tokarev
                   ` (4 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Blake, qemu-trivial, Michael Tokarev

From: Eric Blake <eblake@redhat.com>

If 'bs' is a complex expression, we were only casting the front half
rather than the full expression.  Luckily, none of the callers were
passing bad arguments, but it's better to be robust up front.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 block/nbd-client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/nbd-client.c b/block/nbd-client.c
index ee7f758e68..cc05e73c2d 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -31,8 +31,8 @@
 #include "qapi/error.h"
 #include "nbd-client.h"
 
-#define HANDLE_TO_INDEX(bs, handle) ((handle) ^ ((uint64_t)(intptr_t)bs))
-#define INDEX_TO_HANDLE(bs, index)  ((index)  ^ ((uint64_t)(intptr_t)bs))
+#define HANDLE_TO_INDEX(bs, handle) ((handle) ^ (uint64_t)(intptr_t)(bs))
+#define INDEX_TO_HANDLE(bs, index)  ((index)  ^ (uint64_t)(intptr_t)(bs))
 
 static void nbd_recv_coroutines_wake_all(NBDClientSession *s)
 {
-- 
2.11.0

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

* [Qemu-devel] [PULL 28/31] dma/i82374: avoid double creation of i82374 device
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (26 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 27/31] nbd-client: Use correct macro parenthesization Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 29/31] tests/boot-sector: Increase timeout to 600 seconds Michael Tokarev
                   ` (3 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eduardo Otubo, qemu-trivial, Michael Tokarev

From: Eduardo Otubo <otubo@redhat.com>

QEMU fails when used with the following command line:

  ./ppc64-softmmu/qemu-system-ppc64 -S -machine 40p,accel=tcg -device i82374
  qemu-system-ppc64: hw/isa/isa-bus.c:110: isa_bus_dma: Assertion `!bus->dma[0] && !bus->dma[1]' failed.
  Aborted (core dumped)

The 40p machine type already creates the device i82374. If specified in the
command line, it will try to create it again, hence generating the error. The
function isa_bus_dma() isn't supposed to be called twice for the same bus. One
way to avoid this problem is to set user_creatable=false.

A possible fix in a near future would be making
isa_bus_dma()/DMA_init()/i82374_realize() return an error instead of asserting
as well.

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/dma/i82374.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c
index 6c0f975df0..e76dea8dc7 100644
--- a/hw/dma/i82374.c
+++ b/hw/dma/i82374.c
@@ -139,6 +139,11 @@ static void i82374_class_init(ObjectClass *klass, void *data)
     dc->realize = i82374_realize;
     dc->vmsd = &vmstate_i82374;
     dc->props = i82374_properties;
+    dc->user_creatable = false;
+    /*
+     * Reason: i82374_realize() crashes (assertion failure inside isa_bus_dma()
+     *         if the device is instantiated twice.
+     */
 }
 
 static const TypeInfo i82374_info = {
-- 
2.11.0

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

* [Qemu-devel] [PULL 29/31] tests/boot-sector: Increase timeout to 600 seconds
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (27 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 28/31] dma/i82374: avoid double creation of i82374 device Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 30/31] Drop gld linker usage on SunOS Michael Tokarev
                   ` (2 subsequent siblings)
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

If QEMU has been compiled with the flags --enable-tcg-interpreter and
--enable-debug, the guest is running incredibly slow. The pxe boot test
can take up to 400 seconds when testing the pseries ppc64 machine. While
we should still look for ways to speed up the test on the pseries machine,
it's better to increase the timeout in this test to 600 seconds anyway to
allow the test to pass successfully now with this unusal configuration
already.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 tests/boot-sector.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/boot-sector.c b/tests/boot-sector.c
index 9ee85370b0..be29d5bb9b 100644
--- a/tests/boot-sector.c
+++ b/tests/boot-sector.c
@@ -137,9 +137,9 @@ void boot_sector_test(void)
     uint16_t signature;
     int i;
 
-    /* Wait at most 90 seconds */
+    /* Wait at most 600 seconds (test is slow with TCI and --enable-debug) */
 #define TEST_DELAY (1 * G_USEC_PER_SEC / 10)
-#define TEST_CYCLES MAX((90 * G_USEC_PER_SEC / TEST_DELAY), 1)
+#define TEST_CYCLES MAX((600 * G_USEC_PER_SEC / TEST_DELAY), 1)
 
     /* Poll until code has run and modified memory.  Once it has we know BIOS
      * initialization is done.  TODO: check that IP reached the halt
-- 
2.11.0

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

* [Qemu-devel] [PULL 30/31] Drop gld linker usage on SunOS
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (28 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 29/31] tests/boot-sector: Increase timeout to 600 seconds Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-24 21:22 ` [Qemu-devel] [PULL 31/31] hw/isa/pc87312: Mark the device with user_creatable = false Michael Tokarev
  2017-09-25 23:22 ` [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Peter Maydell
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kamil Rytarowski, qemu-trivial, Michael Tokarev

From: Kamil Rytarowski <n54@gmx.com>

This is required to be removed on SmartOS (Illumos).
As of now there are no alternative supported SunOS distributions.

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 configure | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure b/configure
index 1f7b4f03ce..7727f6ba5b 100755
--- a/configure
+++ b/configure
@@ -746,7 +746,6 @@ SunOS)
   solaris="yes"
   make="${MAKE-gmake}"
   install="${INSTALL-ginstall}"
-  ld="gld"
   smbd="${SMBD-/usr/sfw/sbin/smbd}"
   if test -f /usr/include/sys/soundcard.h ; then
     audio_drv_list="oss"
-- 
2.11.0

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

* [Qemu-devel] [PULL 31/31] hw/isa/pc87312: Mark the device with user_creatable = false
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (29 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 30/31] Drop gld linker usage on SunOS Michael Tokarev
@ 2017-09-24 21:22 ` Michael Tokarev
  2017-09-25 23:22 ` [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Peter Maydell
  31 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-24 21:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

QEMU currently aborts if you try to use the device at the command
line:

$ ppc64-softmmu/qemu-system-ppc64 -S -machine prep -device pc87312
Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
qemu-system-ppc64: -device pc87312: Device 'parallel0' is in use
Aborted (core dumped)

It uses parallel_hds in its realize function, so I can not be
instantiated by the user again.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/isa/pc87312.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index 5ce9f0a062..48b29e3c3c 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -386,6 +386,8 @@ static void pc87312_class_init(ObjectClass *klass, void *data)
     dc->reset = pc87312_reset;
     dc->vmsd = &vmstate_pc87312;
     dc->props = pc87312_properties;
+    /* Reason: Uses parallel_hds[0] in realize(), so it can't be used twice */
+    dc->user_creatable = false;
 }
 
 static const TypeInfo pc87312_type_info = {
-- 
2.11.0

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

* Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25
  2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
                   ` (30 preceding siblings ...)
  2017-09-24 21:22 ` [Qemu-devel] [PULL 31/31] hw/isa/pc87312: Mark the device with user_creatable = false Michael Tokarev
@ 2017-09-25 23:22 ` Peter Maydell
  2017-09-26  5:57   ` Michael Tokarev
       [not found]   ` <55782343-4bb4-d5ed-2c5d-4dd0fc5764dd@tls.msk.ru>
  31 siblings, 2 replies; 36+ messages in thread
From: Peter Maydell @ 2017-09-25 23:22 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: QEMU Developers, QEMU Trivial

On 24 September 2017 at 22:22, Michael Tokarev <mjt@tls.msk.ru> wrote:
> This is a collection of trivial stuff collected for quite some time.
> It includes various stuff, and just one series from
> Philippe Mathieu-Daudé (MAINTAINERS update), - other his series are
> in the works.
>
> Thanks,
>
> /mjt
>
> The following changes since commit 460b6c8e581aa06b86f59eebd9e52edfe7adf417:
>
>   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-09-23 12:55:40 +0100)
>
> are available in the git repository at:
>
>   git://git.corpit.ru/qemu.git tags/trivial-patches-fetch
>
> for you to fetch changes up to 97fb016a2aae686098f01d1c2dc194ed0f8e1c36:
>
>   hw/isa/pc87312: Mark the device with user_creatable = false (2017-09-25 00:09:11 +0300)
>
> ----------------------------------------------------------------
> trivial patches for 2017-09-25

This fails 'make check' on most of my configs:

  GTESTER check-qtest-ppc64
qemu-system-ppc64: -object
filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0:
Device 'qtest-bn0' not found
Broken pipe
GTester: last random seed: R02Sb816ff80b7d08ef6a5328ff373d8cd65

GLib-CRITICAL **: void g_hook_destroy_link(GHookList *, GHook *):
assertion `hook != NULL' failed
aborting...
  GTESTER check-qtest-ppcemb
  GTESTER check-qtest-s390x
qemu-system-s390x: -object
filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0:
Device 'qtest-bn0' not found
Broken pipe
GTester: last random seed: R02S61c57a88e229192da22afbf90262d768

GLib-CRITICAL **: void g_hook_destroy_link(GHookList *, GHook *):
assertion `hook != NULL' failed
aborting...
  GTESTER check-qtest-sh4
  GTESTER check-qtest-sh4eb
  GTESTER check-qtest-sparc
  GTESTER check-qtest-sparc64
  GTESTER check-qtest-tricore
  GTESTER check-qtest-unicore32
  GTESTER check-qtest-x86_64
qemu-system-x86_64: -object
filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0:
Device 'qtest-bn0' not found
Broken pipe
GTester: last random seed: R02S2210aede2be05fdbaceb0c1e23378915

GLib-CRITICAL **: void g_hook_destroy_link(GHookList *, GHook *):
assertion `hook != NULL' failed
aborting...
  GTESTER check-qtest-xtensa


thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25
  2017-09-25 23:22 ` [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Peter Maydell
@ 2017-09-26  5:57   ` Michael Tokarev
  2017-09-26  7:48     ` Eduardo Otubo
       [not found]   ` <55782343-4bb4-d5ed-2c5d-4dd0fc5764dd@tls.msk.ru>
  1 sibling, 1 reply; 36+ messages in thread
From: Michael Tokarev @ 2017-09-26  5:57 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, QEMU Trivial, Eduardo Otubo, Zhang Chen

26.09.2017 02:22, Peter Maydell wrote:
[]
>> trivial patches for 2017-09-25
> 
> This fails 'make check' on most of my configs:
> 
>   GTESTER check-qtest-ppc64
> qemu-system-ppc64: -object
> filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0:
> Device 'qtest-bn0' not found
> Broken pipe
> GTester: last random seed: R02Sb816ff80b7d08ef6a5328ff373d8cd65
> 
> GLib-CRITICAL **: void g_hook_destroy_link(GHookList *, GHook *):
> assertion `hook != NULL' failed
> aborting...

For what it's worth, this time I just _forgot_ to run tests. What a shame..

It fails due to:

Author: Eduardo Otubo <otubo@redhat.com>
Date:   Mon Aug 21 17:50:05 2017 +0200

    filter-mirror: segfault when specifying non existent device

    When using filter-mirror like the example below where the interface
    'ndev0' does not exist on the host, QEMU crashes into segmentation
    fault.

     $ qemu-system-x86_64 -S -machine pc -netdev user,id=ndev0 -object filter-mirror,id=test-object,netdev=ndev0

    This happens because the function filter_mirror_setup() does not checks
    if the device actually exists and still keep on processing calling
    qemu_chr_find(). This patch fixes this issue.

    Signed-off-by: Eduardo Otubo <otubo@redhat.com>
    Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>

Reverting this patch makes it run again. Cc'ing Eduardo.

I'll remove this patch, patch "hw/isa/pc87312: Mark the device with
user_creatable = false" (will be replaced with a better variant),
and update another patch stripping one more trailing whitespace,
and resend.

Thanks,

/mjt

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

* Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25
       [not found]   ` <55782343-4bb4-d5ed-2c5d-4dd0fc5764dd@tls.msk.ru>
@ 2017-09-26  6:00     ` Michael Tokarev
  0 siblings, 0 replies; 36+ messages in thread
From: Michael Tokarev @ 2017-09-26  6:00 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, QEMU Trivial, Eduardo Otubo

26.09.2017 08:57, Michael Tokarev wrote:
..
> Reverting this patch makes it run again. Cc'ing Eduardo.
> 
> I'll remove this patch, patch "hw/isa/pc87312: Mark the device with
> user_creatable = false" (will be replaced with a better variant),

Actually "dma/i82374: avoid double creation of i82374 device" :)

(Also Cc'ing Eduardo :) )

/mjt

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

* Re: [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25
  2017-09-26  5:57   ` Michael Tokarev
@ 2017-09-26  7:48     ` Eduardo Otubo
  0 siblings, 0 replies; 36+ messages in thread
From: Eduardo Otubo @ 2017-09-26  7:48 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Peter Maydell, QEMU Developers, QEMU Trivial, Zhang Chen

On Tue, Sep 26, 2017 at 08:57:00AM +0300, Michael Tokarev wrote:
> 26.09.2017 02:22, Peter Maydell wrote:
> []
> >> trivial patches for 2017-09-25
> > 
> > This fails 'make check' on most of my configs:
> > 
> >   GTESTER check-qtest-ppc64
> > qemu-system-ppc64: -object
> > filter-mirror,id=qtest-f0,netdev=qtest-bn0,queue=tx,outdev=mirror0:
> > Device 'qtest-bn0' not found
> > Broken pipe
> > GTester: last random seed: R02Sb816ff80b7d08ef6a5328ff373d8cd65
> > 
> > GLib-CRITICAL **: void g_hook_destroy_link(GHookList *, GHook *):
> > assertion `hook != NULL' failed
> > aborting...
> 

That's really weird, I'm pretty sure I did run make check before
sending it. Anyways, thanks for catching this. I'll fix and resend.

> For what it's worth, this time I just _forgot_ to run tests. What a shame..
> 
> It fails due to:
> 
> Author: Eduardo Otubo <otubo@redhat.com>
> Date:   Mon Aug 21 17:50:05 2017 +0200
> 
>     filter-mirror: segfault when specifying non existent device
> 
>     When using filter-mirror like the example below where the interface
>     'ndev0' does not exist on the host, QEMU crashes into segmentation
>     fault.
> 
>      $ qemu-system-x86_64 -S -machine pc -netdev user,id=ndev0 -object filter-mirror,id=test-object,netdev=ndev0
> 
>     This happens because the function filter_mirror_setup() does not checks
>     if the device actually exists and still keep on processing calling
>     qemu_chr_find(). This patch fixes this issue.
> 
>     Signed-off-by: Eduardo Otubo <otubo@redhat.com>
>     Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
> 
> Reverting this patch makes it run again. Cc'ing Eduardo.
> 
> I'll remove this patch, patch "hw/isa/pc87312: Mark the device with
> user_creatable = false" (will be replaced with a better variant),
> and update another patch stripping one more trailing whitespace,
> and resend.
> 
> Thanks,
> 
> /mjt

-- 
Eduardo Otubo
Senior Software Engineer @ RedHat

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

end of thread, other threads:[~2017-09-26  7:49 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-24 21:22 [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 01/31] configure: Remove unused code (found by shellcheck) Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 02/31] Replace round_page() with TARGET_PAGE_ALIGN() Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 03/31] MAINTAINERS: add missing ARM entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 04/31] MAINTAINERS: add missing STM32 entry Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 05/31] MAINTAINERS: add missing entry for vhost Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 06/31] MAINTAINERS: add missing VMWare entry Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 07/31] MAINTAINERS: add missing Guest Agent entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 08/31] MAINTAINERS: add missing qcow2 entry Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 09/31] MAINTAINERS: add missing PCI entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 10/31] MAINTAINERS: add missing SSI entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 11/31] MAINTAINERS: add missing entries for throttling infra Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 12/31] MAINTAINERS: add missing AIO entry Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 13/31] MAINTAINERS: add missing entry for Generic Loader Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 14/31] MAINTAINERS: add missing Cryptography entry Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 15/31] MAINTAINERS: update docs/devel/ entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 16/31] MAINTAINERS: update docs/interop/ entries Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 17/31] filter-mirror: segfault when specifying non existent device Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 18/31] util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 19/31] aux-to-i2c-bridge: don't allow user to create one Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 20/31] hw/display/xenfb.c: Add trace_xenfb_key_event Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 21/31] remove trailing whitespace from qemu-options.hx Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 22/31] chardev/baum: fix baum that releases brlapi twice Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 23/31] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 24/31] target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 25/31] osdep: Fix ROUND_UP(64-bit, 32-bit) Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 26/31] hw/display/virtio-gpu: Put the virtio-gpu-device into the display category Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 27/31] nbd-client: Use correct macro parenthesization Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 28/31] dma/i82374: avoid double creation of i82374 device Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 29/31] tests/boot-sector: Increase timeout to 600 seconds Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 30/31] Drop gld linker usage on SunOS Michael Tokarev
2017-09-24 21:22 ` [Qemu-devel] [PULL 31/31] hw/isa/pc87312: Mark the device with user_creatable = false Michael Tokarev
2017-09-25 23:22 ` [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25 Peter Maydell
2017-09-26  5:57   ` Michael Tokarev
2017-09-26  7:48     ` Eduardo Otubo
     [not found]   ` <55782343-4bb4-d5ed-2c5d-4dd0fc5764dd@tls.msk.ru>
2017-09-26  6:00     ` Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.