def->queues || def->cmd_per_lun || def->max_sectors || def->ioeventfd ||
def->iothread ||
virDomainDeviceInfoNeedsFormat(&def->info, flags) || pcihole64) {
- virBufferAddLit(buf, ">\n");
if (pciModel) {
modelName = virDomainControllerPCIModelNameTypeToString(def->opts.pciopts.modelName);
virBufferAsprintf(&childBuf, "<pcihole64 unit='KiB'>%lu</"
"pcihole64>\n", def->opts.pciopts.pcihole64size);
}
+ }
+ if (virBufferUse(&childBuf)) {
+ virBufferAddLit(buf, ">\n");
virBufferAddBuffer(buf, &childBuf);
virBufferAddLit(buf, "</controller>\n");
} else {
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-s390x</emulator>
- <controller type='virtio-serial' index='0'>
- </controller>
+ <controller type='virtio-serial' index='0'/>
<console type='pty'>
<target type='virtio' port='0'/>
</console>