&def->info, flags) < 0)
return NULL;
+ if (virDomainVirtioOptionsParseXML(virXPathNode("./driver", ctxt),
+ &def->virtio) < 0)
+ return NULL;
+
return g_steal_pointer(&def);
}
break;
}
+ if (!virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
+ return false;
+
return virDomainDeviceInfoCheckABIStability(&src->info, &dst->info);
}
const char *model = virDomainMemoryModelTypeToString(def->model);
g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
+ g_auto(virBuffer) driverAttrBuf = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&attrBuf, " model='%s'", model);
if (def->access)
virBufferAsprintf(&childBuf, "<uuid>%s</uuid>\n", uuidstr);
}
+ virDomainVirtioOptionsFormat(&driverAttrBuf, def->virtio);
+
+ virXMLFormatElement(&childBuf, "driver", &driverAttrBuf, NULL);
+
virDomainMemorySourceDefFormat(&childBuf, def);
virDomainMemoryTargetDefFormat(&childBuf, def, flags);
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
--machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
+-machine pc,usb=off,dump-guest-core=off,acpi=off \
-accel tcg \
-cpu qemu64 \
--m size=219136k \
--object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
+-m size=2316288k,maxmem=1099511627776k \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
+-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2371878912}' \
+-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-device '{"driver":"virtio-scsi-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"scsi0","bus":"pci.0","addr":"0x8"}' \
-device '{"driver":"virtio-serial-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"id":"virtio-serial0","bus":"pci.0","addr":"0x9"}' \
+-object '{"qom-type":"memory-backend-file","id":"memvirtiomem0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \
+-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":1073741824,"memdev":"memvirtiomem0","prealloc":true,"memaddr":5637144576,"dynamic-memslots":true,"id":"virtiomem0","bus":"pci.0","addr":"0x5"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/img1","node-name":"libvirt-1-storage","read-only":false}' \
-device '{"driver":"virtio-blk-pci","iommu_platform":true,"ats":true,"packed":true,"page-per-vq":true,"bus":"pci.0","addr":"0xa","drive":"libvirt-1-storage","id":"virtio-disk0","bootindex":1}' \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219136</memory>
- <currentMemory unit='KiB'>219136</currentMemory>
+ <maxMemory unit='KiB'>1099511627776</maxMemory>
+ <memory unit='KiB'>2316288</memory>
+ <currentMemory unit='KiB'>2316288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
+ <numa>
+ <cell id='0' cpus='0' memory='2316288' unit='KiB'/>
+ </numa>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<driver iommu='on' ats='on' packed='on' page_per_vq='on'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
</rng>
+ <memory model='virtio-mem'>
+ <driver iommu='on' ats='on' packed='on' page_per_vq='on'/>
+ <source>
+ <nodemask>1-3</nodemask>
+ <pagesize unit='KiB'>2048</pagesize>
+ </source>
+ <target dynamicMemslots='yes'>
+ <size unit='KiB'>2097152</size>
+ <node>0</node>
+ <block unit='KiB'>2048</block>
+ <requested unit='KiB'>1048576</requested>
+ <address base='0x150000000'/>
+ </target>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </memory>
</devices>
</domain>