On Wed, Feb 19, 2025 at 22:27:13 +0530, Harikumar Rajkumar wrote:
From: Chun Feng Wu <danielwuwy(a)163.com>
ThrottleGroup lifecycle implementation, note, in QOM, throttlegroup name is prefixed
with
"throttle-" to clearly separate throttle group objects into their own
namespace.
* "qemuDomainSetThrottleGroup", this method is to add("object-add")
or update("qom-set")
throttlegroup in QOM and update corresponding objects in DOM
* "qemuDomainGetThrottleGroup", this method queries throttlegroup info by
groupname
* "qemuDomainDelThrottleGroup", this method checks if group is referenced by
any throttle
in disks and delete it if it's not used anymore
* Check flag "QEMU_CAPS_OBJECT_JSON" during qemuDomainSetThrottleGroup when vm
is active,
throttle group feature requries such flag
* "objectAddNoWrap"("props") check is done by reusing
qemuMonitorAddObject in
qemuDomainSetThrottleGroup
Signed-off-by: Chun Feng Wu <danielwuwy(a)163.com>
* Apply suggested coding style changes.
* cleanup qemu Get ThrottleGroup.
* Update the version to 11.1.0.
Signed-off-by: Harikumar Rajkumar <harirajkumar230(a)gmail.com>
---
src/qemu/qemu_driver.c | 243 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 243 insertions(+)
[...]
+ priv = vm->privateData;
+ qemuCaps = priv->qemuCaps;
+ if (virDomainObjIsActive(vm)) {
+ if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON)) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("This QEMU doesn't support throttle group
creation"));
+ return -1;
+ }
While looking at this I noticed that QEMU_CAPS_OBJECT_JSON is no longer
needed as it's always present with qemu versions we currently support:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/7...
Once the patches are reviewed I'll rebase this on top and delete this.