From 0f9f39d491946cde7fd5adee05bf90ab69bcc932 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Tue, 28 Mar 2017 20:49:59 +0200 Subject: configure: Remove unused code (found by shellcheck) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit smartcard_cflags is no longer needed since commit 0b22ef0f57a8910d849602bef0940edcd0553d2c. Signed-off-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev --- 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) -- cgit v1.2.3 From 39d96847c930930d888af8b433224ff41ccb27a1 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 11 Sep 2017 22:16:10 +0200 Subject: Replace round_page() with TARGET_PAGE_ALIGN() This change fixes conflict with the DragonFly BSD headers. Signed-off-by: Kamil Rytarowski Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- 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 { -- cgit v1.2.3 From c6427ff7a09d4f93cc6f0176bb399b12f9aa1c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:31:32 -0300 Subject: MAINTAINERS: add missing ARM entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- 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 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 @@ -512,6 +515,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: hw/*/versatile* +F: hw/misc/arm_sysctl.c Xilinx Zynq M: Edgar E. Iglesias -- cgit v1.2.3 From 0e0d345b4f85ddb88675e1d85c3e7a6a71f2702c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:19 -0300 Subject: MAINTAINERS: add missing STM32 entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From 37f8043def3bb6e29f3f2c593b437bfa524f8c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:20 -0300 Subject: MAINTAINERS: add missing entry for vhost MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Signed-off-by: Michael Tokarev --- 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 S: Supported F: hw/*/*vhost* +F: docs/interop/vhost-user.txt virtio M: Michael S. Tsirkin -- cgit v1.2.3 From 5a49c1b34e5316905c23b608f6087ef29f2b2cf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:21 -0300 Subject: MAINTAINERS: add missing VMWare entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Dmitry Fleytman Signed-off-by: Michael Tokarev --- 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 S: Maintained F: hw/net/vmxnet* F: hw/scsi/vmw_pvscsi* +F: tests/vmxnet3-test.c Rocker M: Jiri Pirko -- cgit v1.2.3 From ab7f9f7d78d798baa920e80692f463eb270f95a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:22 -0300 Subject: MAINTAINERS: add missing Guest Agent entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Acked-by: Michael Roth Signed-off-by: Michael Tokarev --- 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 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 -- cgit v1.2.3 From b24f9882cc0d72e94692ca4bc4c0afcffdf906f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:23 -0300 Subject: MAINTAINERS: add missing qcow2 entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Acked-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- 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 L: qemu-block@nongnu.org S: Supported F: block/qcow2* +F: docs/interop/qcow2.txt qcow M: Kevin Wolf -- cgit v1.2.3 From 68179923a120519adba8fcee997828ab9b15c19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:25 -0300 Subject: MAINTAINERS: add missing PCI entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From 982d009a180ec5b98570ea251df237d0a170f561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:26 -0300 Subject: MAINTAINERS: add missing SSI entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alistair Francis volunteered :) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- 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 +M: Alistair Francis 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 -- cgit v1.2.3 From 8960393847b6fb8986db68ff130d2bb35e44430f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:27 -0300 Subject: MAINTAINERS: add missing entries for throttling infra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Michael Tokarev --- 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 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 -- cgit v1.2.3 From 0a4f9ad1eb7f39464e61dbbea0f4aead5fd2612a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:28 -0300 Subject: MAINTAINERS: add missing AIO entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Acked-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From c5e2ac7e5e8f25c6a1bd600c03fb91dc8e862dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:29 -0300 Subject: MAINTAINERS: add missing entry for Generic Loader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- 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 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 -- cgit v1.2.3 From 3947ecfc0afb5db8137ca8bc74d13c5a4df00fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:30 -0300 Subject: MAINTAINERS: add missing Cryptography entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Mathieu-Daudé Acked-by: Daniel P. Berrange Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From c39cdbf6f68190e6182c5f16091905754b3cfce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:31 -0300 Subject: MAINTAINERS: update docs/devel/ entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit moved in commit ac06724a7158 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- 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 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 S: Odd Fixes -F: docs/build-system.txt +F: docs/devel/build-system.txt -- cgit v1.2.3 From 5746c1cd152033c3f9ccdb1476dbb0f092659983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Sep 2017 14:36:32 -0300 Subject: MAINTAINERS: update docs/interop/ entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit moved in commit 7746cf8aab68 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Fam Zheng Acked-by: John Snow Signed-off-by: Michael Tokarev --- 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 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 -- cgit v1.2.3 From 401bc051d7706e33046d79539465b8326383a1b2 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 5 Sep 2017 13:19:32 +0100 Subject: util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT 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 Reviewed-by: Kamil Rytarowski Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- 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 @@ -4424,6 +4424,18 @@ if compile_prog "" "" ; then posix_syslog=yes fi +########################################## +# check if we have sem_timedwait + +sem_timedwait=no +cat > $TMPC << EOF +#include +int main(void) { return sem_timedwait(0, 0); } +EOF +if compile_prog "" "" ; then + sem_timedwait=yes +fi + ########################################## # check if trace backend exists @@ -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); -- cgit v1.2.3 From b9710bc911d8f3dbdb339296283b27951a8566f3 Mon Sep 17 00:00:00 2001 From: KONRAD Frederic Date: Fri, 25 Aug 2017 13:46:09 +0200 Subject: aux-to-i2c-bridge: don't allow user to create one 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 Signed-off-by: KONRAD Frederic Reviewed-by: Thomas Huth Signed-off-by: Michael Tokarev --- 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 }; -- cgit v1.2.3 From 6ec83befe18c1418c86782cbf2dd43ce59ea7c99 Mon Sep 17 00:00:00 2001 From: Liang Yan Date: Wed, 23 Aug 2017 11:27:36 -0400 Subject: hw/display/xenfb.c: Add trace_xenfb_key_event 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 Signed-off-by: Michael Tokarev --- 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]); } -- cgit v1.2.3 From a295d244e575c4e44432e26bfd4634a8dcbf48d7 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sat, 23 Sep 2017 19:31:59 +0300 Subject: remove trailing whitespace from qemu-options.hx 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 Signed-off-by: Michael Tokarev Reviewed-by: Stefan Hajnoczi --- 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 -- cgit v1.2.3 From 98e8790326d732fc79f0c133d9658f4761ba9cb7 Mon Sep 17 00:00:00 2001 From: Liang Yan Date: Fri, 22 Sep 2017 18:55:33 -0400 Subject: chardev/baum: fix baum that releases brlapi twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marc-André Lureau Signed-off-by: Michael Tokarev --- 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; -- cgit v1.2.3 From 77fc026cdf8c664123793a546a2e8eabb0168e3e Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 19 Sep 2017 11:02:26 +0200 Subject: trivial: Add missing "-m" parameter in docs/memory-hotplug.txt The example obviously lacks the "-m" parameter. Signed-off-by: Thomas Huth Reviewed-by: Igor Mammedov Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From 2c5b1d2a479273cec4c1be491745f48b0808b508 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 15 Sep 2017 14:56:07 -0700 Subject: target/xtensa: Use the pre-defined MEMTXATTRS_UNSPECIFIED macro 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 Acked-by: Max Filippov Signed-off-by: Michael Tokarev --- 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); } -- cgit v1.2.3 From 2098b073f398cd628c09c5a78537a6854e85830d Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 14 Sep 2017 08:49:23 -0500 Subject: osdep: Fix ROUND_UP(64-bit, 32-bit) 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 Reviewed-by: Laszlo Ersek Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- 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 /* -- cgit v1.2.3 From e837acfda1b02f49592803d1b82e8809b38d922b Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 15 Sep 2017 10:46:21 +0200 Subject: hw/display/virtio-gpu: Put the virtio-gpu-device into the display category 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 Signed-off-by: Michael Tokarev --- 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; -- cgit v1.2.3 From af5eeb2c3b691e13b55724e4b6d831cb054ffebe Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 18 Sep 2017 16:46:49 -0500 Subject: nbd-client: Use correct macro parenthesization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- 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) { -- cgit v1.2.3 From 07897000194a7e2810819598773732e1c71a5c5b Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 22 Sep 2017 05:06:57 +0200 Subject: tests/boot-sector: Increase timeout to 600 seconds 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 Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- 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 -- cgit v1.2.3 From a9b16ab368b623d00aaa3d55b0eafbf0e1fdde0b Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 11 Sep 2017 22:50:01 +0200 Subject: Drop gld linker usage on SunOS This is required to be removed on SmartOS (Illumos). As of now there are no alternative supported SunOS distributions. Signed-off-by: Kamil Rytarowski Signed-off-by: Michael Tokarev --- 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" -- cgit v1.2.3 From 35deebb2327227d8c5f4816476befb06f6329de6 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 13 Sep 2017 11:07:17 +0200 Subject: hw/isa/pc87312: Mark the device with user_creatable = false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Hervé Poussineau Signed-off-by: Michael Tokarev --- 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 = { -- cgit v1.2.3