aboutsummaryrefslogtreecommitdiff
path: root/utils/qemu/patches
diff options
context:
space:
mode:
authorVladimir Ermakov <vooon341@gmail.com>2022-05-28 18:33:35 +0300
committerYousong Zhou <yszhou4tech@gmail.com>2023-03-01 17:15:27 +0800
commite93a9d006323e86df7322b7423d8bbb93e8a1ce1 (patch)
tree198426856436cb689480de541f7edbd9366e58dd /utils/qemu/patches
parenta1c80c1f3757bc3178866488af2e6e127ae3f1ce (diff)
qemu: update to 7.2.0
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>
Diffstat (limited to 'utils/qemu/patches')
-rw-r--r--utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch4
-rw-r--r--utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch25
-rw-r--r--utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch64
-rw-r--r--utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch29
-rw-r--r--utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch20
-rw-r--r--utils/qemu/patches/0010-no-tests.patch8
6 files changed, 16 insertions, 134 deletions
diff --git a/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch b/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
index 92d5fe79c..e4404a987 100644
--- a/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
+++ b/utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
@@ -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
index 6c8537941..000000000
--- a/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch
+++ /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
index df79e2417..000000000
--- a/utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
+++ /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
index 3774be35f..000000000
--- a/utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
+++ /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","$@")
diff --git a/utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch b/utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch
index d51abc2d5..2c7e39e12 100644
--- a/utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch
+++ b/utils/qemu/patches/0007-qga-invoke-separate-applets-for-guest-shutdown-modes.patch
@@ -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");
diff --git a/utils/qemu/patches/0010-no-tests.patch b/utils/qemu/patches/0010-no-tests.patch
index 40125b411..e8bfe84c6 100644
--- a/utils/qemu/patches/0010-no-tests.patch
+++ b/utils/qemu/patches/0010-no-tests.patch
@@ -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')