Skip to contentSkip to conversation

Misc fixes for 2.9.0-rc1

GIT PULL Applied Paolo Bonzini 2 participants 6 messages Mar 20, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit ebedf0f9cd46b617df331eecc857c379d574ac62:

nios2: iic: Convert CPU prop to qom link (2017-03-18 18:22:54 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to b3d3a426da9b067366bc132d53a6fa6b72675b55:

hax: fix breakage in locking (2017-03-20 12:24:43 +0100)

----------------------------------------------------------------
fixes for 2.9-rc1, plus removal of -mno-cygwin references

----------------------------------------------------------------
Paolo Bonzini (2):
qemu-ga: obey LISTEN_PID when using systemd socket activation
configure: remove Cygwin

Stefano Stabellini (1):
xen: do not build backends for targets that do not support xen

Vincent Palatin (1):
hax: fix breakage in locking

 Makefile                 |   1 +
 bsd-user/mmap.c          |   5 ---
 configure                |   6 ---
 cpus.c                   |   3 +-
 hw/block/Makefile.objs   |   2 +-
 hw/char/Makefile.objs    |   2 +-
 hw/display/Makefile.objs |   2 +-
 hw/net/Makefile.objs     |   2 +-
 hw/usb/Makefile.objs     |   2 +-
 hw/xen/Makefile.objs     |   2 +-
 include/qemu/systemd.h   |  26 ++++++++++++
 qemu-nbd.c               | 100 ++++-------------------------------------------
 qga/main.c               |  51 ++++++------------------
 util/Makefile.objs       |   1 +
 util/systemd.c           |  77 ++++++++++++++++++++++++++++++++++++
 15 files changed, 134 insertions(+), 148 deletions(-)
 create mode 100644 include/qemu/systemd.h
 create mode 100644 util/systemd.c
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 3/4] configure: remove Cygwin

The Cygwin target is really compiling for native Win32 with -mno-cygwin. Except, GCC 4.7.0 has finally removed the long deprecated -mno-cygwin option, and that happened about five years ago.

Let it rest in peace.

---
 bsd-user/mmap.c | 5 -----
 configure       | 6 ------
 2 files changed, 11 deletions(-)
bsd-user/mmap.c +0 -5
index ee59073..1ad018a 100644
@@ -199,12 +199,7 @@ static int mmap_frag(abi_ulong real_start,
     return 0;
 }
 
-#if defined(__CYGWIN__)
-/* Cygwin doesn't have a whole lot of address space.  */
-static abi_ulong mmap_next_start = 0x18000000;
-#else
 static abi_ulong mmap_next_start = 0x40000000;
-#endif
 
 unsigned long last_brk;
 
configure +0 -6
index 99d8bec..b9a30cf 100755
@@ -553,12 +553,6 @@ fi
 HOST_VARIANT_DIR=""
 
 case $targetos in
-CYGWIN*)
-  mingw32="yes"
-  QEMU_CFLAGS="-mno-cygwin $QEMU_CFLAGS"
-  audio_possible_drivers="sdl"
-  audio_drv_list="sdl"
-;;
 MINGW32*)
   mingw32="yes"
   hax="yes"
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-devel] [PULL 4/4] hax: fix breakage in locking

In reply to Paolo Bonzini

From: Vincent Palatin <[email protected]>

use qemu_mutex_lock_iothread consistently in qemu_hax_cpu_thread_fn() as done in other _thread_fn functions, instead of grabbing directly the BQL. This way we ensure that iothread_locked is properly set.

On v2.9.0-rc0, QEMU was dying in an assertion in the mutex code when running with '--enable-hax' either on OSX or Windows. This bug was triggered since the code modification for multithreading added new usages of qemu_mutex_iothread_locked.
This fixes the breakage on both platforms, I can now run again a full Chromium OS image with HAX kernel acceleration.

Message-Id: <[email protected]>

---
 cpus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
