qemu: update to 7.2.0
authorVladimir Ermakov <vooon341@gmail.com>
Sat, 28 May 2022 15:33:35 +0000 (18:33 +0300)
committerYousong Zhou <yszhou4tech@gmail.com>
Wed, 1 Mar 2023 09:15:27 +0000 (17:15 +0800)
drop disas and bios patches
refresh patches

qemu: vhost-scsi does not exist, drop unsupported vhost options

qemu: disable VDUSE by default

qemu: slirp and vnc-png option gone

Note: libpng still needed if vnc enabled.

Link: https://github.com/openwrt/packages/pull/18623
Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
(squash commits)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch [deleted file]
utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [deleted file]
utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [deleted file]
utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch
utils/qemu/patches/0010-no-tests.patch

index f846141c52298d0de07c40b32d1190298bd27ff9..7f97b392caf610828492272c2436a8b686c1a440 100644 (file)
@@ -9,10 +9,10 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
-PKG_VERSION:=6.2.0
-PKG_RELEASE:=$(AUTORELEASE)
+PKG_VERSION:=7.2.0
+PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45
+PKG_HASH:=5b49ce2687744dad494ae90a898c52204a3406e84d072482a1e1be854eeb2157
 PKG_SOURCE_URL:=http://download.qemu.org/
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=LICENSE tcg/LICENSE
@@ -192,8 +192,8 @@ define qemu-target
     URL:=http://www.qemu.org
     DEPENDS:= +glib2 +libpthread +zlib +libbpf $(QEMU_DEPS_IN_HOST) $(qemu-target-$(1)-deps) \
        +QEMU_UI_VNC:qemu-keymaps \
+       +QEMU_UI_VNC:libpng \
        +QEMU_UI_VNC_JPEG:libjpeg \
-       +QEMU_UI_VNC_PNG:libpng \
        +QEMU_UI_VNC_SASL:libsasl2 \
        +QEMU_UI_SPICE:libspice-server \
        +QEMU_DEV_USB:libusb-1.0 \
@@ -246,11 +246,6 @@ config QEMU_UI_VNC_JPEG
        default n
        depends on QEMU_UI_VNC
 
-config QEMU_UI_VNC_PNG
-       bool "QEMU VNC png tight encoding support"
-       default n
-       depends on QEMU_UI_VNC
-
 config QEMU_UI_VNC_SASL
        bool "QEMU VNC SASL auth support"
        default n
@@ -276,7 +271,6 @@ endef
 PKG_CONFIG_DEPENDS += \
        CONFIG_QEMU_UI_VNC \
        CONFIG_QEMU_UI_VNC_JPEG \
-       CONFIG_QEMU_UI_VNC_PNG \
        CONFIG_QEMU_UI_VNC_SASL \
        CONFIG_QEMU_UI_SPICE \
        CONFIG_QEMU_DEV_USB \
@@ -311,11 +305,8 @@ CONFIGURE_ARGS +=                  \
        --enable-vhost-crypto           \
        --enable-vhost-kernel           \
        --enable-vhost-net              \
-       --enable-vhost-scsi             \
        --enable-vhost-user             \
-       --enable-vhost-user-fs          \
        --enable-vhost-user-blk-server  \
-       --enable-vhost-vsock            \
        --enable-vhost-vdpa             \
 
 # Image formats support
@@ -335,7 +326,6 @@ CONFIGURE_ARGS +=                   \
        --disable-bsd-user              \
        --disable-linux-user            \
        --enable-system                 \
-       --enable-slirp=system           \
 
 # accel
 CONFIGURE_ARGS +=                      \
@@ -356,7 +346,6 @@ CONFIGURE_ARGS +=                   \
        --disable-virglrenderer         \
        --$(if $(CONFIG_QEMU_UI_VNC),enable,disable)-vnc                        \
        --$(if $(CONFIG_QEMU_UI_VNC_JPEG),enable,disable)-vnc-jpeg              \
-       --$(if $(CONFIG_QEMU_UI_VNC_PNG),enable,disable)-vnc-png                \
        --$(if $(CONFIG_QEMU_UI_VNC_SASL),enable,disable)-vnc-sasl              \
        --disable-vte                   \
        --enable-curses                 \
@@ -405,7 +394,6 @@ CONFIGURE_ARGS +=                   \
        --disable-libpmem               \
        --disable-libssh                \
        --$(if $(CONFIG_QEMU_DEV_USB),enable,disable)-libusb            \
-       --disable-libxml2               \
        --disable-linux-aio             \
        --disable-linux-io-uring        \
        --disable-lzfse                 \
