In fee8a61d29 a new attribute to <memballoon/> was introduced:
free-page-reporting. We don't really like hyphens in attribute
names. Use underscores instead.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/formatdomain.rst | 4 ++--
docs/schemas/domaincommon.rng | 2 +-
src/conf/domain_conf.c | 8 ++++----
src/qemu/qemu_validate.c | 2 +-
.../virtio-options-memballoon-freepage-reporting.err | 2 +-
.../virtio-options-memballoon-freepage-reporting.xml | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 83dec62f30..5ec765ad3d 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -6755,8 +6755,8 @@ Example: manually added device with static PCI slot 2 requested
release some memory at the last moment before a guest's process get killed by
Out of Memory killer. :since:`Since 1.3.1, QEMU and KVM only`
-``free-page-reporting``
- The optional ``free-page-reporting`` attribute allows to enable/disable
+``free_page_reporting``
+ The optional ``free_page_reporting`` attribute allows to enable/disable
("on"/"off", respectively) the ability of the QEMU virtio memory
balloon to
return unused pages back to the hypervisor to be used by other guests or
processes. :since:`Since 6.9.0, QEMU and KVM only`
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 0a0f0ed8a8..1f37e0744d 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4540,7 +4540,7 @@
</attribute>
</optional>
<optional>
- <attribute name="free-page-reporting">
+ <attribute name="free_page_reporting">
<ref name="virOnOff"/>
</attribute>
</optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1d3661c21f..006e5a170b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15361,10 +15361,10 @@ virDomainMemballoonDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
- if ((freepage_reporting = virXMLPropString(node, "free-page-reporting"))
&&
+ if ((freepage_reporting = virXMLPropString(node, "free_page_reporting"))
&&
(def->free_page_reporting =
virTristateSwitchTypeFromString(freepage_reporting)) <= 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("invalid free-page-reporting attribute value
'%s'"), freepage_reporting);
+ _("invalid free_page_reporting attribute value
'%s'"), freepage_reporting);
goto error;
}
@@ -23548,7 +23548,7 @@ virDomainMemballoonDefCheckABIStability(virDomainMemballoonDefPtr
src,
if (src->free_page_reporting != dst->free_page_reporting) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Target balloon free-page-reporting attribute value "
+ _("Target balloon free_page_reporting attribute value "
"'%s' does not match source '%s'"),
virTristateSwitchTypeToString(dst->free_page_reporting),
virTristateSwitchTypeToString(src->free_page_reporting));
@@ -27662,7 +27662,7 @@ virDomainMemballoonDefFormat(virBufferPtr buf,
virTristateSwitchTypeToString(def->autodeflate));
if (def->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT)
- virBufferAsprintf(&attrBuf, " free-page-reporting='%s'",
+ virBufferAsprintf(&attrBuf, " free_page_reporting='%s'",
virTristateSwitchTypeToString(def->free_page_reporting));
if (def->period)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index bc3043bb3f..3ea8249977 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -3934,7 +3934,7 @@ qemuValidateDomainDeviceDefMemballoon(const virDomainMemballoonDef
*memballoon,
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"));
+ _("free_page_reporting is not supported by this QEMU
binary"));
return -1;
}
diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.err
b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.err
index de06de0a85..8cf7e0bf4a 100644
--- a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.err
+++ b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.err
@@ -1 +1 @@
-unsupported configuration: free-page-reporting is not supported by this QEMU binary
+unsupported configuration: free_page_reporting is not supported by this QEMU binary
diff --git a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml
b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml
index ff7549a789..04f4ce7b75 100644
--- a/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml
+++ b/tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml
@@ -15,7 +15,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pci-root'/>
- <memballoon model='virtio' free-page-reporting='on'>
+ <memballoon model='virtio' free_page_reporting='on'>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
</memballoon>
</devices>
--
2.26.2