diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3e8114043025d8e58910e1932e8769b14ecfe8e7..0e774889a2b8f8dedacd99cf05feb490349716b4 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -27985,6 +27985,17 @@ virDomainMemtuneFormat(virBufferPtr buf, virXMLFormatElement(buf, "memtune", NULL, &childBuf); + ret = 0; + return ret; +} + + +static void +virDomainMemorybackingFormat(virBufferPtr buf, + const virDomainMemtune *mem) +{ + g_auto(virBuffer) childBuf = VIR_BUFFER_INITIALIZER; + virBufferSetChildIndent(&childBuf, buf); if (mem->nhugepages) @@ -28006,9 +28017,6 @@ virDomainMemtuneFormat(virBufferPtr buf, virBufferAddLit(&childBuf, "\n"); virXMLFormatElement(buf, "memoryBacking", NULL, &childBuf); - - ret = 0; - return ret; } @@ -28484,6 +28492,8 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def, if (virDomainMemtuneFormat(buf, &def->mem) < 0) goto error; + virDomainMemorybackingFormat(buf, &def->mem); + if (virDomainCpuDefFormat(buf, def) < 0) goto error;