@@ -436,12 +424,12 @@ CONFIGURE_ARGS +=                 \
        --disable-werror                \
        --disable-xen-pci-passthrough   \
        --disable-xkbcommon             \
-       --disable-xfsctl                \
        --disable-zstd                  \
        --disable-selinux               \
        --disable-oss                   \
        --disable-alsa                  \
        --disable-pa                    \
+       --disable-vduse-blk-export      \
 
 CONFIGURE_ARGS += --target-list='$(foreach target,$(qemu-target-list),$(if $(CONFIG_PACKAGE_qemu-$(target)),$(target)))'
 CONFIGURE_ARGS += $(if $(CONFIG_PACKAGE_qemu-ga),--enable-guest-agent)
index 92d5fe79c115a02b0aeddbf13d748487a689542c..e4404a987f1ce9d6021a0a35b4035fe5b14e8d42 100644 (file)
@@ -11,12 +11,12 @@ OpenWrt base build system decide flavor of fortify_source to use
 
 --- a/configure
 +++ b/configure
-@@ -1194,6 +1194,8 @@ for opt do
+@@ -896,6 +896,8 @@ for opt do
    ;;
    --enable-jemalloc) meson_option_parse --enable-malloc=jemalloc jemalloc
    ;;
 +  --disable-fortify-source) fortify_source="no"
 +  ;;
    # everything else has the same name in configure and meson
-   --enable-* | --disable-*) meson_option_parse "$opt" "$optarg"
+   --*) meson_option_parse "$opt" "$optarg"
    ;;
