On Wed, Apr 29, 2026 at 17:43:29 +0530, Akash Kulhalli via Devel wrote:
Add VIR_DOMAIN_SETVCPU_ASYNC_UNPLUG for virDomainSetVcpu().
Define a dedicated virDomainSetVcpuBehaviour flag type and wire the new flag through the QEMU driver. As with setvcpus async unplug, success indicates request acceptance while final completion is reported by the vcpu-removed event.
Update the API documentation and add virsh support for the async path to the setvcpu subcommand.
Signed-off-by: Akash Kulhalli <akash.kulhalli@oracle.com> --- docs/manpages/virsh.rst | 8 +++++++- include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++ src/libvirt-domain.c | 12 +++++++++++- src/qemu/qemu_driver.c | 6 ++++-- tools/virsh-domain.c | 8 ++++++++ 5 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index cc9028b2e540..2db9772fca43 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -4868,7 +4868,7 @@ setvcpu
::
- setvcpu domain vcpulist [--enable] | [--disable] + setvcpu domain vcpulist [--enable] | [--disable] [--async] [[--live] [--config] | [--current]]
Change state of individual vCPUs using hot(un)plug mechanism. @@ -4888,6 +4888,12 @@ If *--current* is specified, it is equivalent to either *--live* or default. Both *--live* and *--config* flags may be given, but *--current* is exclusive.
+If *--async* is specified with *--disable*, live vCPU unplug requests are +fired without waiting for the guest to comply. This may optionally be +combined with *--config*. Final completion of this operation is reported
Same as with previous patch I'll remove the sentence about combining with --config.
+by the ``vcpu-removed`` domain event, while rejected unplug requests continue +to be reported by ``device-removal-failed``.
Reviewed-by: Peter Krempa <pkrempa@redhat.com> And I'll shortly push this. Since this is a new feature consider adding an entry to NEWS.rst.