diff --git a/hw-i386-Fix-comment-style-in-topology.h.patch b/hw-i386-Fix-comment-style-in-topology.h.patch new file mode 100644 index 0000000000000000000000000000000000000000..562fda121cac6ab6e57f6ed3c7d845a933a73a52 --- /dev/null +++ b/hw-i386-Fix-comment-style-in-topology.h.patch @@ -0,0 +1,145 @@ +From 92bf314bb73b4df9b94e68448c37a8bbeed7ae65 Mon Sep 17 00:00:00 2001 +From: Zhao Liu +Date: Tue, 24 Oct 2023 17:03:04 +0800 +Subject: [PATCH] hw/i386: Fix comment style in topology.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +mainline inclusion +commit 5f0d69b5a69f56d63a1afd5f927919b1584e5e9b +category: bugfix + +--------------------------------------------------------------- + +For function comments in this file, keep the comment style consistent +with other files in the directory. + +Signed-off-by: Zhao Liu +Reviewed-by: Philippe Mathieu-Daudé +Reviewed-by: Yanan Wang +Reviewed-by: Xiaoyao Li +Reviewed-by: Babu Moger +Tested-by: Babu Moger +Tested-by: Yongwei Ma +Acked-by: Michael S. Tsirkin +Message-ID: <20231024090323.1859210-2-zhao1.liu@linux.intel.com> +Signed-off-by: Philippe Mathieu-Daudé +Signed-off-by: zhujun2 +--- + include/hw/i386/topology.h | 33 +++++++++++++++++---------------- + 1 file changed, 17 insertions(+), 16 deletions(-) + +diff --git a/include/hw/i386/topology.h b/include/hw/i386/topology.h +index 81573f6cfd..5a19679f61 100644 +--- a/include/hw/i386/topology.h ++++ b/include/hw/i386/topology.h +@@ -24,7 +24,8 @@ + #ifndef HW_I386_TOPOLOGY_H + #define HW_I386_TOPOLOGY_H + +-/* This file implements the APIC-ID-based CPU topology enumeration logic, ++/* ++ * This file implements the APIC-ID-based CPU topology enumeration logic, + * documented at the following document: + * Intel® 64 Architecture Processor Topology Enumeration + * http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/ +@@ -41,7 +42,8 @@ + + #include "qemu/bitops.h" + +-/* APIC IDs can be 32-bit, but beware: APIC IDs > 255 require x2APIC support ++/* ++ * APIC IDs can be 32-bit, but beware: APIC IDs > 255 require x2APIC support + */ + typedef uint32_t apic_id_t; + +@@ -58,8 +60,7 @@ typedef struct X86CPUTopoInfo { + unsigned threads_per_core; + } X86CPUTopoInfo; + +-/* Return the bit width needed for 'count' IDs +- */ ++/* Return the bit width needed for 'count' IDs */ + static unsigned apicid_bitwidth_for_count(unsigned count) + { + g_assert(count >= 1); +@@ -67,15 +68,13 @@ static unsigned apicid_bitwidth_for_count(unsigned count) + return count ? 32 - clz32(count) : 0; + } + +-/* Bit width of the SMT_ID (thread ID) field on the APIC ID +- */ ++/* Bit width of the SMT_ID (thread ID) field on the APIC ID */ + static inline unsigned apicid_smt_width(X86CPUTopoInfo *topo_info) + { + return apicid_bitwidth_for_count(topo_info->threads_per_core); + } + +-/* Bit width of the Core_ID field +- */ ++/* Bit width of the Core_ID field */ + static inline unsigned apicid_core_width(X86CPUTopoInfo *topo_info) + { + return apicid_bitwidth_for_count(topo_info->cores_per_die); +@@ -87,8 +86,7 @@ static inline unsigned apicid_die_width(X86CPUTopoInfo *topo_info) + return apicid_bitwidth_for_count(topo_info->dies_per_pkg); + } + +-/* Bit offset of the Core_ID field +- */ ++/* Bit offset of the Core_ID field */ + static inline unsigned apicid_core_offset(X86CPUTopoInfo *topo_info) + { + return apicid_smt_width(topo_info); +@@ -100,14 +98,14 @@ static inline unsigned apicid_die_offset(X86CPUTopoInfo *topo_info) + return apicid_core_offset(topo_info) + apicid_core_width(topo_info); + } + +-/* Bit offset of the Pkg_ID (socket ID) field +- */ ++/* Bit offset of the Pkg_ID (socket ID) field */ + static inline unsigned apicid_pkg_offset(X86CPUTopoInfo *topo_info) + { + return apicid_die_offset(topo_info) + apicid_die_width(topo_info); + } + +-/* Make APIC ID for the CPU based on Pkg_ID, Core_ID, SMT_ID ++/* ++ * Make APIC ID for the CPU based on Pkg_ID, Core_ID, SMT_ID + * + * The caller must make sure core_id < nr_cores and smt_id < nr_threads. + */ +@@ -120,7 +118,8 @@ static inline apic_id_t x86_apicid_from_topo_ids(X86CPUTopoInfo *topo_info, + topo_ids->smt_id; + } + +-/* Calculate thread/core/package IDs for a specific topology, ++/* ++ * Calculate thread/core/package IDs for a specific topology, + * based on (contiguous) CPU index + */ + static inline void x86_topo_ids_from_idx(X86CPUTopoInfo *topo_info, +@@ -137,7 +136,8 @@ static inline void x86_topo_ids_from_idx(X86CPUTopoInfo *topo_info, + topo_ids->smt_id = cpu_index % nr_threads; + } + +-/* Calculate thread/core/package IDs for a specific topology, ++/* ++ * Calculate thread/core/package IDs for a specific topology, + * based on APIC ID + */ + static inline void x86_topo_ids_from_apicid(apic_id_t apicid, +@@ -155,7 +155,8 @@ static inline void x86_topo_ids_from_apicid(apic_id_t apicid, + topo_ids->pkg_id = apicid >> apicid_pkg_offset(topo_info); + } + +-/* Make APIC ID for the CPU 'cpu_index' ++/* ++ * Make APIC ID for the CPU 'cpu_index' + * + * 'cpu_index' is a sequential, contiguous ID for the CPU. + */ +-- +2.27.0 + diff --git a/iotests-fix-194-filter-out-racy-postcopy-active-even.patch b/iotests-fix-194-filter-out-racy-postcopy-active-even.patch new file mode 100644 index 0000000000000000000000000000000000000000..9acecfc9dd9e6c5d78092bcc49279eefa7a2f1fb --- /dev/null +++ b/iotests-fix-194-filter-out-racy-postcopy-active-even.patch @@ -0,0 +1,55 @@ +From fe75f8834809b41779366a852190715b33b2af5d Mon Sep 17 00:00:00 2001 +From: jipengfei_yewu +Date: Mon, 18 Dec 2023 11:56:32 +0000 +Subject: [PATCH] iotests: fix 194: filter out racy postcopy-active event + +The event is racy: it will not appear in the output if bitmap is +migrated during downtime period of migration and postcopy phase is not +started. + +cheery-pick from dcc28ab603f30df5cc8be1f759b423e94ae7d10f + +Fixes: ae00aa239847 "iotests: 194: test also migration of dirty bitmap" +Reported-by: Richard Henderson + +Signed-off-by: jipengfei_yewu +Signed-off-by: Vladimir Sementsov-Ogievskiy +Message-Id: <20230607143606.1557395-1-vsementsov@yandex-team.ru> +Reviewed-by: Richard Henderson +Signed-off-by: Richard Henderson +--- + tests/qemu-iotests/194 | 5 +++++ + tests/qemu-iotests/194.out | 1 - + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/qemu-iotests/194 b/tests/qemu-iotests/194 +index e44b8df728..4c8a952cd8 100755 +--- a/tests/qemu-iotests/194 ++++ b/tests/qemu-iotests/194 +@@ -74,6 +74,11 @@ with iotests.FilePath('source.img') as source_img_path, \ + + while True: + event1 = source_vm.event_wait('MIGRATION') ++ if event1['data']['status'] == 'postcopy-active': ++ # This event is racy, it depends do we really do postcopy or bitmap ++ # was migrated during downtime (and no data to migrate in postcopy ++ # phase). So, don't log it. ++ continue + iotests.log(event1, filters=[iotests.filter_qmp_event]) + if event1['data']['status'] in ('completed', 'failed'): + iotests.log('Gracefully ending the `drive-mirror` job on source...') +diff --git a/tests/qemu-iotests/194.out b/tests/qemu-iotests/194.out +index 4e6df1565a..376ed1d2e6 100644 +--- a/tests/qemu-iotests/194.out ++++ b/tests/qemu-iotests/194.out +@@ -14,7 +14,6 @@ Starting migration... + {"return": {}} + {"data": {"status": "setup"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} + {"data": {"status": "active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +-{"data": {"status": "postcopy-active"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} + {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} + Gracefully ending the `drive-mirror` job on source... + {"return": {}} +-- +2.27.0 + diff --git a/linux-user-fix-sockaddr_in6-endianness.patch b/linux-user-fix-sockaddr_in6-endianness.patch new file mode 100644 index 0000000000000000000000000000000000000000..104dfc9531a9011e6ea387593fe8f2e568484c40 --- /dev/null +++ b/linux-user-fix-sockaddr_in6-endianness.patch @@ -0,0 +1,42 @@ +From fd2a1eeeaeaba0ca23efd37fa00631ed39081d08 Mon Sep 17 00:00:00 2001 +From: jipengfei_yewu +Date: Mon, 18 Dec 2023 11:59:32 +0000 +Subject: [PATCH] linux-user: fix sockaddr_in6 endianness +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The sin6_scope_id field uses the host byte order, so there is a +conversion to be made when host and target endianness differ. + +cheery-pick from 44cf6731d6b9a48bcd57392e8cd6f0f712aaa677 + +Signed-off-by: jipengfei_yewu +Signed-off-by: Mathis Marion +Reviewed-by: Laurent Vivier +Reviewed-by: Philippe Mathieu-Daudé +Message-Id: <20230307154256.101528-2-Mathis.Marion@silabs.com> +Signed-off-by: Laurent Vivier +--- + linux-user/syscall.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index a544d04524..92df0f9d8c 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -1701,6 +1701,11 @@ static inline abi_long target_to_host_sockaddr(int fd, struct sockaddr *addr, + lladdr = (struct target_sockaddr_ll *)addr; + lladdr->sll_ifindex = tswap32(lladdr->sll_ifindex); + lladdr->sll_hatype = tswap16(lladdr->sll_hatype); ++ } else if (sa_family == AF_INET6) { ++ struct sockaddr_in6 *in6addr; ++ ++ in6addr = (struct sockaddr_in6 *)addr; ++ in6addr->sin6_scope_id = tswap32(in6addr->sin6_scope_id); + } + unlock_user(target_saddr, target_addr, 0); + +-- +2.27.0 + diff --git a/migration-multifd-Remove-unnecessary-usage-of-local-.patch b/migration-multifd-Remove-unnecessary-usage-of-local-.patch new file mode 100644 index 0000000000000000000000000000000000000000..7f7a04ee2ad226146d7020177ca9902ee519fed4 --- /dev/null +++ b/migration-multifd-Remove-unnecessary-usage-of-local-.patch @@ -0,0 +1,61 @@ +From 8046e5c70d22eba8a1ca71ba622fa8b8c74c355f Mon Sep 17 00:00:00 2001 +From: qihao +Date: Tue, 16 Jan 2024 17:52:03 +0800 +Subject: [PATCH] migration/multifd: Remove unnecessary usage of local Error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +cheery-pick from 3fc58efa938338a82e4d5c0c031e7e9c98e9544f + +According to Error API, usage of ERRP_GUARD() or a local Error instead +of errp is needed if errp is passed to void functions, where it is later +dereferenced to see if an error occurred. + +There are several places in multifd.c that use local Error although it +is not needed. Change these places to use errp directly. + +Signed-off-by: Avihai Horon +Reviewed-by: Philippe Mathieu-Daudé +Link: https://lore.kernel.org/r/20231231093016.14204-12-avihaih@nvidia.com +Signed-off-by: Peter Xu +Signed-off-by: qihao_yewu +--- + migration/multifd.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/migration/multifd.c b/migration/multifd.c +index 0d3f66537c..4befde5cad 100644 +--- a/migration/multifd.c ++++ b/migration/multifd.c +@@ -929,12 +929,10 @@ int multifd_save_setup(Error **errp) + + for (i = 0; i < thread_count; i++) { + MultiFDSendParams *p = &multifd_send_state->params[i]; +- Error *local_err = NULL; + int ret; + +- ret = multifd_send_state->ops->send_setup(p, &local_err); ++ ret = multifd_send_state->ops->send_setup(p, errp); + if (ret) { +- error_propagate(errp, local_err); + return ret; + } + } +@@ -1167,12 +1165,10 @@ int multifd_load_setup(Error **errp) + + for (i = 0; i < thread_count; i++) { + MultiFDRecvParams *p = &multifd_recv_state->params[i]; +- Error *local_err = NULL; + int ret; + +- ret = multifd_recv_state->ops->recv_setup(p, &local_err); ++ ret = multifd_recv_state->ops->recv_setup(p, errp); + if (ret) { +- error_propagate(errp, local_err); + return ret; + } + } +-- +2.27.0 + diff --git a/qemu.spec b/qemu.spec index d773e3a690f5472abd056ae120f6c14cc7d44cae..130ec0f84c904902afff4ba6fefda2e8d87c9eed 100644 --- a/qemu.spec +++ b/qemu.spec @@ -3,7 +3,7 @@ Name: qemu Version: 6.2.0 -Release: 87 +Release: 88 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 @@ -857,7 +857,14 @@ Patch0842: vdpa-correct-param-passed-in-when-unregister-save.patch Patch0843: vdpa-support-vdpa-device-suspend-resume.patch Patch0844: vdpa-don-t-suspend-resume-device-when-vdpa-device-no.patch Patch0845: vdpa-suspend-function-return-0-when-the-vdpa-device-.patch - +Patch0846: ui-vnc-fix-debug-output-for-invalid-audio-message.patch +Patch0847: tests-avocado-fix-waiting-for-vm-shutdown-in-replay_.patch +Patch0848: iotests-fix-194-filter-out-racy-postcopy-active-even.patch +Patch0849: vhost_vdpa-fix-the-input-in-trace_vhost_vdpa_listene.patch +Patch0850: linux-user-fix-sockaddr_in6-endianness.patch +Patch0851: migration-multifd-Remove-unnecessary-usage-of-local-.patch +Patch0852: hw-i386-Fix-comment-style-in-topology.h.patch +Patch0853: ui-vnc.c-Fixed-a-deadlock-bug.patch BuildRequires: flex BuildRequires: gcc @@ -1456,6 +1463,16 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Wed Feb 21 2024 - 10:6.2.0-88 +- ui/vnc.c: Fixed a deadlock bug. +- hw/i386: Fix comment style in topology.h +- migration/multifd: Remove unnecessary usage of local Error +- linux-user: fix sockaddr_in6 endianness +- vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del() +- iotests: fix 194: filter out racy postcopy-active event +- tests/avocado: fix waiting for vm shutdown in replay_linux +- ui/vnc: fix debug output for invalid audio message + * Fri Dec 22 2023 - 10:6.2.0-87 - vdpa: suspend function return 0 when the vdpa device is stopped - vdpa: don't suspend/resume device when vdpa device not started diff --git a/tests-avocado-fix-waiting-for-vm-shutdown-in-replay_.patch b/tests-avocado-fix-waiting-for-vm-shutdown-in-replay_.patch new file mode 100644 index 0000000000000000000000000000000000000000..5c237216ba44a6e79a7672cd84a0419f06c4dbf7 --- /dev/null +++ b/tests-avocado-fix-waiting-for-vm-shutdown-in-replay_.patch @@ -0,0 +1,35 @@ +From 0242c2c743987efc6955fc4405b540140b1b678d Mon Sep 17 00:00:00 2001 +From: jipengfei_yewu +Date: Mon, 18 Dec 2023 11:57:38 +0000 +Subject: [PATCH] tests/avocado: fix waiting for vm shutdown in replay_linux + +This patch fixes the race condition in waiting for shutdown +of the replay linux test. + +cheery-pick from b821109583a035a17fa5b89c0ebd8917d09cc82d + +Signed-off-by: jipengfei_yewu +Signed-off-by: Pavel Dovgalyuk +Suggested-by: John Snow +Message-ID: <20230811070608.3383343-4-pavel.dovgalyuk@ispras.ru> +Signed-off-by: Thomas Huth +--- + tests/avocado/replay_linux.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py +index 15953f9e49..897d5bad19 100644 +--- a/tests/avocado/replay_linux.py ++++ b/tests/avocado/replay_linux.py +@@ -82,7 +82,7 @@ def launch_and_wait(self, record, args, shift): + % os.path.getsize(replay_path)) + else: + vm.event_wait('SHUTDOWN', self.timeout) +- vm.shutdown(True) ++ vm.wait() + logger.info('successfully fihished the replay') + elapsed = time.time() - start_time + logger.info('elapsed time %.2f sec' % elapsed) +-- +2.27.0 + diff --git a/ui-vnc-fix-debug-output-for-invalid-audio-message.patch b/ui-vnc-fix-debug-output-for-invalid-audio-message.patch new file mode 100644 index 0000000000000000000000000000000000000000..080d37fc3025d3d7765e403f89f90a21c050f3f6 --- /dev/null +++ b/ui-vnc-fix-debug-output-for-invalid-audio-message.patch @@ -0,0 +1,36 @@ +From 2677d371ed65941912149218fb5683f0b8db0760 Mon Sep 17 00:00:00 2001 +From: jipengfei_yewu +Date: Mon, 18 Dec 2023 09:57:38 +0000 +Subject: [PATCH] ui/vnc: fix debug output for invalid audio message +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The debug message was cut and pasted from the invalid audio format +case, but the audio message is at bytes 2-3. + +cheery-pick from 0cb9c5880e6b8dedc4e20026ce859dd1ea9aac84 + +Signed-off-by: jipengfei_yewu +Reviewed-by: Daniel P. Berrangé +Signed-off-by: Paolo Bonzini +--- + ui/vnc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ui/vnc.c b/ui/vnc.c +index f4322a9065..f8978b0e65 100644 +--- a/ui/vnc.c ++++ b/ui/vnc.c +@@ -2567,7 +2567,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) + vs, vs->ioc, vs->as.fmt, vs->as.nchannels, vs->as.freq); + break; + default: +- VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 4)); ++ VNC_DEBUG("Invalid audio message %d\n", read_u8(data, 2)); + vnc_client_error(vs); + break; + } +-- +2.27.0 + diff --git a/ui-vnc.c-Fixed-a-deadlock-bug.patch b/ui-vnc.c-Fixed-a-deadlock-bug.patch new file mode 100644 index 0000000000000000000000000000000000000000..a2f1fa4c0d75a6fbfcd825b1eff8432395598e1a --- /dev/null +++ b/ui-vnc.c-Fixed-a-deadlock-bug.patch @@ -0,0 +1,71 @@ +From c6e08e8f6e296ab2e8149c4362363a5fd31813f6 Mon Sep 17 00:00:00 2001 +From: Rao Lei +Date: Wed, 5 Jan 2022 10:08:08 +0800 +Subject: [PATCH] ui/vnc.c: Fixed a deadlock bug. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The GDB statck is as follows: +(gdb) bt +0 __lll_lock_wait (futex=futex@entry=0x56211df20360, private=0) at lowlevellock.c:52 +1 0x00007f263caf20a3 in __GI___pthread_mutex_lock (mutex=0x56211df20360) at ../nptl/pthread_mutex_lock.c:80 +2 0x000056211a757364 in qemu_mutex_lock_impl (mutex=0x56211df20360, file=0x56211a804857 "../ui/vnc-jobs.h", line=60) + at ../util/qemu-thread-posix.c:80 +3 0x000056211a0ef8c7 in vnc_lock_output (vs=0x56211df14200) at ../ui/vnc-jobs.h:60 +4 0x000056211a0efcb7 in vnc_clipboard_send (vs=0x56211df14200, count=1, dwords=0x7ffdf1701338) at ../ui/vnc-clipboard.c:138 +5 0x000056211a0f0129 in vnc_clipboard_notify (notifier=0x56211df244c8, data=0x56211dd1bbf0) at ../ui/vnc-clipboard.c:209 +6 0x000056211a75dde8 in notifier_list_notify (list=0x56211afa17d0 , data=0x56211dd1bbf0) at ../util/notify.c:39 +7 0x000056211a0bf0e6 in qemu_clipboard_update (info=0x56211dd1bbf0) at ../ui/clipboard.c:50 +8 0x000056211a0bf05d in qemu_clipboard_peer_release (peer=0x56211df244c0, selection=QEMU_CLIPBOARD_SELECTION_CLIPBOARD) + at ../ui/clipboard.c:41 +9 0x000056211a0bef9b in qemu_clipboard_peer_unregister (peer=0x56211df244c0) at ../ui/clipboard.c:19 +10 0x000056211a0d45f3 in vnc_disconnect_finish (vs=0x56211df14200) at ../ui/vnc.c:1358 +11 0x000056211a0d4c9d in vnc_client_read (vs=0x56211df14200) at ../ui/vnc.c:1611 +12 0x000056211a0d4df8 in vnc_client_io (ioc=0x56211ce70690, condition=G_IO_IN, opaque=0x56211df14200) at ../ui/vnc.c:1649 +13 0x000056211a5b976c in qio_channel_fd_source_dispatch + (source=0x56211ce50a00, callback=0x56211a0d4d71 , user_data=0x56211df14200) at ../io/channel-watch.c:84 +14 0x00007f263ccede8e in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 +15 0x000056211a77d4a1 in glib_pollfds_poll () at ../util/main-loop.c:232 +16 0x000056211a77d51f in os_host_main_loop_wait (timeout=958545) at ../util/main-loop.c:255 +17 0x000056211a77d630 in main_loop_wait (nonblocking=0) at ../util/main-loop.c:531 +18 0x000056211a45bc8e in qemu_main_loop () at ../softmmu/runstate.c:726 +19 0x000056211a0b45fa in main (argc=69, argv=0x7ffdf1701778, envp=0x7ffdf17019a8) at ../softmmu/main.c:50 + +From the call trace, we can see it is a deadlock bug. +vnc_disconnect_finish will acquire the output_mutex. +But, the output_mutex will be acquired again in vnc_clipboard_send. +Repeated locking will cause deadlock. So, I move +qemu_clipboard_peer_unregister() behind vnc_unlock_output(); + +Fixes: 0bf41cab93e ("ui/vnc: clipboard support") +Signed-off-by: Lei Rao +Reviewed-by: Marc-André Lureau +Message-Id: <20220105020808.597325-1-lei.rao@intel.com> +Signed-off-by: Gerd Hoffmann +--- + ui/vnc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ui/vnc.c b/ui/vnc.c +index f8978b0e65..71e3627be2 100644 +--- a/ui/vnc.c ++++ b/ui/vnc.c +@@ -1354,12 +1354,12 @@ void vnc_disconnect_finish(VncState *vs) + /* last client gone */ + vnc_update_server_surface(vs->vd); + } ++ vnc_unlock_output(vs); ++ + if (vs->cbpeer.update.notify) { + qemu_clipboard_peer_unregister(&vs->cbpeer); + } + +- vnc_unlock_output(vs); +- + qemu_mutex_destroy(&vs->output_mutex); + if (vs->bh != NULL) { + qemu_bh_delete(vs->bh); +-- +2.27.0 + diff --git a/vhost_vdpa-fix-the-input-in-trace_vhost_vdpa_listene.patch b/vhost_vdpa-fix-the-input-in-trace_vhost_vdpa_listene.patch new file mode 100644 index 0000000000000000000000000000000000000000..b842678e13d3f4f61117be82c61a324e9cae78d0 --- /dev/null +++ b/vhost_vdpa-fix-the-input-in-trace_vhost_vdpa_listene.patch @@ -0,0 +1,37 @@ +From 48b7b68cab05b9c614163935d0b42bb684e56ca9 Mon Sep 17 00:00:00 2001 +From: jipengfei_yewu +Date: Mon, 18 Dec 2023 11:58:32 +0000 +Subject: [PATCH] vhost_vdpa: fix the input in + trace_vhost_vdpa_listener_region_del() + +In trace_vhost_vdpa_listener_region_del, the value for llend +should change to int128_get64(int128_sub(llend, int128_one())) + +cheery-pick from 3d1e4d34a81a212e234f674e57e73c824d4b131a + +Signed-off-by:jipengfei_yewu +Signed-off-by: Cindy Lu +Message-Id: <20230510054631.2951812-3-lulu@redhat.com> +Reviewed-by: Michael S. Tsirkin +Signed-off-by: Michael S. Tsirkin +--- + hw/virtio/vhost-vdpa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c +index c7aaff7f20..22fd1b1e2f 100644 +--- a/hw/virtio/vhost-vdpa.c ++++ b/hw/virtio/vhost-vdpa.c +@@ -290,7 +290,8 @@ static void vhost_vdpa_listener_region_del(MemoryListener *listener, + iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); + llend = vhost_vdpa_section_end(section); + +- trace_vhost_vdpa_listener_region_del(v, iova, int128_get64(llend)); ++ trace_vhost_vdpa_listener_region_del(v, iova, ++ int128_get64(int128_sub(llend, int128_one()))); + + if (int128_ge(int128_make64(iova), llend)) { + return; +-- +2.27.0 +