On Thu, Apr 23, 2026 at 17:27:27 +0530, Akash Kulhalli via Devel wrote:
Thread an async_unplug flag through the internal QEMU vCPU unplug helpers.
When set, the unplug path returns after QEMU accepts the device deletion request and leaves final completion to the existing DEVICE_DELETED handling routines.
All callers still pass false, so this does not change behaviour yet.
Signed-off-by: Akash Kulhalli <akash.kulhalli@oracle.com> --- src/qemu/qemu_driver.c | 5 ++-- src/qemu/qemu_hotplug.c | 52 +++++++++++++++++++++++++++++++++-------- src/qemu/qemu_hotplug.h | 6 +++-- tests/qemuhotplugtest.c | 5 ++-- 4 files changed, 52 insertions(+), 16 deletions(-)
[...]
@@ -7287,14 +7299,33 @@ qemuDomainVcpuValidateConfig(virDomainDef *def, return 0; }
-
Keep the 2 empty lines above the function comment.
+/** + * qemuDomainSetVcpuInternal: + * + * When @async_unplug is set to true, libvirt will not wait for + * the guest to comply with the unplug request but instead return + * immediately after receiving the acknowledgement from QEMU. Otherwise, + * libvirt will wait for a brief moment (defined by qemuDomainGetUnplugTimeout) + * before giving up and returning control to the caller. + * + * If the request results in adding a vcpu, this parameter is ignored. + * + * @param driver the QEMU driver object + * @param vm the domain object + * @param def the live domain definition + * @param persistentDef the persistent (config) domain definition + * @param map a bitmap of cpus to be set to state @state + * @param state enable/disable the vcpus marked in @map + * @param async_unplug only used in case of unplug (i.e. @state=false)
Please follow our style for comments: Arguments documented first, with following syntax: * @driver: the QEMU driver object * @vm: domain object etc. then the description. With that: Reviewed-by: Peter Krempa <pkrempa@redhat.com>