Introduced in QEMU's commit of v2.12.0-rc0~148^2~4 the .align
attribute of memory-backend-file is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_command.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 395b2e0a8f..256ef4912c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3410,16 +3410,8 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps,
if (virJSONValueObjectAdd(&props, "U:size", mem->size * 1024, NULL)
< 0)
return -1;
- if (mem->alignsize) {
- if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("nvdimm align property is not available "
- "with this QEMU binary"));
- return -1;
- }
- if (virJSONValueObjectAdd(&props, "U:align", mem->alignsize *
1024, NULL) < 0)
- return -1;
- }
+ if (virJSONValueObjectAdd(&props, "P:align", mem->alignsize * 1024,
NULL) < 0)
+ return -1;
if (mem->nvdimmPmem) {
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM)) {
--
2.37.4