These are similar to the minimal cases that we just introduced,
but are intended to demonstrate what device or controller model
libvirt will choose when one is not provided by the user.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
...64-virt-default-models.aarch64-latest.args | 44 +++++++++++
...h64-virt-default-models.aarch64-latest.xml | 79 +++++++++++++++++++
.../aarch64-virt-default-models.xml | 21 +++++
...4-pseries-default-models.ppc64-latest.args | 38 +++++++++
...64-pseries-default-models.ppc64-latest.xml | 53 +++++++++++++
.../ppc64-pseries-default-models.xml | 21 +++++
...64-virt-default-models.riscv64-latest.args | 42 ++++++++++
...v64-virt-default-models.riscv64-latest.xml | 68 ++++++++++++++++
.../riscv64-virt-default-models.xml | 21 +++++
...s390x-ccw-default-models.s390x-latest.args | 37 +++++++++
.../s390x-ccw-default-models.s390x-latest.xml | 46 +++++++++++
.../s390x-ccw-default-models.xml | 21 +++++
...86_64-pc-default-models.x86_64-latest.args | 39 +++++++++
...x86_64-pc-default-models.x86_64-latest.xml | 50 ++++++++++++
.../x86_64-pc-default-models.xml | 21 +++++
...6_64-q35-default-models.x86_64-latest.args | 44 +++++++++++
...86_64-q35-default-models.x86_64-latest.xml | 68 ++++++++++++++++
.../x86_64-q35-default-models.xml | 21 +++++
tests/qemuxmlconftest.c | 7 ++
19 files changed, 741 insertions(+)
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
create mode 100644 tests/qemuxmlconfdata/aarch64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
create mode 100644 tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-default-models.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/s390x-ccw-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-pc-default-models.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/x86_64-q35-default-models.xml
diff --git a/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
b/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
new file mode 100644
index 0000000000..0c4acf800f
--- /dev/null
+++ b/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.args
@@ -0,0 +1,44 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine
virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \
+-accel tcg \
+-cpu cortex-a15 \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}'
\
+-device
'{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}'
\
+-device
'{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}'
\
+-device
'{"driver":"pcie-pci-bridge","id":"pci.4","bus":"pci.1","addr":"0x0"}'
\
+-device
'{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}'
\
+-device
'{"driver":"pcie-root-port","port":12,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x4"}'
\
+-device
'{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}'
\
+-device
'{"driver":"lsi","id":"scsi0","bus":"pci.4","addr":"0x1"}'
\
+-netdev '{"type":"user","id":"hostnet0"}'
\
+-device
'{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}'
\
+-chardev pty,id=charserial0 \
+-serial chardev:charserial0 \
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.5","addr":"0x0"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
b/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
new file mode 100644
index 0000000000..87be062c89
--- /dev/null
+++ b/tests/qemuxmlconfdata/aarch64-virt-default-models.aarch64-latest.xml
@@ -0,0 +1,79 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='aarch64' machine='virt'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <gic version='2'/>
+ </features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>cortex-a15</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <controller type='usb' index='0' model='qemu-xhci'>
+ <address type='pci' domain='0x0000' bus='0x03'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='scsi' index='0' model='lsilogic'>
+ <address type='pci' domain='0x0000' bus='0x04'
slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='2' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='3'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='3' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='4'
model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='5'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0xb'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x3'/>
+ </controller>
+ <controller type='pci' index='6'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='6' port='0xc'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x4'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x02'
slot='0x00' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='system-serial' port='0'>
+ <model name='pl011'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x05'
slot='0x00' function='0x0'/>
+ </video>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/aarch64-virt-default-models.xml
b/tests/qemuxmlconfdata/aarch64-virt-default-models.xml
new file mode 100644
index 0000000000..cf7f330c0b
--- /dev/null
+++ b/tests/qemuxmlconfdata/aarch64-virt-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='aarch64' machine='virt'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <!-- No default model for <panic/> on aarch64 -->
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
b/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
new file mode 100644
index 0000000000..1395f19bfe
--- /dev/null
+++ b/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.args
@@ -0,0 +1,38 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-ppc64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine pseries,usb=off,dump-guest-core=off,memory-backend=ppc_spapr.ram \
+-accel tcg \
+-cpu POWER9 \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"ppc_spapr.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"qemu-xhci","id":"usb","bus":"pci.0","addr":"0x2"}'
\
+-device
'{"driver":"spapr-vscsi","id":"scsi0","reg":8192}'
\
+-netdev user,id=hostnet0 \
+-device
'{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x1"}'
\
+-chardev pty,id=charserial0 \
+-device
'{"driver":"spapr-vty","chardev":"charserial0","id":"serial0","reg":805306368}'
\
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"VGA","id":"video0","vgamem_mb":16,"bus":"pci.0","addr":"0x3"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
b/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
new file mode 100644
index 0000000000..2304c6f786
--- /dev/null
+++ b/tests/qemuxmlconfdata/ppc64-pseries-default-models.ppc64-latest.xml
@@ -0,0 +1,53 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='ppc64' machine='pseries'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
+ <controller type='usb' index='0' model='qemu-xhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='scsi' index='0' model='ibmvscsi'>
+ <address type='spapr-vio' reg='0x00002000'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'>
+ <model name='spapr-pci-host-bridge'/>
+ <target index='0'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='spapr-vio-serial' port='0'>
+ <model name='spapr-vty'/>
+ </target>
+ <address type='spapr-vio' reg='0x30000000'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ <address type='spapr-vio' reg='0x30000000'/>
+ </console>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='vga' vram='16384' heads='1'
primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
+ </video>
+ <memballoon model='none'/>
+ <panic model='pseries'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
b/tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
new file mode 100644
index 0000000000..4c2d16f01a
--- /dev/null
+++ b/tests/qemuxmlconfdata/ppc64-pseries-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='ppc64' machine='pseries'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-ppc64</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <panic/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
b/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
new file mode 100644
index 0000000000..28b56d876c
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.args
@@ -0,0 +1,42 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-riscv64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram \
+-accel tcg \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}'
\
+-device
'{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}'
\
+-device
'{"driver":"pcie-pci-bridge","id":"pci.3","bus":"pci.1","addr":"0x0"}'
\
+-device
'{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}'
\
+-device
'{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}'
\
+-device
'{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.3","addr":"0x1"}'
\
+-device
'{"driver":"lsi","id":"scsi0","bus":"pci.3","addr":"0x2"}'
\
+-netdev '{"type":"user","id":"hostnet0"}'
\
+-device
'{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x0"}'
\
+-chardev pty,id=charserial0 \
+-serial chardev:charserial0 \
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pci.4","addr":"0x0"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
b/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
new file mode 100644
index 0000000000..942bd21f9e
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-default-models.riscv64-latest.xml
@@ -0,0 +1,68 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='riscv64' machine='virt'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x03'
slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='scsi' index='0' model='lsilogic'>
+ <address type='pci' domain='0x0000' bus='0x03'
slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='2' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='3'
model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='4'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='5'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0xb'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x3'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x02'
slot='0x00' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='system-serial' port='0'>
+ <model name='16550a'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x04'
slot='0x00' function='0x0'/>
+ </video>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/riscv64-virt-default-models.xml
b/tests/qemuxmlconfdata/riscv64-virt-default-models.xml
new file mode 100644
index 0000000000..d421b080a8
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='riscv64' machine='virt'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <!-- No default model for <panic/> on riscv64 -->
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
b/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
new file mode 100644
index 0000000000..4c27502208
--- /dev/null
+++ b/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.args
@@ -0,0 +1,37 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-s390x \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine s390-ccw-virtio,usb=off,dump-guest-core=off,memory-backend=s390.ram \
+-accel tcg \
+-cpu qemu \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"s390.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"virtio-scsi-ccw","id":"scsi0","devno":"fe.0.0002"}'
\
+-netdev '{"type":"user","id":"hostnet0"}'
\
+-device
'{"driver":"virtio-net-ccw","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","devno":"fe.0.0000"}'
\
+-chardev pty,id=charserial0 \
+-device
'{"driver":"sclpconsole","chardev":"charserial0","id":"serial0"}'
\
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"virtio-gpu-ccw","id":"video0","max_outputs":1,"devno":"fe.0.0001"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
b/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
new file mode 100644
index 0000000000..9e0af389a9
--- /dev/null
+++ b/tests/qemuxmlconfdata/s390x-ccw-default-models.s390x-latest.xml
@@ -0,0 +1,46 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <controller type='usb' index='0' model='none'/>
+ <controller type='scsi' index='0' model='virtio-scsi'>
+ <address type='ccw' cssid='0xfe' ssid='0x0'
devno='0x0002'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='virtio'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0'
devno='0x0000'/>
+ </interface>
+ <serial type='pty'>
+ <target type='sclp-serial' port='0'>
+ <model name='sclpconsole'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='virtio' heads='1' primary='yes'/>
+ <address type='ccw' cssid='0xfe' ssid='0x0'
devno='0x0001'/>
+ </video>
+ <memballoon model='none'/>
+ <panic model='s390'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/s390x-ccw-default-models.xml
b/tests/qemuxmlconfdata/s390x-ccw-default-models.xml
new file mode 100644
index 0000000000..a196129628
--- /dev/null
+++ b/tests/qemuxmlconfdata/s390x-ccw-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <panic/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
b/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
new file mode 100644
index 0000000000..3220a40959
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.args
@@ -0,0 +1,39 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
+-accel tcg \
+-cpu qemu64 \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}'
\
+-device
'{"driver":"lsi","id":"scsi0","bus":"pci.0","addr":"0x4"}'
\
+-netdev '{"type":"user","id":"hostnet0"}'
\
+-device
'{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.0","addr":"0x3"}'
\
+-chardev pty,id=charserial0 \
+-device
'{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}'
\
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"cirrus-vga","id":"video0","bus":"pci.0","addr":"0x2"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-device '{"driver":"pvpanic"}' \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
b/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
new file mode 100644
index 0000000000..dc563fdaf9
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-pc-default-models.x86_64-latest.xml
@@ -0,0 +1,50 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='scsi' index='0' model='lsilogic'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x04' function='0x0'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x03' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='isa-serial' port='0'>
+ <model name='isa-serial'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='none'/>
+ <panic model='isa'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/x86_64-pc-default-models.xml
b/tests/qemuxmlconfdata/x86_64-pc-default-models.xml
new file mode 100644
index 0000000000..6727d2f6a0
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-pc-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <panic/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
b/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
new file mode 100644
index 0000000000..b9905c6446
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.args
@@ -0,0 +1,44 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
\
+-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
+-accel tcg \
+-cpu qemu64 \
+-m size=4194304k \
+-object
'{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}'
\
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device
'{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}'
\
+-device
'{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}'
\
+-device
'{"driver":"pcie-root-port","port":17,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x1"}'
\
+-device
'{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.2","addr":"0x2"}'
\
+-device
'{"driver":"lsi","id":"scsi0","bus":"pci.2","addr":"0x3"}'
\
+-netdev '{"type":"user","id":"hostnet0"}'
\
+-device
'{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.2","addr":"0x1"}'
\
+-chardev pty,id=charserial0 \
+-device
'{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}'
\
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"cirrus-vga","id":"video0","bus":"pcie.0","addr":"0x1"}'
\
+-global ICH9-LPC.noreboot=off \
+-watchdog-action reset \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-device '{"driver":"pvpanic"}' \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
b/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
new file mode 100644
index 0000000000..782fe39491
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-q35-default-models.x86_64-latest.xml
@@ -0,0 +1,68 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory unit='KiB'>4194304</memory>
+ <currentMemory unit='KiB'>4194304</currentMemory>
+ <vcpu placement='static'>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x02'
slot='0x02' function='0x0'/>
+ </controller>
+ <controller type='scsi' index='0' model='lsilogic'>
+ <address type='pci' domain='0x0000' bus='0x02'
slot='0x03' function='0x0'/>
+ </controller>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x1f' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='2'
model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='3'
model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='3' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x1'/>
+ </controller>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ <model type='rtl8139'/>
+ <address type='pci' domain='0x0000' bus='0x02'
slot='0x01' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target type='isa-serial' port='0'>
+ <model name='isa-serial'/>
+ </target>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <audio id='1' type='none'/>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
+ </video>
+ <watchdog model='itco' action='reset'/>
+ <memballoon model='none'/>
+ <panic model='isa'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/x86_64-q35-default-models.xml
b/tests/qemuxmlconfdata/x86_64-q35-default-models.xml
new file mode 100644
index 0000000000..5cdf07f9d3
--- /dev/null
+++ b/tests/qemuxmlconfdata/x86_64-q35-default-models.xml
@@ -0,0 +1,21 @@
+<domain type='qemu'>
+ <name>guest</name>
+ <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+ <memory>4194304</memory>
+ <vcpu>4</vcpu>
+ <os>
+ <type arch='x86_64' machine='q35'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb'/>
+ <controller type='scsi'/>
+ <interface type='user'>
+ <mac address='52:54:00:09:a4:37'/>
+ </interface>
+ <serial type='pty'/>
+ <video/>
+ <memballoon model='none'/>
+ <panic/>
+ </devices>
+</domain>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index 445e6ff5e1..ce8f0d1964 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1233,6 +1233,13 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("ppc64-pseries-minimal",
"ppc64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("s390x-ccw-minimal",
"s390x");
+ DO_TEST_CAPS_LATEST_ABI_UPDATE("x86_64-pc-default-models");
+ DO_TEST_CAPS_LATEST_ABI_UPDATE("x86_64-q35-default-models");
+ DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("aarch64-virt-default-models",
"aarch64");
+ DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("riscv64-virt-default-models",
"riscv64");
+ DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("ppc64-pseries-default-models",
"ppc64");
+ DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("s390x-ccw-default-models",
"s390x");
+
DO_TEST_CAPS_LATEST_PARSE_ERROR("no-memory");
DO_TEST_CAPS_LATEST("title-and-description");
--
2.43.0