From 1bbbedcdeb16c568bc25b209ad7a28bbea81ed68 Mon Sep 17 00:00:00 2001 From: yezengruan Date: Tue, 20 Dec 2022 11:23:00 +0800 Subject: [PATCH] QEMU update to version 6.2.0-65 - linux-user: Add strace output for timer_settime64() syscall - fix qemu-core when vhost-user-net config with server mode Signed-off-by: yezengruan (cherry picked from commit 55a2c3d2768412149bebdf8c981a29b1fd2fab53) --- ...en-vhost-user-net-config-with-server.patch | 46 +++++++++++++++++++ ...trace-output-for-timer_settime64-sys.patch | 37 +++++++++++++++ qemu.spec | 8 +++- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 fix-qemu-core-when-vhost-user-net-config-with-server.patch create mode 100644 linux-user-Add-strace-output-for-timer_settime64-sys.patch diff --git a/fix-qemu-core-when-vhost-user-net-config-with-server.patch b/fix-qemu-core-when-vhost-user-net-config-with-server.patch new file mode 100644 index 0000000..a525301 --- /dev/null +++ b/fix-qemu-core-when-vhost-user-net-config-with-server.patch @@ -0,0 +1,46 @@ +From 228609b7d942639a1ac8a9ba2816b6bb7cbc5ab8 Mon Sep 17 00:00:00 2001 +From: caojinhuahw +Date: Mon, 19 Dec 2022 12:35:50 +0000 +Subject: [PATCH 2/2] fix qemu-core when vhost-user-net config with server mode + +commit 3a223111d7 set default reconnect for vhost-user-net +device, if vhost-user-net config with server mode will +casuse the core when ovs client stop. +tcp_chr_disconnect ---> set tcp_char state disconnect +tcp_chr start reconnect ---> set tcp_char state connecting +tcp_char is listen ---> call tcp_chr_accept() +fun tcp_char_accept() set tcp_char state to connecting, but +current tcp_char state already is connecting, assert failed +in tcp_char_change_state() raise qemu core + assert(s->state == TCP_CHARDEV_STATE_DISCONNECTED) + +this commit check tcp_char mode, if tcp_char config with server +mode, dont set reconnect time for tcp_chr. + +fix: 3a223111d7 vhost-user: Add support reconnect vhost-user socket + +Signed-off-by: caojinhuahw +--- + chardev/char-socket.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/chardev/char-socket.c b/chardev/char-socket.c +index b1e9f43ec6..57ae53304a 100644 +--- a/chardev/char-socket.c ++++ b/chardev/char-socket.c +@@ -403,6 +403,12 @@ static void tcp_chr_set_reconnect_time(Chardev *chr, + void qemu_chr_set_reconnect_time(Chardev *chr, int64_t reconnect_time) + { + ChardevClass *cc = CHARDEV_GET_CLASS(chr); ++ SocketChardev *s = SOCKET_CHARDEV(chr); ++ ++ /* if sock dev is listen, dont set reconnect time */ ++ if (s->is_listen) { ++ return; ++ } + + if (cc->chr_set_reconnect_time) { + cc->chr_set_reconnect_time(chr, reconnect_time); +-- +2.27.0 + diff --git a/linux-user-Add-strace-output-for-timer_settime64-sys.patch b/linux-user-Add-strace-output-for-timer_settime64-sys.patch new file mode 100644 index 0000000..c940890 --- /dev/null +++ b/linux-user-Add-strace-output-for-timer_settime64-sys.patch @@ -0,0 +1,37 @@ +From 685f5a507be1f79b1a78fcff38923bc0670f0dc4 Mon Sep 17 00:00:00 2001 +From: tangzhongrui +Date: Fri, 9 Dec 2022 15:39:52 +0800 +Subject: [PATCH 1/2] linux-user: Add strace output for timer_settime64() + syscall + +Add missing timer_settime64() strace output and specify format for +timer_settime(). + +Signed-off-by: Helge Deller + +Message-Id: +Signed-off-by: Laurent Vivier +Signed-off-by: tangzhongrui +--- + linux-user/strace.list | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/linux-user/strace.list b/linux-user/strace.list +index 278596acd1..544869f1ab 100644 +--- a/linux-user/strace.list ++++ b/linux-user/strace.list +@@ -1522,7 +1522,10 @@ + { TARGET_NR_timer_gettime, "timer_gettime" , NULL, NULL, NULL }, + #endif + #ifdef TARGET_NR_timer_settime +-{ TARGET_NR_timer_settime, "timer_settime" , NULL, NULL, NULL }, ++{ TARGET_NR_timer_settime, "timer_settime" , "%s(%d,%d,%p,%p)", NULL, NULL }, ++#endif ++#ifdef TARGET_NR_timer_settime64 ++{ TARGET_NR_timer_settime64, "timer_settime64" , "%s(%d,%d,%p,%p)", NULL, NULL }, + #endif + #ifdef TARGET_NR_timerfd + { TARGET_NR_timerfd, "timerfd" , NULL, NULL, NULL }, +-- +2.27.0 + diff --git a/qemu.spec b/qemu.spec index 643bc8f..3ac034d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -3,7 +3,7 @@ Name: qemu Version: 6.2.0 -Release: 64 +Release: 65 Epoch: 10 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY-SA-4.0 @@ -442,6 +442,8 @@ Patch0427: target-arm-Move-sve-probe-inside-kvm-4.15-branch.patch Patch0428: migration-report-migration-related-thread-pid-to-lib.patch Patch0429: migration-report-multiFd-related-thread-pid-to-libvi.patch Patch0430: vhost_net-keep-acked_feature-only-for-NET_CLIENT_DRI.patch +Patch0431: linux-user-Add-strace-output-for-timer_settime64-sys.patch +Patch0432: fix-qemu-core-when-vhost-user-net-config-with-server.patch BuildRequires: flex BuildRequires: gcc @@ -973,6 +975,10 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Tue Dec 20 2022 yezengruan - 10:6.2.0-65 +- linux-user: Add strace output for timer_settime64() syscall +- fix qemu-core when vhost-user-net config with server mode + * Wed Dec 14 2022 yezengruan - 10:6.2.0-64 - target/arm: Fix kvm probe of ID_AA64ZFR0 - migration: report migration/multiFd related thread pid to libvirt -- Gitee