diff --git a/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch b/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch
deleted file mode 100644 (file)
index 6c85379..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3f07c9cb96b361f07ce637088f818bbe0edbcde3 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Fri, 7 Feb 2020 03:02:44 +0800
-Subject: [PATCH] configure: enable guest_agent no matter whether softmmu is
- enabled
-
-guest_agent as a tool to be run on guest machines does not depend on
-whether there is a softmmu is to be built at this configure/make run
-
-Fixes a512590 ("configure: qemu-ga is only needed with softmmu targets")
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure
-+++ b/configure
-@@ -3331,7 +3331,7 @@ fi
- # Probe for guest agent support/options
- if [ "$guest_agent" != "no" ]; then
--  if [ "$softmmu" = no -a "$want_tools" = no ] ; then
-+  if [ "$guest_agent" = "" -a "$want_tools" = no ] ; then
-       guest_agent=no
-   elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
-       guest_agent=yes
diff --git a/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch b/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
deleted file mode 100644 (file)
index df79e24..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From 26dd9766757895c04b33a89865e3886f18146332 Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH] disas: fix compilation failure when isnan is a macro
-
----
- disas/libvixl/vixl/utils.h | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
---- a/disas/libvixl/vixl/utils.h
-+++ b/disas/libvixl/vixl/utils.h
-@@ -118,11 +118,17 @@ double double_pack(uint64_t sign, uint64
- // An fpclassify() function for 16-bit half-precision floats.
- int float16classify(float16 value);
-+#ifdef isnan
-+#define isnan_ isnan
-+#else
-+#define isnan_ std::isnan
-+#endif
-+
- // NaN tests.
- inline bool IsSignallingNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
-   uint64_t raw = double_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP64QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -132,7 +138,7 @@ inline bool IsSignallingNaN(double num)
- inline bool IsSignallingNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
-   uint32_t raw = float_to_rawbits(num);
--  if (std::isnan(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-+  if (isnan_(num) && ((raw & kFP32QuietNaNMask) == 0)) {
-     return true;
-   }
-   return false;
-@@ -148,21 +154,21 @@ inline bool IsSignallingNaN(float16 num)
- template <typename T>
- inline bool IsQuietNaN(T num) {
--  return std::isnan(num) && !IsSignallingNaN(num);
-+  return isnan_(num) && !IsSignallingNaN(num);
- }
- // Convert the NaN in 'num' to a quiet NaN.
- inline double ToQuietNaN(double num) {
-   const uint64_t kFP64QuietNaNMask = UINT64_C(0x0008000000000000);
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_double(double_to_rawbits(num) | kFP64QuietNaNMask);
- }
- inline float ToQuietNaN(float num) {
-   const uint32_t kFP32QuietNaNMask = 0x00400000;
--  VIXL_ASSERT(std::isnan(num));
-+  VIXL_ASSERT(isnan_(num));
-   return rawbits_to_float(float_to_rawbits(num) | kFP32QuietNaNMask);
- }
diff --git a/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch b/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
deleted file mode 100644 (file)
index 3774be3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From 905f3b7b6115f303f964b5aa1d3bc9bdae9d5bec Mon Sep 17 00:00:00 2001
-From: Yousong Zhou <yszhou4tech@gmail.com>
-Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver
-
----
- pc-bios/optionrom/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/pc-bios/optionrom/Makefile
-+++ b/pc-bios/optionrom/Makefile
-@@ -35,7 +35,7 @@ override CFLAGS += -m32 -include $(SRC_D
- endif
- Wa = -Wa,
--override ASFLAGS += -32
-+override ASFLAGS += $(Wa)-32
- override CFLAGS += $(call cc-option, $(Wa)-32)
- LD_I386_EMULATION ?= elf_i386
-@@ -44,7 +44,7 @@ override LDFLAGS = -m $(LD_I386_EMULATIO
- pvh.img: pvh.o pvh_main.o
- %.o: %.S
--      $(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$@")
-+      $(call quiet-command,$(CPP) $(CPPFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@ -x assembler -,"AS","$@")
- %.o: %.c
-       $(call quiet-command,$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@,"CC","$@")
index d51abc2d5b256df2c5918b486ef2f3a16c871e0f..2c7e39e12a62b9e29f5a2857040c6fc28d1f448f 100644 (file)
@@ -13,7 +13,7 @@ https://gitlab.alpinelinux.org/alpine/aports/commit/76b81b486480fd9c3294cd420bcf
 
 --- a/qga/commands-posix.c
 +++ b/qga/commands-posix.c
-@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int
+@@ -74,6 +74,7 @@ static void ga_wait_child(pid_t pid, int
  void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
  {
      const char *shutdown_flag;
@@ -21,25 +21,25 @@ https://gitlab.alpinelinux.org/alpine/aports/commit/76b81b486480fd9c3294cd420bcf
      Error *local_err = NULL;
      pid_t pid;
      int status;
-@@ -91,10 +92,13 @@ void qmp_guest_shutdown(bool has_mode, c
+@@ -95,10 +96,13 @@ void qmp_guest_shutdown(bool has_mode, c
      slog("guest-shutdown called, mode: %s", mode);
      if (!has_mode || strcmp(mode, "powerdown") == 0) {
-         shutdown_flag = "-P";
+         shutdown_flag = powerdown_flag;
 +        fallback_cmd = "/sbin/poweroff";
      } else if (strcmp(mode, "halt") == 0) {
-         shutdown_flag = "-H";
+         shutdown_flag = halt_flag;
 +        fallback_cmd = "/sbin/halt";
      } else if (strcmp(mode, "reboot") == 0) {
-         shutdown_flag = "-r";
+         shutdown_flag = reboot_flag;
 +        fallback_cmd = "/sbin/reboot";
      } else {
          error_setg(errp,
                     "mode is invalid (valid values are: halt|powerdown|reboot");
-@@ -111,6 +115,7 @@ void qmp_guest_shutdown(bool has_mode, c
-         execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
-                "hypervisor initiated shutdown", (char *)NULL, environ);
-+        execle(fallback_cmd, fallback_cmd, (char*)NULL, environ);
+@@ -123,6 +127,7 @@ void qmp_guest_shutdown(bool has_mode, c
+         execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
+                "hypervisor initiated shutdown", (char *)NULL);
+ #endif
++        execl(fallback_cmd, fallback_cmd, (char*)NULL);
          _exit(EXIT_FAILURE);
      } else if (pid < 0) {
          error_setg_errno(errp, errno, "failed to create child process");
index 40125b41181f98020e4d330167a75d2d0bf707e9..e8bfe84c6e9f3a073ffa5c70af7024e24aa01be8 100644 (file)
@@ -1,8 +1,8 @@
 --- a/meson.build
 +++ b/meson.build
-@@ -2619,10 +2619,6 @@ specific_ss.add_all(when: 'CONFIG_BSD_US
linux_user_ss.add(files('thunk.c'))
- specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
+@@ -3142,10 +3142,6 @@ subdir('common-user')
subdir('bsd-user')
+ subdir('linux-user')
  
 -# needed for fuzzing binaries
 -subdir('tests/qtest/libqos')
@@ -11,7 +11,7 @@
  # accel modules
  tcg_real_module_ss = ss.source_set()
  tcg_real_module_ss.add_all(when: 'CONFIG_TCG_MODULAR', if_true: tcg_module_ss)
-@@ -3107,10 +3103,6 @@ subdir('scripts')
+@@ -3633,10 +3629,6 @@ subdir('scripts')
  subdir('tools')
  subdir('pc-bios')
  subdir('docs')