cpus.c +2 -1
index b84a392..167d961 100644
@@ -1344,8 +1344,9 @@ static void *qemu_hax_cpu_thread_fn(void *arg)
 {
     CPUState *cpu = arg;
     int r;
+
+    qemu_mutex_lock_iothread();
     qemu_thread_get_self(cpu->thread);
-    qemu_mutex_lock(&qemu_global_mutex);
 
     cpu->thread_id = qemu_get_thread_id();
     cpu->created = true;
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-devel] [PULL 2/4] xen: do not build backends for targets that do not support xen

In reply to Paolo Bonzini

From: Stefano Stabellini <[email protected]>

Change Makefile.objs to use CONFIG_XEN instead of CONFIG_XEN_BACKEND, so that the Xen backends are only built for targets that support Xen.

Set CONFIG_XEN in the toplevel Makefile to ensure that files that are built only once pick up Xen support properly.

Message-Id: <[email protected]>

---
 Makefile                 | 1 +
 hw/block/Makefile.objs   | 2 +-
 hw/char/Makefile.objs    | 2 +-
 hw/display/Makefile.objs | 2 +-
 hw/net/Makefile.objs     | 2 +-
 hw/usb/Makefile.objs     | 2 +-
 hw/xen/Makefile.objs     | 2 +-
 7 files changed, 7 insertions(+), 6 deletions(-)
Makefile +1 -0
index 73e0c12..f4f90df 100644
@@ -26,6 +26,7 @@ endif
 
 CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
 CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
+CONFIG_XEN := $(CONFIG_XEN_BACKEND)
 CONFIG_ALL=y
 -include config-all-devices.mak
 -include config-all-disas.mak
hw/block/Makefile.objs +1 -1
index d4c3ab7..e0ed980 100644
@@ -4,7 +4,7 @@ common-obj-$(CONFIG_SSI_M25P80) += m25p80.o
 common-obj-$(CONFIG_NAND) += nand.o
 common-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o
 common-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
-common-obj-$(CONFIG_XEN_BACKEND) += xen_disk.o
+common-obj-$(CONFIG_XEN) += xen_disk.o
 common-obj-$(CONFIG_ECC) += ecc.o
 common-obj-$(CONFIG_ONENAND) += onenand.o
 common-obj-$(CONFIG_NVME_PCI) += nvme.o
hw/char/Makefile.objs +1 -1
index 6ea76fe..725fdc4 100644
@@ -7,7 +7,7 @@ common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o
 common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o
 common-obj-$(CONFIG_VIRTIO) += virtio-console.o
 common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
-common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o
+common-obj-$(CONFIG_XEN) += xen_console.o
 common-obj-$(CONFIG_CADENCE) += cadence_uart.o
 
 obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o
hw/display/Makefile.objs +1 -1
index 063889b..3d02e8b 100644
@@ -5,7 +5,7 @@ common-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
 common-obj-$(CONFIG_PL110) += pl110.o
 common-obj-$(CONFIG_SSD0303) += ssd0303.o
 common-obj-$(CONFIG_SSD0323) += ssd0323.o
-common-obj-$(CONFIG_XEN_BACKEND) += xenfb.o
+common-obj-$(CONFIG_XEN) += xenfb.o
 
 common-obj-$(CONFIG_VGA_PCI) += vga-pci.o
 common-obj-$(CONFIG_VGA_ISA) += vga-isa.o
hw/net/Makefile.objs +1 -1
index 610ed3e..6a95d92 100644
@@ -1,5 +1,5 @@
 common-obj-$(CONFIG_DP8393X) += dp8393x.o
-common-obj-$(CONFIG_XEN_BACKEND) += xen_nic.o
+common-obj-$(CONFIG_XEN) += xen_nic.o
 
 # PCI network cards
 common-obj-$(CONFIG_NE2000_PCI) += ne2000.o
hw/usb/Makefile.objs +1 -1
index 98b5c9d..5958be8 100644
@@ -40,5 +40,5 @@ common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
 common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
 
 ifeq ($(CONFIG_USB_LIBUSB),y)
