From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/5] configure: allow disable fortify_source
+Subject: [PATCH] configure: allow disable fortify_source
Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
OpenWrt base build system decide flavor of fortify_source to use
From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 7 Feb 2020 03:02:44 +0800
-Subject: [PATCH 3/5] configure: enable guest_agent no matter whether softmmu
- is enabled
+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
From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 4/5] disas: fix compilation failure when isnan is a macro
+Subject: [PATCH] disas: fix compilation failure when isnan is a macro
---
disas/libvixl/vixl/utils.h | 16 +++++++++++-----
From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 5/5] pc-bios: fix compilation when $(AS) is actually gcc
- driver
+Subject: [PATCH] pc-bios: fix compilation when $(AS) is actually gcc driver
---
pc-bios/optionrom/Makefile | 4 ++--
--- /dev/null
+From f385b623c14b5208df88b0be479a9ab30ab68c72 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 30 Mar 2020 12:48:58 +0800
+Subject: [PATCH] util/mmap-alloc: fix missing MAP_SYNC
+
+Quote musl-libc commit 9b57db3f958 ("add MAP_SYNC and
+MAP_SHARED_VALIDATE from linux v4.15")
+
+ > for synchronous page faults, new in linux commit
+ > 1c9725974074a047f6080eecc62c50a8e840d050 and
+ > b6fb293f2497a9841d94f6b57bd2bb2cd222da43
+ > note that only targets that use asm-generic/mman.h have this new
+ > flag defined, so undef it on other targets (mips*, powerpc*).
+
+Fixes 119906afa5c ("util/mmap-alloc: support MAP_SYNC in
+qemu_ram_mmap()")
+
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+ util/mmap-alloc.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
+index 27dcccd8ec..e133e38d21 100644
+--- a/util/mmap-alloc.c
++++ b/util/mmap-alloc.c
+@@ -12,9 +12,6 @@
+
+ #ifdef CONFIG_LINUX
+ #include <linux/mman.h>
+-#else /* !CONFIG_LINUX */
+-#define MAP_SYNC 0x0
+-#define MAP_SHARED_VALIDATE 0x0
+ #endif /* CONFIG_LINUX */
+
+ #include "qemu/osdep.h"
+@@ -27,6 +24,13 @@
+ #include <sys/vfs.h>
+ #endif
+
++#ifndef MAP_SYNC
++#define MAP_SYNC 0x0
++#endif
++#ifndef MAP_SHARED_VALIDATE
++#define MAP_SHARED_VALIDATE 0x0
++#endif
++
+ size_t qemu_fd_getpagesize(int fd)
+ {
+ #ifdef CONFIG_LINUX