* [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23
@ 2025-02-21 17:49 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 01/14] rust: add --rust-target option for bindgen Michael Tokarev
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Michael Tokarev
The following patches are queued for QEMU stable v9.2.2:
https://gitlab.com/qemu-project/qemu/-/commits/staging-9.2
Patch freeze is 2025-02-23, and the release is planned for 2025-02-24:
https://wiki.qemu.org/Planning/9.2
This is a short-cycle release to fix issues with the uploaded 9.2.1
tarball - due to some caching on the site and two versions of the
9.2.1 tarball, there are some issues with signature verification.
Since there were a few important patches already queued up, so I'm
including these too.
Please respond here or CC qemu-stable@nongnu.org on any additional patches
you think should (or shouldn't) be included in the release.
The changes which are staging for inclusion, with the original commit hash
from master branch, are given below the bottom line.
Thanks!
/mjt
--------------------------------------
01 131c58469f6f Paolo Bonzini:
rust: add --rust-target option for bindgen
02 23ea425c14d3 Fabiano Rosas:
block: Fix leak in send_qmp_error_event
03 107c551de0d7 Peter Krempa:
block-backend: Fix argument order when calling
'qapi_event_send_block_io_error()'
04 27a8d899c7a1 Khem Raj:
linux-user: Do not define struct sched_attr if libc headers do
05 1e3d4d9a1a32 Laurent Vivier:
qmp: update vhost-user protocol feature maps
06 66a1b4991c32 Thomas Huth:
gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2
07 7b3d5b84cbd7 Zhenzhong Duan:
vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach()
08 4dafba778aa3 Volker Rümelin:
ui/sdl2: reenable the SDL2 Windows keyboard hook procedure
09 b79b05d1a06a Michael Roth:
make-release: don't rely on $CWD when excluding subproject directories
10 937df81af675 Peter Maydell:
hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
11 4b7b20a3b72c Fabiano Rosas:
elfload: Fix alignment when unmapping excess reservation
12 807c3ebd1e3f Mikael Szreder:
target/sparc: Fix register selection for all F*TOx and FxTO* instructions
13 7a74e468089a Mikael Szreder:
target/sparc: Fix gdbstub incorrectly handling registers f32-f62
14 f141caa270af Michael Tokarev:
net/slirp: libslirp 4.9.0 compatibility
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Stable-9.2.2 01/14] rust: add --rust-target option for bindgen
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 02/14] block: Fix leak in send_qmp_error_event Michael Tokarev
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Paolo Bonzini, qemu-rust, Stefan Hajnoczi,
Michael Tokarev
From: Paolo Bonzini <pbonzini@redhat.com>
Without it, recent bindgen will give an error
error: extern block cannot be declared unsafe
if rustc is not new enough to support the "unsafe extern" construct.
Cc: qemu-rust@nongnu.org
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <20250206111514.2134895-1-pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 131c58469f6fb68c89b38fee6aba8bbb20c7f4bf)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/meson.build b/meson.build
index 7a3faca61d..7f6f638676 100644
--- a/meson.build
+++ b/meson.build
@@ -4050,6 +4050,9 @@ if have_rust
bindgen_args += ['--formatter', 'none']
endif
endif
+ if bindgen.version().version_compare('>=0.66.0')
+ bindgen_args += ['--rust-target', '1.59']
+ endif
if bindgen.version().version_compare('<0.61.0')
# default in 0.61+
bindgen_args += ['--size_t-is-usize']
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 02/14] block: Fix leak in send_qmp_error_event
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 01/14] rust: add --rust-target option for bindgen Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 03/14] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()' Michael Tokarev
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Fabiano Rosas, Philippe Mathieu-Daudé,
Kevin Wolf, Michael Tokarev
From: Fabiano Rosas <farosas@suse.de>
ASAN detected a leak when running the ahci-test
/ahci/io/dma/lba28/retry:
Direct leak of 35 byte(s) in 1 object(s) allocated from:
#0 in malloc
#1 in __vasprintf_internal
#2 in vasprintf
#3 in g_vasprintf
#4 in g_strdup_vprintf
#5 in g_strdup_printf
#6 in object_get_canonical_path ../qom/object.c:2096:19
#7 in blk_get_attached_dev_id_or_path ../block/block-backend.c:1033:12
#8 in blk_get_attached_dev_path ../block/block-backend.c:1047:12
#9 in send_qmp_error_event ../block/block-backend.c:2140:36
#10 in blk_error_action ../block/block-backend.c:2172:9
#11 in ide_handle_rw_error ../hw/ide/core.c:875:5
#12 in ide_dma_cb ../hw/ide/core.c:894:13
#13 in dma_complete ../system/dma-helpers.c:107:9
#14 in dma_blk_cb ../system/dma-helpers.c:129:9
#15 in blk_aio_complete ../block/block-backend.c:1552:9
#16 in blk_aio_write_entry ../block/block-backend.c:1619:5
#17 in coroutine_trampoline ../util/coroutine-ucontext.c:175:9
Plug the leak by freeing the device path string.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241111145214.8261-1-farosas@suse.de>
[PMD: Use g_autofree]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241111170333.43833-3-philmd@linaro.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 23ea425c14d3b89a002e0127b17456eee3102ab7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/block/block-backend.c b/block/block-backend.c
index 85bcdedcef..0c28091ef1 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2134,10 +2134,10 @@ static void send_qmp_error_event(BlockBackend *blk,
{
IoOperationType optype;
BlockDriverState *bs = blk_bs(blk);
+ g_autofree char *path = blk_get_attached_dev_path(blk);
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
- qapi_event_send_block_io_error(blk_name(blk),
- blk_get_attached_dev_path(blk),
+ qapi_event_send_block_io_error(blk_name(blk), path,
bs ? bdrv_get_node_name(bs) : NULL, optype,
action, blk_iostatus_is_enabled(blk),
error == ENOSPC, strerror(error));
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 03/14] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 01/14] rust: add --rust-target option for bindgen Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 02/14] block: Fix leak in send_qmp_error_event Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 04/14] linux-user: Do not define struct sched_attr if libc headers do Michael Tokarev
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Peter Krempa, Daniel P . Berrangé, Kevin Wolf,
Michael Tokarev
From: Peter Krempa <pkrempa@redhat.com>
Commit 7452162adec25c10 introduced 'qom-path' argument to BLOCK_IO_ERROR
event but when the event is instantiated in 'send_qmp_error_event()' the
arguments for 'device' and 'qom_path' in
qapi_event_send_block_io_error() were reversed :
Generated code for sending event:
void qapi_event_send_block_io_error(const char *qom_path,
const char *device,
const char *node_name,
IoOperationType operation,
[...]
Call inside send_qmp_error_event():
qapi_event_send_block_io_error(blk_name(blk),
blk_get_attached_dev_path(blk),
bs ? bdrv_get_node_name(bs) : NULL, optype,
[...]
This results into reporting the QOM path as the device alias and vice
versa which in turn breaks libvirt, which expects the device alias being
either a valid alias or empty (which would make libvirt do the lookup by
node-name instead).
Cc: qemu-stable@nongnu.org
Fixes: 7452162adec2 ("qapi: add qom-path to BLOCK_IO_ERROR event")
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Message-ID: <09728d784888b38d7a8f09ee5e9e9c542c875e1e.1737973614.git.pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 107c551de0d7bc3aa8e926c557b66b9549616f42)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/block/block-backend.c b/block/block-backend.c
index 0c28091ef1..61b935e3c4 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -2137,7 +2137,7 @@ static void send_qmp_error_event(BlockBackend *blk,
g_autofree char *path = blk_get_attached_dev_path(blk);
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
- qapi_event_send_block_io_error(blk_name(blk), path,
+ qapi_event_send_block_io_error(path, blk_name(blk),
bs ? bdrv_get_node_name(bs) : NULL, optype,
action, blk_iostatus_is_enabled(blk),
error == ENOSPC, strerror(error));
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 04/14] linux-user: Do not define struct sched_attr if libc headers do
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (2 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 03/14] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()' Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 05/14] qmp: update vhost-user protocol feature maps Michael Tokarev
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Khem Raj, Peter Maydell, Michael Tokarev
From: Khem Raj <raj.khem@gmail.com>
glibc 2.41+ has added [1] definitions for sched_setattr and
sched_getattr functions and struct sched_attr. Therefore, it needs
to be checked for here as well before defining sched_attr, to avoid
a compilation failure.
Define sched_attr conditionally only when SCHED_ATTR_SIZE_VER0 is
not defined.
[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=21571ca0d70302909cf72707b2a7736cf12190a0;hp=298bc488fdc047da37482f4003023cb9adef78f8
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2799
Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 27a8d899c7a100fd5aa040a8b993bb257687c393)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 1ce4c79784..a407d4a023 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -358,7 +358,8 @@ _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len,
#define __NR_sys_sched_setaffinity __NR_sched_setaffinity
_syscall3(int, sys_sched_setaffinity, pid_t, pid, unsigned int, len,
unsigned long *, user_mask_ptr);
-/* sched_attr is not defined in glibc */
+/* sched_attr is not defined in glibc < 2.41 */
+#ifndef SCHED_ATTR_SIZE_VER0
struct sched_attr {
uint32_t size;
uint32_t sched_policy;
@@ -371,6 +372,7 @@ struct sched_attr {
uint32_t sched_util_min;
uint32_t sched_util_max;
};
+#endif
#define __NR_sys_sched_getattr __NR_sched_getattr
_syscall4(int, sys_sched_getattr, pid_t, pid, struct sched_attr *, attr,
unsigned int, size, unsigned int, flags);
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 05/14] qmp: update vhost-user protocol feature maps
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (3 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 04/14] linux-user: Do not define struct sched_attr if libc headers do Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 06/14] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2 Michael Tokarev
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Laurent Vivier, jonah.palmer, aesteve, hreitz,
Michael Tokarev
From: Laurent Vivier <lvivier@redhat.com>
Add VHOST_USER_PROTOCOL_F_SHARED_OBJECT and
VHOST_USER_PROTOCOL_F_DEVICE_STATE protocol feature maps to
the virtio introspection.
Cc: jonah.palmer@oracle.com
Fixes: 160947666276 ("vhost-user: add shared_object msg")
Cc: aesteve@redhat.com
Fixes: cda83adc62b6 ("vhost-user: Interface for migration state transfer")
Cc: hreitz@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 1e3d4d9a1a32ac6835f0d295a5117851c421fb5d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c
index cccc6fe761..8a32a3b105 100644
--- a/hw/virtio/virtio-qmp.c
+++ b/hw/virtio/virtio-qmp.c
@@ -121,6 +121,12 @@ static const qmp_virtio_feature_map_t vhost_user_protocol_map[] = {
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_STATUS, \
"VHOST_USER_PROTOCOL_F_STATUS: Querying and notifying back-end "
"device status supported"),
+ FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_SHARED_OBJECT, \
+ "VHOST_USER_PROTOCOL_F_SHARED_OBJECT: Backend shared object "
+ "supported"),
+ FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_DEVICE_STATE, \
+ "VHOST_USER_PROTOCOL_F_DEVICE_STATE: Backend device state transfer "
+ "supported"),
{ -1, "" }
};
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 06/14] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (4 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 05/14] qmp: update vhost-user protocol feature maps Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 07/14] vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach() Michael Tokarev
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Thomas Huth, Daniel P . Berrangé,
Michael Tokarev
From: Thomas Huth <thuth@redhat.com>
The FreeBSD job started to fail since the 14-1 image disappeared
from the cloud. Update the job to v14.2 to fix it.
Message-ID: <20250211120817.35050-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 66a1b4991c32e370a4e0ddabf496aa1563aff286)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/.gitlab-ci.d/cirrus.yml b/.gitlab-ci.d/cirrus.yml
index a9e43e21d0..c43380ea3d 100644
--- a/.gitlab-ci.d/cirrus.yml
+++ b/.gitlab-ci.d/cirrus.yml
@@ -52,7 +52,7 @@ x64-freebsd-14-build:
NAME: freebsd-14
CIRRUS_VM_INSTANCE_TYPE: freebsd_instance
CIRRUS_VM_IMAGE_SELECTOR: image_family
- CIRRUS_VM_IMAGE_NAME: freebsd-14-1
+ CIRRUS_VM_IMAGE_NAME: freebsd-14-2
CIRRUS_VM_CPUS: 8
CIRRUS_VM_RAM: 8G
UPDATE_COMMAND: pkg update; pkg upgrade -y
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 07/14] vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach()
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (5 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 06/14] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2 Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 08/14] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure Michael Tokarev
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Zhenzhong Duan, Eric Auger, Cédric Le Goater,
Michael Tokarev
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
When iommufd_cdev_ram_block_discard_disable() fails for whatever reason,
errp should be set or else SIGSEV is triggered in vfio_realize() when
error_prepend() is called.
By this chance, use the same error message for both legacy and iommufd
backend.
Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/20250116102307.260849-1-zhenzhong.duan@intel.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
(cherry picked from commit 7b3d5b84cbd742356a1afc6b0fa489d0663f235d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index e7bece4ea1..a60c899dc6 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -515,8 +515,8 @@ static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev,
} else {
ret = iommufd_cdev_ram_block_discard_disable(true);
if (ret) {
- error_setg(errp,
- "Cannot set discarding of RAM broken (%d)", ret);
+ error_setg_errno(errp, -ret,
+ "Cannot set discarding of RAM broken");
goto err_discard_disable;
}
goto found_container;
@@ -544,6 +544,7 @@ static bool iommufd_cdev_attach(const char *name, VFIODevice *vbasedev,
ret = iommufd_cdev_ram_block_discard_disable(true);
if (ret) {
+ error_setg_errno(errp, -ret, "Cannot set discarding of RAM broken");
goto err_discard_disable;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 08/14] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (6 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 07/14] vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach() Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 09/14] make-release: don't rely on $CWD when excluding subproject directories Michael Tokarev
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Volker Rümelin, Paolo Bonzini, Michael Tokarev
From: Volker Rümelin <vr_qemu@t-online.de>
Windows only:
The libSDL2 Windows message loop needs the libSDL2 Windows low
level keyboard hook procedure to grab the left and right Windows
keys correctly. Reenable the SDL2 Windows keyboard hook procedure.
Since SDL2 2.30.4 the SDL2 keyboard hook procedure also filters
out the special left Control key event for every Alt Gr key event
on keyboards with an international layout. This means the QEMU low
level keyboard hook procedure is no longer needed. Remove the QEMU
Windows keyboard hook procedure.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2139
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2323
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Link: https://lore.kernel.org/r/20241231115950.6732-1-vr_qemu@t-online.de
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 4dafba778aa3e5f5fd3b2c6333afd7650dcf54e2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: context fix in ui/sdl2.c (includes))
diff --git a/ui/meson.build b/ui/meson.build
index 28c7381dd1..35fb04cadf 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -120,10 +120,6 @@ if gtk.found()
endif
if sdl.found()
- if host_os == 'windows'
- system_ss.add(files('win32-kbd-hook.c'))
- endif
-
sdl_ss = ss.source_set()
sdl_ss.add(sdl, sdl_image, pixman, glib, files(
'sdl2-2d.c',
diff --git a/ui/sdl2.c b/ui/sdl2.c
index bd4f5a9da1..3d70eaebfa 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -32,7 +32,6 @@
#include "sysemu/runstate.h"
#include "sysemu/runstate-action.h"
#include "sysemu/sysemu.h"
-#include "ui/win32-kbd-hook.h"
#include "qemu/log.h"
static int sdl2_num_outputs;
@@ -262,7 +261,6 @@ static void sdl_grab_start(struct sdl2_console *scon)
}
SDL_SetWindowGrab(scon->real_window, SDL_TRUE);
gui_grab = 1;
- win32_kbd_set_grab(true);
sdl_update_caption(scon);
}
@@ -270,7 +268,6 @@ static void sdl_grab_end(struct sdl2_console *scon)
{
SDL_SetWindowGrab(scon->real_window, SDL_FALSE);
gui_grab = 0;
- win32_kbd_set_grab(false);
sdl_show_cursor(scon);
sdl_update_caption(scon);
}
@@ -371,19 +368,6 @@ static int get_mod_state(void)
}
}
-static void *sdl2_win32_get_hwnd(struct sdl2_console *scon)
-{
-#ifdef CONFIG_WIN32
- SDL_SysWMinfo info;
-
- SDL_VERSION(&info.version);
- if (SDL_GetWindowWMInfo(scon->real_window, &info)) {
- return info.info.win.window;
- }
-#endif
- return NULL;
-}
-
static void handle_keydown(SDL_Event *ev)
{
int win;
@@ -608,10 +592,6 @@ static void handle_windowevent(SDL_Event *ev)
sdl2_redraw(scon);
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
- win32_kbd_set_grab(gui_grab);
- if (qemu_console_is_graphic(scon->dcl.con)) {
- win32_kbd_set_window(sdl2_win32_get_hwnd(scon));
- }
/* fall through */
case SDL_WINDOWEVENT_ENTER:
if (!gui_grab && (qemu_input_is_absolute(scon->dcl.con) || absolute_enabled)) {
@@ -627,9 +607,6 @@ static void handle_windowevent(SDL_Event *ev)
scon->ignore_hotkeys = get_mod_state();
break;
case SDL_WINDOWEVENT_FOCUS_LOST:
- if (qemu_console_is_graphic(scon->dcl.con)) {
- win32_kbd_set_window(NULL);
- }
if (gui_grab && !gui_fullscreen) {
sdl_grab_end(scon);
}
@@ -869,10 +846,7 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o)
#ifdef SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR /* only available since SDL 2.0.8 */
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
#endif
-#ifndef CONFIG_WIN32
- /* QEMU uses its own low level keyboard hook procedure on Windows */
SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1");
-#endif
#ifdef SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED
SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
#endif
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 09/14] make-release: don't rely on $CWD when excluding subproject directories
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (7 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 08/14] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 10/14] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Michael Tokarev
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Michael Roth, Paolo Bonzini, Michael Tokarev
From: Michael Roth <michael.roth@amd.com>
The current logic scans qemu.git/subprojects/ from *.wrap files to
determine whether or not to include the associated directories in the
release tarballs. However, the script assumes that it is being run from
the top-level of the source directory, which may not always be the case.
In particular, when generating releases via, e.g.:
make qemu-9.2.1.tar.xz
the $CWD will either be an arbitrary external build directory, or
qemu.git/build, and the exclusions will not be processed as expected.
Fix this by using the $src parameter passed to the script as the root
directory for the various subproject/ paths referenced by this logic.
Also, the error case at the beginning of the subproject_dir() will not
result in the error message being printed, and will instead produce an
error message about "error" not being a valid command. Fix this by using
basic shell commands.
Fixes: be27b5149c86 ("make-release: only leave tarball of wrap-file subprojects")
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit b79b05d1a06a013447ea93b81c07612766b735f2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/scripts/make-release b/scripts/make-release
index 2885e87210..1b89b3423a 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -11,8 +11,9 @@
# See the COPYING file in the top-level directory.
function subproject_dir() {
- if test ! -f "subprojects/$1.wrap"; then
- error "scripts/archive-source.sh should only process wrap subprojects"
+ if test ! -f "$src/subprojects/$1.wrap"; then
+ echo "scripts/archive-source.sh should only process wrap subprojects"
+ exit 1
fi
# Print the directory key of the wrap file, defaulting to the
@@ -26,7 +27,7 @@ function subproject_dir() {
-e 's///p' \
-e 'q' \
-e '}' \
- "subprojects/$1.wrap")
+ "$src/subprojects/$1.wrap")
echo "${dir:-$1}"
}
@@ -76,7 +77,7 @@ popd
exclude=(--exclude=.git)
# include the tarballs in subprojects/packagecache but not their expansion
for sp in $SUBPROJECTS; do
- if grep -xqF "[wrap-file]" subprojects/$sp.wrap; then
+ if grep -xqF "[wrap-file]" $src/subprojects/$sp.wrap; then
exclude+=(--exclude=subprojects/"$(subproject_dir $sp)")
fi
done
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 10/14] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (8 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 09/14] make-release: don't rely on $CWD when excluding subproject directories Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 11/14] elfload: Fix alignment when unmapping excess reservation Michael Tokarev
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Peter Maydell, Philippe Mathieu-Daudé,
Michael Tokarev
From: Peter Maydell <peter.maydell@linaro.org>
The SMC91C111 includes an MMU Command register which permits
the guest to remove entries from the RX FIFO. The datasheet
does not specify what happens if the guest tries to do this
when the FIFO is already empty; there are no status registers
containing error bits which might be applicable.
Currently we don't guard at all against pop of an empty
RX FIFO, with the result that we allow the guest to drive
the rx_fifo_len index to negative values, which will cause
smc91c111_receive() to write to the rx_fifo[] array out of
bounds when we receive the next packet.
Instead ignore attempts to pop an empty RX FIFO.
Cc: qemu-stable@nongnu.org
Fixes: 80337b66a8e7 ("NIC emulation for qemu arm-softmmu")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2780
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250207151157.3151776-1-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 937df81af6757638a7f1908747560dd342947213)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index 180ba5c791..2a652885c9 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -182,6 +182,15 @@ static void smc91c111_pop_rx_fifo(smc91c111_state *s)
{
int i;
+ if (s->rx_fifo_len == 0) {
+ /*
+ * The datasheet doesn't document what the behaviour is if the
+ * guest tries to pop an empty RX FIFO, and there's no obvious
+ * error status register to report it. Just ignore the attempt.
+ */
+ return;
+ }
+
s->rx_fifo_len--;
if (s->rx_fifo_len) {
for (i = 0; i < s->rx_fifo_len; i++)
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 11/14] elfload: Fix alignment when unmapping excess reservation
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (9 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 10/14] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 12/14] target/sparc: Fix register selection for all F*TOx and FxTO* instructions Michael Tokarev
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Fabiano Rosas, Richard Henderson, Michael Tokarev
From: Fabiano Rosas <farosas@suse.de>
When complying with the alignment requested in the ELF and unmapping
the excess reservation, having align_end not aligned to the guest page
causes the unmap to be rejected by the alignment check at
target_munmap and later brk adjustments hit an EEXIST.
Fix by aligning the start of region to be unmapped.
Fixes: c81d1fafa6 ("linux-user: Honor elf alignment when placing images")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1913
Signed-off-by: Fabiano Rosas <farosas@suse.de>
[rth: Align load_end as well.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250213143558.10504-1-farosas@suse.de>
(cherry picked from commit 4b7b20a3b72c5000ea71bef505c16e6e628268b6)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 471a384b22..aa3607f3ac 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3349,8 +3349,8 @@ static void load_elf_image(const char *image_name, const ImageSource *src,
if (align_size != reserve_size) {
abi_ulong align_addr = ROUND_UP(load_addr, align);
- abi_ulong align_end = align_addr + reserve_size;
- abi_ulong load_end = load_addr + align_size;
+ abi_ulong align_end = TARGET_PAGE_ALIGN(align_addr + reserve_size);
+ abi_ulong load_end = TARGET_PAGE_ALIGN(load_addr + align_size);
if (align_addr != load_addr) {
target_munmap(load_addr, align_addr - load_addr);
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 12/14] target/sparc: Fix register selection for all F*TOx and FxTO* instructions
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (10 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 11/14] elfload: Fix alignment when unmapping excess reservation Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 13/14] target/sparc: Fix gdbstub incorrectly handling registers f32-f62 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 14/14] net/slirp: libslirp 4.9.0 compatibility Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Mikael Szreder, Artyom Tarasenko, Richard Henderson,
Michael Tokarev
From: Mikael Szreder <git@miszr.win>
A bug was introduced in commit 0bba7572d40d which causes the fdtox
and fqtox instructions to incorrectly select the destination registers.
More information and a test program can be found in issue #2802.
Cc: qemu-stable@nongnu.org
Fixes: 0bba7572d40d ("target/sparc: Perform DFPREG/QFPREG in decodetree")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2802
Signed-off-by: Mikael Szreder <git@miszr.win>
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
[rth: Squash patches together, since the second fixes a typo in the first.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250205090333.19626-3-git@miszr.win>
(cherry picked from commit 807c3ebd1e3fc2a1be6cdfc702ccea3fa0d2d9b2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode
index 989c20b44a..cfcdf6690e 100644
--- a/target/sparc/insns.decode
+++ b/target/sparc/insns.decode
@@ -321,12 +321,12 @@ FdMULq 10 ..... 110100 ..... 0 0110 1110 ..... @q_d_d
FNHADDs 10 ..... 110100 ..... 0 0111 0001 ..... @r_r_r
FNHADDd 10 ..... 110100 ..... 0 0111 0010 ..... @d_d_d
FNsMULd 10 ..... 110100 ..... 0 0111 1001 ..... @d_r_r
-FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @r_r2
-FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @r_d2
-FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @r_q2
-FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_r2
-FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_r2
-FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_r2
+FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @d_r2
+FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @d_d2
+FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @d_q2
+FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_d2
+FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_d2
+FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_d2
FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2
FdTOs 10 ..... 110100 00000 0 1100 0110 ..... @r_d2
FqTOs 10 ..... 110100 00000 0 1100 0111 ..... @r_q2
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 13/14] target/sparc: Fix gdbstub incorrectly handling registers f32-f62
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (11 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 12/14] target/sparc: Fix register selection for all F*TOx and FxTO* instructions Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 14/14] net/slirp: libslirp 4.9.0 compatibility Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Mikael Szreder, Richard Henderson, Michael Tokarev
From: Mikael Szreder <git@miszr.win>
The gdbstub implementation for the Sparc architecture would
incorrectly calculate the the floating point register offset.
This resulted in, for example, registers f32 and f34 to point to
the same value.
The issue was caused by the confusion between even register numbers
and even register indexes. For example, the register index of f32 is 64
and f34 is 65.
Cc: qemu-stable@nongnu.org
Fixes: 30038fd81808 ("target-sparc: Change fpr representation to doubles.")
Signed-off-by: Mikael Szreder <git@miszr.win>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250214070343.11501-1-git@miszr.win>
(cherry picked from commit 7a74e468089a58756b438d31a2a9a97f183780d7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c
index ec0036e9ef..134617fb23 100644
--- a/target/sparc/gdbstub.c
+++ b/target/sparc/gdbstub.c
@@ -79,8 +79,13 @@ int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
}
}
if (n < 80) {
- /* f32-f62 (double width, even numbers only) */
- return gdb_get_reg64(mem_buf, env->fpr[(n - 32) / 2].ll);
+ /* f32-f62 (16 double width registers, even register numbers only)
+ * n == 64: f32 : env->fpr[16]
+ * n == 65: f34 : env->fpr[17]
+ * etc...
+ * n == 79: f62 : env->fpr[31]
+ */
+ return gdb_get_reg64(mem_buf, env->fpr[(n - 64) + 16].ll);
}
switch (n) {
case 80:
@@ -173,8 +178,13 @@ int sparc_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
}
return 4;
} else if (n < 80) {
- /* f32-f62 (double width, even numbers only) */
- env->fpr[(n - 32) / 2].ll = tmp;
+ /* f32-f62 (16 double width registers, even register numbers only)
+ * n == 64: f32 : env->fpr[16]
+ * n == 65: f34 : env->fpr[17]
+ * etc...
+ * n == 79: f62 : env->fpr[31]
+ */
+ env->fpr[(n - 64) + 16].ll = tmp;
} else {
switch (n) {
case 80:
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Stable-9.2.2 14/14] net/slirp: libslirp 4.9.0 compatibility
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
` (12 preceding siblings ...)
2025-02-21 17:49 ` [Stable-9.2.2 13/14] target/sparc: Fix gdbstub incorrectly handling registers f32-f62 Michael Tokarev
@ 2025-02-21 17:49 ` Michael Tokarev
13 siblings, 0 replies; 15+ messages in thread
From: Michael Tokarev @ 2025-02-21 17:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Michael Tokarev, Samuel Thibault, Thomas Huth
Update the code in net/slirp.c to be compatible with
libslirp 4.9.0, which deprecated slirp_pollfds_fill()
and started using slirp_os_socket type for sockets
(which is a 64-bit integer on win64) for all callbacks
starting with version 6 of the interface.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-ID: <20250130123253.864681-1-mjt@tls.msk.ru>
[thuth: Added some spaces to make checkpatch.pl happy]
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit f141caa270af536b4d5b7c8540820f1bdd245d71)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/net/slirp.c b/net/slirp.c
index eb9a456ed4..102bec7b57 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -247,7 +247,14 @@ static void net_slirp_timer_mod(void *timer, int64_t expire_timer,
timer_mod(&t->timer, expire_timer);
}
-static void net_slirp_register_poll_fd(int fd, void *opaque)
+#if !SLIRP_CHECK_VERSION(4, 9, 0)
+# define slirp_os_socket int
+# define slirp_pollfds_fill_socket slirp_pollfds_fill
+# define register_poll_socket register_poll_fd
+# define unregister_poll_socket unregister_poll_fd
+#endif
+
+static void net_slirp_register_poll_sock(slirp_os_socket fd, void *opaque)
{
#ifdef WIN32
AioContext *ctxt = qemu_get_aio_context();
@@ -260,7 +267,7 @@ static void net_slirp_register_poll_fd(int fd, void *opaque)
#endif
}
-static void net_slirp_unregister_poll_fd(int fd, void *opaque)
+static void net_slirp_unregister_poll_sock(slirp_os_socket fd, void *opaque)
{
#ifdef WIN32
if (WSAEventSelect(fd, NULL, 0) != 0) {
@@ -286,8 +293,8 @@ static const SlirpCb slirp_cb = {
#endif
.timer_free = net_slirp_timer_free,
.timer_mod = net_slirp_timer_mod,
- .register_poll_fd = net_slirp_register_poll_fd,
- .unregister_poll_fd = net_slirp_unregister_poll_fd,
+ .register_poll_socket = net_slirp_register_poll_sock,
+ .unregister_poll_socket = net_slirp_unregister_poll_sock,
.notify = net_slirp_notify,
};
@@ -314,7 +321,7 @@ static int slirp_poll_to_gio(int events)
return ret;
}
-static int net_slirp_add_poll(int fd, int events, void *opaque)
+static int net_slirp_add_poll(slirp_os_socket fd, int events, void *opaque)
{
GArray *pollfds = opaque;
GPollFD pfd = {
@@ -363,8 +370,8 @@ static void net_slirp_poll_notify(Notifier *notifier, void *data)
switch (poll->state) {
case MAIN_LOOP_POLL_FILL:
- slirp_pollfds_fill(s->slirp, &poll->timeout,
- net_slirp_add_poll, poll->pollfds);
+ slirp_pollfds_fill_socket(s->slirp, &poll->timeout,
+ net_slirp_add_poll, poll->pollfds);
break;
case MAIN_LOOP_POLL_OK:
case MAIN_LOOP_POLL_ERR:
@@ -629,7 +636,9 @@ static int net_slirp_init(NetClientState *peer, const char *model,
s = DO_UPCAST(SlirpState, nc, nc);
- cfg.version = SLIRP_CHECK_VERSION(4,7,0) ? 4 : 1;
+ cfg.version =
+ SLIRP_CHECK_VERSION(4, 9, 0) ? 6 :
+ SLIRP_CHECK_VERSION(4, 7, 0) ? 4 : 1;
cfg.restricted = restricted;
cfg.in_enabled = ipv4;
cfg.vnetwork = net;
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-02-21 17:53 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 17:49 [Stable-9.2.2 00/14] Patch Round-up for stable 9.2.2, freeze on 2025-02-23 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 01/14] rust: add --rust-target option for bindgen Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 02/14] block: Fix leak in send_qmp_error_event Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 03/14] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()' Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 04/14] linux-user: Do not define struct sched_attr if libc headers do Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 05/14] qmp: update vhost-user protocol feature maps Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 06/14] gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 07/14] vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach() Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 08/14] ui/sdl2: reenable the SDL2 Windows keyboard hook procedure Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 09/14] make-release: don't rely on $CWD when excluding subproject directories Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 10/14] hw/net/smc91c111: Ignore attempt to pop from empty RX fifo Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 11/14] elfload: Fix alignment when unmapping excess reservation Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 12/14] target/sparc: Fix register selection for all F*TOx and FxTO* instructions Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 13/14] target/sparc: Fix gdbstub incorrectly handling registers f32-f62 Michael Tokarev
2025-02-21 17:49 ` [Stable-9.2.2 14/14] net/slirp: libslirp 4.9.0 compatibility Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).