-common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o
+common-obj-$(CONFIG_XEN) += xen-usb.o
 endif
hw/xen/Makefile.objs +1 -1
index 591cdc2..4be3ec9 100644
@@ -1,5 +1,5 @@
 # xen backend driver support
-common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o xen_pvdev.o
+common-obj-$(CONFIG_XEN) += xen_backend.o xen_devconfig.o xen_pvdev.o
 
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
 obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o
Signature · 1 line
2.9.3
#4 lore raw

[Qemu-devel] [PULL 1/4] qemu-ga: obey LISTEN_PID when using systemd socket activation

In reply to Paolo Bonzini

qemu-ga's socket activation support was not obeying the LISTEN_PID environment variable, which avoids that a process uses a socket-activation file descriptor meant for its parent.

Mess can for example ensue if a process forks a children before consuming the socket-activation file descriptor and therefore setting O_CLOEXEC on it.

Luckily, qemu-nbd also got socket activation code, and its copy does support LISTEN_PID. Some extra fixups are needed to ensure that the code can be used for both, but that's what this patch does. The main change is to replace get_listen_fds's "consume" argument with the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code.

Cc "Richard W.M. Jones" <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 include/qemu/systemd.h |  26 +++++++++++++
 qemu-nbd.c             | 100 ++++---------------------------------------------
 qga/main.c             |  51 +++++++------------------
 util/Makefile.objs     |   1 +
 util/systemd.c         |  77 +++++++++++++++++++++++++++++++++++++
 5 files changed, 125 insertions(+), 130 deletions(-)
 create mode 100644 include/qemu/systemd.h
 create mode 100644 util/systemd.c
include/qemu/systemd.h new file +26 -0
new file mode 100644
index 0000000..e6a877e
@@ -0,0 +1,26 @@
+/*
+ * systemd socket activation support
+ *
+ * Copyright 2017 Red Hat, Inc. and/or its affiliates
+ *
+ * Authors:
+ *  Richard W.M. Jones <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_SYSTEMD_H
+#define QEMU_SYSTEMD_H 1
+
+#define FIRST_SOCKET_ACTIVATION_FD 3 /* defined by systemd ABI */
+
+/*
+ * Check if socket activation was requested via use of the
+ * LISTEN_FDS and LISTEN_PID environment variables.
+ *
+ * Returns 0 if no socket activation, or the number of FDs.
+ */
+unsigned int check_socket_activation(void);
+
+#endif
qemu-nbd.c +8 -92

118 lines not on this page · raw message

qga/main.c +13 -38

99 lines not on this page · raw message

util/Makefile.objs +1 -0
index 06366b5..c6205eb 100644
@@ -42,3 +42,4 @@ util-obj-y += log.o
 util-obj-y += qdist.o
 util-obj-y += qht.o
 util-obj-y += range.o
+util-obj-y += systemd.o
util/systemd.c new file +77 -0

77 lines not on this page · raw message

Signature · 1 line
2.9.3
#5 lore raw
In reply to Paolo Bonzini
Quoted 20 lines · Paolo Bonzini

The following changes since commit ebedf0f9cd46b617df331eecc857c379d574ac62:

nios2: iic: Convert CPU prop to qom link (2017-03-18 18:22:54 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to b3d3a426da9b067366bc132d53a6fa6b72675b55:

hax: fix breakage in locking (2017-03-20 12:24:43 +0100)

----------------------------------------------------------------
fixes for 2.9-rc1, plus removal of -mno-cygwin references

----------------------------------------------------------------
Paolo Bonzini (2):
qemu-ga: obey LISTEN_PID when using systemd socket activation
configure: remove Cygwin

Quoted 5 lines

Stefano Stabellini (1):
xen: do not build backends for targets that do not support xen

Vincent Palatin (1):
hax: fix breakage in locking

Applied, thanks.

-- PMM