The upcoming QEMU 6.2.0 implements a new event called DEVICE_UNPLUG_GUEST_ERROR, a new event that reports generic device unplug errors that were detected by the guest and reported back to QEMU. This new event is going to be specially useful for pseries guests that uses newer kernels (must have kernel commit 29c9a2699e71), which is the case for Fedora 34 at this moment. These guests have the capability of reporting CPU removal errors back to QEMU which, starting in 6.2.0, will emit the DEVICE_UNPLUG_GUEST_ERROR event. Libvirt can use this event to abort the device removal immediately instead of waiting for 'setvcpus' timeout. QEMU 6.2.0 is also going to emit DEVICE_UNPLUG_GUEST_ERROR for memory hotunplug errors, both in pseries and ACPI guests. QEMU 6.1.0 reports memory removal errors using the MEM_UNPLUG_ERROR event, which is going to be deprecated by DEVICE_UNPLUG_GUEST_ERROR in 6.2.0. Given that Libvirt wasn't handling the MEM_UNPLUG_ERROR event we don't need to worry about it - adding support to DEVICE_UNPLUG_GUEST_ERROR will be enough to cover all future cases. This patch adds support to DEVICE_UNPLUG_GUEST_ERROR by adding the minimal wiring required for Libvirt to be aware of it. The monitor callback for this event will abort the pending removal operation of the device reported by the "device" property of the event. Most of the heavy lifting is already done by existing code that handles QEMU_DOMAIN_UNPLUGGING_DEVICE_STATUS_GUEST_REJECTED, making our life easier to abort the pending removal operation. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Libvirt API for virtualization
Libvirt provides a portable, long term stable C API for managing the virtualization technologies provided by many operating systems. It includes support for QEMU, KVM, Xen, LXC, bhyve, Virtuozzo, VMware vCenter and ESX, VMware Desktop, Hyper-V, VirtualBox and the POWER Hypervisor.
For some of these hypervisors, it provides a stateful management daemon which runs on the virtualization host allowing access to the API both by non-privileged local users and remote users.
Layered packages provide bindings of the libvirt C API into other languages including Python, Perl, PHP, Go, Java, OCaml, as well as mappings into object systems such as GObject, CIM and SNMP.
Further information about the libvirt project can be found on the website:
License
The libvirt C API is distributed under the terms of GNU Lesser
General Public License, version 2.1 (or later). Some parts of the code
that are not part of the C library may have the more restrictive GNU
General Public License, version 2.0 (or later). See the files
COPYING.LESSER
and COPYING
for full license
terms & conditions.
Installation
Instructions on building and installing libvirt can be found on the website:
https://libvirt.org/compiling.html
Contributing
The libvirt project welcomes contributions in many ways. For most components the best way to contribute is to send patches to the primary development mailing list. Further guidance on this can be found on the website:
https://libvirt.org/contribute.html
Contact
The libvirt project has two primary mailing lists:
- libvirt-users@redhat.com (for user discussions)
- libvir-list@redhat.com (for development only)
Further details on contacting the project are available on the website: