On Mon, 2020-09-14 at 23:42 -0300, Daniel Henrique Barboza wrote:
@@ -16981,23 +17000,11 @@
virDomainMemoryDefParseXML(virDomainXMLOptionPtr xmlopt,
+ if (virDomainNVDimmAlignSizePseries(def) < 0)
+ goto error;
The outcome of this change is good, and overall it doesn't negatively
impact existing guest; however, the ParseXML() function is not the
correct place to perform it, and it should happen in the PostParse()
callback instead.
If the restrictions on alignment are, as you claim in the commit
message for the patch before this one, not QEMU-specific, then a
reasonable home for the rounding logic could be
virDomainDefPostParseMemory(), but you could also leave it in the
QEMU driver by implementing a qemuDomainMemoryDefPostParse() function
that's called by the qemuDomainDeviceDefPostParse() dispatcher.
--
Andrea Bolognani / Red Hat / Virtualization