
On 6/29/20 11:58 AM, Andrea Bolognani wrote:
On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote:
+++ b/src/qemu/qemu_validate.c @@ -1028,6 +1028,12 @@ qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInfoPtr info, return -1; }
+ if (virDeviceInfoPCIAddressExtensionIsWanted(info)) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("Missing uid or fid attribute of zPCI address")); + return -1; + }
Throwing an XML_ERROR here doesn't seem right, because from the user's point of view it's perfectly fine to only provide a partial zPCI address: by the point we get here, we've already gone through the PostParse callback, so if either attribute is missing that's because of a developer mistake.
Do we even need this check at all? I'm the one who asked for it to be introduced, but now I'm questioning that :)
Maybe we don't need it then. Regardless, it doesn't belong into XML formatter. Should I post a v2 where the check is removed? Michal