mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
QEMU: introduce Virtio free page reporting feature
This patch enables the free-page-reporting in qemu. Signed-off-by: Nico Pache <npache@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
5032b247e9
commit
021fea29c3
@ -3830,6 +3830,11 @@ qemuBuildMemballoonCommandLine(virCommandPtr cmd,
|
||||
virTristateSwitchTypeToString(def->memballoon->autodeflate));
|
||||
}
|
||||
|
||||
if (def->memballoon->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||
virBufferAsprintf(&buf, ",free-page-reporting=%s",
|
||||
virTristateSwitchTypeToString(def->memballoon->free_page_reporting));
|
||||
}
|
||||
|
||||
qemuBuildVirtioOptionsStr(&buf, def->memballoon->virtio);
|
||||
|
||||
if (qemuCommandAddExtDevice(cmd, &def->memballoon->info) < 0)
|
||||
|
@ -3926,6 +3926,13 @@ qemuValidateDomainDeviceDefMemballoon(const virDomainMemballoonDef *memballoon,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (memballoon->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT &&
|
||||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("free-page-reporting is not supported by this QEMU binary"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (qemuValidateDomainVirtioOptions(memballoon->virtio, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user