Add test script for loongarch

Add domaincapstest qemuxml2argvtest qemuxml2xmltest
related test cases for loongarch.

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Xianglai Li 2024-03-21 11:30:29 +08:00 committed by Andrea Bolognani
parent 0038b155ec
commit e478a6d3f3
32 changed files with 31720 additions and 2 deletions

View File

@ -0,0 +1,165 @@
<domainCapabilities>
<path>/usr/bin/qemu-system-loongarch64</path>
<domain>qemu</domain>
<machine>virt</machine>
<arch>loongarch64</arch>
<vcpu max='256'/>
<iothreads supported='yes'/>
<os supported='yes'>
<enum name='firmware'>
<value>efi</value>
</enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
<enum name='type'>
<value>rom</value>
<value>pflash</value>
</enum>
<enum name='readonly'>
<value>yes</value>
<value>no</value>
</enum>
<enum name='secure'>
<value>no</value>
</enum>
</loader>
</os>
<cpu>
<mode name='host-passthrough' supported='no'/>
<mode name='maximum' supported='yes'>
<enum name='maximumMigratable'>
<value>on</value>
<value>off</value>
</enum>
</mode>
<mode name='host-model' supported='no'/>
<mode name='custom' supported='yes'>
<model usable='unknown' vendor='unknown'>la132</model>
<model usable='unknown' vendor='unknown'>la464</model>
<model usable='unknown' vendor='unknown'>max</model>
</mode>
</cpu>
<memoryBacking supported='yes'>
<enum name='sourceType'>
<value>file</value>
<value>anonymous</value>
<value>memfd</value>
</enum>
</memoryBacking>
<devices>
<disk supported='yes'>
<enum name='diskDevice'>
<value>disk</value>
<value>cdrom</value>
<value>floppy</value>
<value>lun</value>
</enum>
<enum name='bus'>
<value>fdc</value>
<value>scsi</value>
<value>virtio</value>
<value>usb</value>
<value>sata</value>
</enum>
<enum name='model'>
<value>virtio</value>
<value>virtio-transitional</value>
<value>virtio-non-transitional</value>
</enum>
</disk>
<graphics supported='yes'>
<enum name='type'>
<value>sdl</value>
<value>vnc</value>
<value>spice</value>
<value>dbus</value>
</enum>
</graphics>
<video supported='yes'>
<enum name='modelType'>
<value>vga</value>
<value>cirrus</value>
<value>virtio</value>
<value>none</value>
<value>bochs</value>
<value>ramfb</value>
</enum>
</video>
<hostdev supported='yes'>
<enum name='mode'>
<value>subsystem</value>
</enum>
<enum name='startupPolicy'>
<value>default</value>
<value>mandatory</value>
<value>requisite</value>
<value>optional</value>
</enum>
<enum name='subsysType'>
<value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
<enum name='capsType'/>
<enum name='pciBackend'>
<value>default</value>
<value>vfio</value>
</enum>
</hostdev>
<rng supported='yes'>
<enum name='model'>
<value>virtio</value>
<value>virtio-transitional</value>
<value>virtio-non-transitional</value>
</enum>
<enum name='backendModel'>
<value>random</value>
<value>egd</value>
<value>builtin</value>
</enum>
</rng>
<filesystem supported='yes'>
<enum name='driverType'>
<value>path</value>
<value>handle</value>
<value>virtiofs</value>
</enum>
</filesystem>
<tpm supported='no'/>
<redirdev supported='yes'>
<enum name='bus'>
<value>usb</value>
</enum>
</redirdev>
<channel supported='yes'>
<enum name='type'>
<value>pty</value>
<value>unix</value>
<value>spicevmc</value>
</enum>
</channel>
<crypto supported='yes'>
<enum name='model'>
<value>virtio</value>
</enum>
<enum name='type'>
<value>qemu</value>
</enum>
<enum name='backendModel'>
<value>builtin</value>
<value>lkcf</value>
</enum>
</crypto>
</devices>
<features>
<gic supported='no'/>
<vmcoreinfo supported='yes'/>
<genid supported='no'/>
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
</features>
</domainCapabilities>

View File

@ -0,0 +1,169 @@
<domainCapabilities>
<path>/usr/bin/qemu-system-loongarch64</path>
<domain>kvm</domain>
<machine>virt</machine>
<arch>loongarch64</arch>
<vcpu max='256'/>
<iothreads supported='yes'/>
<os supported='yes'>
<enum name='firmware'>
<value>efi</value>
</enum>
<loader supported='yes'>
<value>/obviously/fake/firmware1.fd</value>
<value>/obviously/fake/firmware2.fd</value>
<enum name='type'>
<value>rom</value>
<value>pflash</value>
</enum>
<enum name='readonly'>
<value>yes</value>
<value>no</value>
</enum>
<enum name='secure'>
<value>no</value>
</enum>
</loader>
</os>
<cpu>
<mode name='host-passthrough' supported='yes'>
<enum name='hostPassthroughMigratable'>
<value>off</value>
</enum>
</mode>
<mode name='maximum' supported='yes'>
<enum name='maximumMigratable'>
<value>on</value>
<value>off</value>
</enum>
</mode>
<mode name='host-model' supported='no'/>
<mode name='custom' supported='yes'>
<model usable='unknown' vendor='unknown'>la132</model>
<model usable='unknown' vendor='unknown'>la464</model>
<model usable='unknown' vendor='unknown'>max</model>
</mode>
</cpu>
<memoryBacking supported='yes'>
<enum name='sourceType'>
<value>file</value>
<value>anonymous</value>
<value>memfd</value>
</enum>
</memoryBacking>
<devices>
<disk supported='yes'>
<enum name='diskDevice'>
<value>disk</value>
<value>cdrom</value>
<value>floppy</value>
<value>lun</value>
</enum>
<enum name='bus'>
<value>fdc</value>
<value>scsi</value>
<value>virtio</value>
<value>usb</value>
<value>sata</value>
</enum>
<enum name='model'>
<value>virtio</value>
<value>virtio-transitional</value>
<value>virtio-non-transitional</value>
</enum>
</disk>
<graphics supported='yes'>
<enum name='type'>
<value>sdl</value>
<value>vnc</value>
<value>spice</value>
<value>dbus</value>
</enum>
</graphics>
<video supported='yes'>
<enum name='modelType'>
<value>vga</value>
<value>cirrus</value>
<value>virtio</value>
<value>none</value>
<value>bochs</value>
<value>ramfb</value>
</enum>
</video>
<hostdev supported='yes'>
<enum name='mode'>
<value>subsystem</value>
</enum>
<enum name='startupPolicy'>
<value>default</value>
<value>mandatory</value>
<value>requisite</value>
<value>optional</value>
</enum>
<enum name='subsysType'>
<value>usb</value>
<value>pci</value>
<value>scsi</value>
</enum>
<enum name='capsType'/>
<enum name='pciBackend'>
<value>default</value>
<value>vfio</value>
</enum>
</hostdev>
<rng supported='yes'>
<enum name='model'>
<value>virtio</value>
<value>virtio-transitional</value>
<value>virtio-non-transitional</value>
</enum>
<enum name='backendModel'>
<value>random</value>
<value>egd</value>
<value>builtin</value>
</enum>
</rng>
<filesystem supported='yes'>
<enum name='driverType'>
<value>path</value>
<value>handle</value>
<value>virtiofs</value>
</enum>
</filesystem>
<tpm supported='no'/>
<redirdev supported='yes'>
<enum name='bus'>
<value>usb</value>
</enum>
</redirdev>
<channel supported='yes'>
<enum name='type'>
<value>pty</value>
<value>unix</value>
<value>spicevmc</value>
</enum>
</channel>
<crypto supported='yes'>
<enum name='model'>
<value>virtio</value>
</enum>
<enum name='type'>
<value>qemu</value>
</enum>
<enum name='backendModel'>
<value>builtin</value>
<value>lkcf</value>
</enum>
</crypto>
</devices>
<features>
<gic supported='no'/>
<vmcoreinfo supported='yes'/>
<genid supported='no'/>
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
</features>
</domainCapabilities>

View File

@ -379,8 +379,8 @@ doTestQemu(const char *inputDir G_GNUC_UNUSED,
VIR_DOMAIN_VIRT_KVM, opaque) < 0) VIR_DOMAIN_VIRT_KVM, opaque) < 0)
ret = -1; ret = -1;
} }
} else if (STRPREFIX(arch, "riscv")) { } else if (STRPREFIX(arch, "riscv") || STRPREFIX(arch, "loongarch64")) {
/* For riscv64 we test two combinations: /* For riscv64 or loongarch64 we test two combinations:
* *
* - KVM with virt machine * - KVM with virt machine
* - TCG with virt machine * - TCG with virt machine

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
<qemuCaps>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<qemuctime>0</qemuctime>
<selfctime>0</selfctime>
<selfvers>0</selfvers>
<flag name='kvm'/>
<flag name='sdl'/>
<flag name='spice'/>
<flag name='hda-duplex'/>
<flag name='ccid-emulated'/>
<flag name='ccid-passthru'/>
<flag name='piix3-usb-uhci'/>
<flag name='piix4-usb-uhci'/>
<flag name='usb-ehci'/>
<flag name='ich9-usb-ehci1'/>
<flag name='pci-ohci'/>
<flag name='usb-redir'/>
<flag name='usb-hub'/>
<flag name='ich9-ahci'/>
<flag name='virtio-blk-pci.scsi'/>
<flag name='scsi-disk.channel'/>
<flag name='scsi-block'/>
<flag name='hda-micro'/>
<flag name='nec-usb-xhci'/>
<flag name='lsi'/>
<flag name='virtio-scsi-pci'/>
<flag name='usb-redir.filter'/>
<flag name='seccomp-sandbox'/>
<flag name='vnc'/>
<flag name='VGA'/>
<flag name='cirrus-vga'/>
<flag name='usb-serial'/>
<flag name='virtio-rng'/>
<flag name='rng-random'/>
<flag name='rng-egd'/>
<flag name='megasas'/>
<flag name='pci-bridge'/>
<flag name='vfio-pci'/>
<flag name='dmi-to-pci-bridge'/>
<flag name='usb-storage'/>
<flag name='ich9-intel-hda'/>
<flag name='usb-kbd'/>
<flag name='usb-audio'/>
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='pci-serial'/>
<flag name='ioh3420'/>
<flag name='x3130-upstream'/>
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
<flag name='virtio-gpu'/>
<flag name='virtio-keyboard'/>
<flag name='virtio-mouse'/>
<flag name='virtio-tablet'/>
<flag name='virtio-input-host'/>
<flag name='virtio-balloon-pci.deflate-on-oom'/>
<flag name='mptsas1068'/>
<flag name='virtio-vga'/>
<flag name='ivshmem-plain'/>
<flag name='ivshmem-doorbell'/>
<flag name='vhost-scsi'/>
<flag name='query-cpu-model-expansion'/>
<flag name='nvdimm'/>
<flag name='pcie-root-port'/>
<flag name='query-cpu-definitions'/>
<flag name='qemu-xhci'/>
<flag name='chardev-reconnect'/>
<flag name='vmcoreinfo'/>
<flag name='pcie-pci-bridge'/>
<flag name='nbd-tls'/>
<flag name='pr-manager-helper'/>
<flag name='screendump_device'/>
<flag name='hda-output'/>
<flag name='vhost-vsock'/>
<flag name='memory-backend-memfd'/>
<flag name='memory-backend-memfd.hugetlb'/>
<flag name='nvdimm.unarmed'/>
<flag name='virtio-pci-non-transitional'/>
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='dbus-vmstate'/>
<flag name='vhost-user-gpu'/>
<flag name='vhost-user-vga'/>
<flag name='incremental-backup'/>
<flag name='ramfb'/>
<flag name='drive-nvme'/>
<flag name='smp-dies'/>
<flag name='rng-builtin'/>
<flag name='vhost-user-fs'/>
<flag name='query-named-block-nodes.flat'/>
<flag name='blockdev-snapshot.allow-write-only-overlay'/>
<flag name='blockdev-reopen'/>
<flag name='fsdev.multidevs'/>
<flag name='pcie-root-port.hotplug'/>
<flag name='aio.io_uring'/>
<flag name='tcg'/>
<flag name='virtio-blk-pci.scsi.default.disabled'/>
<flag name='pvscsi'/>
<flag name='numa.hmat'/>
<flag name='usb-host.hostdevice'/>
<flag name='virtio-balloon.free-page-reporting'/>
<flag name='block-export-add'/>
<flag name='netdev.vhost-vdpa'/>
<flag name='dc390'/>
<flag name='am53c974'/>
<flag name='vhost-user-fs.bootindex'/>
<flag name='vhost-user-blk'/>
<flag name='cpu-max'/>
<flag name='memory-backend-file.x-use-canonical-path-for-ramblock-id'/>
<flag name='migration-param.block-bitmap-mapping'/>
<flag name='vnc-power-control'/>
<flag name='object.qapified'/>
<flag name='rotation-rate'/>
<flag name='compat-deprecated'/>
<flag name='acpi-index'/>
<flag name='input-linux'/>
<flag name='confidential-guest-support'/>
<flag name='set-action'/>
<flag name='virtio-blk.queue-size'/>
<flag name='memory-backend-file.reserve'/>
<flag name='netdev.json'/>
<flag name='query-dirty-rate'/>
<flag name='rbd-encryption'/>
<flag name='sev-guest-kernel-hashes'/>
<flag name='device.json+hotplug'/>
<flag name='calc-dirty-rate'/>
<flag name='dirtyrate-param.mode'/>
<flag name='blockdev.nbd.tls-hostname'/>
<flag name='memory-backend-file.prealloc-threads'/>
<flag name='virtio-iommu-pci'/>
<flag name='virtio-iommu.boot-bypass'/>
<flag name='virtio-net.rss'/>
<flag name='chardev.qemu-vdagent'/>
<flag name='display-dbus'/>
<flag name='iothread.thread-pool-max'/>
<flag name='usb-host.guest-resets-all'/>
<flag name='migration.blocked-reasons'/>
<flag name='query-stats'/>
<flag name='query-stats-schemas'/>
<flag name='thread-context'/>
<flag name='screenshot-format-png'/>
<flag name='netdev.stream'/>
<flag name='virtio-crypto'/>
<flag name='cryptodev-backend-lkcf'/>
<flag name='pvpanic-pci'/>
<flag name='netdev.stream.reconnect'/>
<flag name='virtio-gpu.blob'/>
<flag name='rbd-encryption-layering'/>
<flag name='rbd-encryption-luks-any'/>
<flag name='qcow2-discard-no-unref'/>
<flag name='run-with.async-teardown'/>
<flag name='smp-clusters'/>
<flag name='display-reload'/>
<flag name='usb-mtp'/>
<version>8002000</version>
<microcodeVersion>106300246</microcodeVersion>
<package>v8.2.0</package>
<arch>loongarch64</arch>
<cpu type='kvm' name='la132' typename='la132-loongarch-cpu'/>
<cpu type='kvm' name='la464' typename='la464-loongarch-cpu'/>
<cpu type='kvm' name='max' typename='max-loongarch-cpu'/>
<machine type='kvm' name='virt' maxCpus='256' default='yes' defaultCPU='la464-loongarch-cpu' numaMemSupported='yes' defaultRAMid='loongarch.ram' acpi='yes'/>
<machine type='kvm' name='x-remote' maxCpus='1' acpi='no'/>
<hostCPU type='tcg' model='max' migratability='no'>
<property name='lasx' type='boolean' value='true'/>
<property name='lsx' type='boolean' value='true'/>
</hostCPU>
<cpu type='tcg' name='la132' typename='la132-loongarch-cpu'/>
<cpu type='tcg' name='la464' typename='la464-loongarch-cpu'/>
<cpu type='tcg' name='max' typename='max-loongarch-cpu'/>
<machine type='tcg' name='virt' maxCpus='256' default='yes' defaultCPU='la464-loongarch-cpu' numaMemSupported='yes' defaultRAMid='loongarch.ram' acpi='yes'/>
<machine type='tcg' name='x-remote' maxCpus='1' acpi='no'/>
</qemuCaps>

View File

@ -0,0 +1,28 @@
<capabilities>
<host>
<cpu>
<arch>loongarch64</arch>
</cpu>
<power_management/>
<iommu support='no'/>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='loongarch64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<domain type='qemu'/>
<domain type='kvm'/>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<cpuselection/>
<deviceboot/>
<disksnapshot default='on' toggle='no'/>
<externalSnapshot/>
</features>
</guest>
</capabilities>

View File

@ -0,0 +1,34 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-default-video-type-l \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-default-video-type-l/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-default-video-type-l/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-default-video-type-l/.config \
/usr/bin/qemu-system-loongarch64 \
-name guest=default-video-type-loongarch64-test,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-default-video-type-l/master-key.aes"}' \
-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,acpi=on \
-accel tcg \
-cpu la464 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
-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"}' \
-audiodev '{"id":"audio1","driver":"spice"}' \
-spice port=0,seamless-migration=on \
-device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pci.1","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,45 @@
<domain type='qemu'>
<name>default-video-type-loongarch64-test</name>
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='usb' index='0' model='none'/>
<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>
<graphics type='spice'>
<listen type='none'/>
</graphics>
<audio id='1' type='spice'/>
<video>
<model type='virtio' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</video>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,18 @@
<domain type='qemu'>
<name>default-video-type-loongarch64-test</name>
<uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<controller type='usb' index='0' model='none'/>
<memballoon model='none'/>
<graphics type='spice'/>
</devices>
</domain>

View File

@ -0,0 +1,35 @@
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-loongarch64 \
-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"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/loongarch64/QEMU_EFI.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel tcg \
-cpu la464 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-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 \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,34 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='loongarch64' machine='virt'>hvm</type>
<firmware>
<feature enabled='no' name='enrolled-keys'/>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/loongarch64/QEMU_EFI.fd</loader>
<nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='usb' index='0' model='none'/>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,35 @@
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-loongarch64 \
-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"}' \
-blockdev '{"driver":"file","filename":"/usr/share/edk2/loongarch64/QEMU_EFI.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' \
-machine virt,usb=off,dump-guest-core=off,memory-backend=loongarch.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
-accel tcg \
-cpu la464 \
-m size=1048576k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":1073741824}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
-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 \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,34 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='loongarch64' machine='virt'>hvm</type>
<firmware>
<feature enabled='no' name='enrolled-keys'/>
<feature enabled='no' name='secure-boot'/>
</firmware>
<loader readonly='yes' type='pflash'>/usr/share/edk2/loongarch64/QEMU_EFI.fd</loader>
<nvram template='/usr/share/edk2/loongarch64/QEMU_VARS.fd'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='usb' index='0' model='none'/>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,17 @@
<domain type='qemu'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='loongarch64' machine='virt'>hvm</type>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,43 @@
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-loongarch64 \
-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=loongarch.ram,acpi=off \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.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-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.3","addr":"0x0"}' \
-netdev '{"type":"user","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","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

View File

@ -0,0 +1,72 @@
<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='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='usb' index='0' model='qemu-xhci'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' 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-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' 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='0x01' 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>

View File

@ -0,0 +1,43 @@
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-loongarch64 \
-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=loongarch.ram,acpi=off \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.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-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.3","addr":"0x0"}' \
-netdev '{"type":"user","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","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

View File

@ -0,0 +1,72 @@
<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='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='usb' index='0' model='qemu-xhci'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' 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-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' 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='0x01' 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>

View File

@ -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='loongarch64' machine='virt'>hvm</type>
</os>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</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 loongarch64 -->
</devices>
</domain>

View File

@ -0,0 +1,56 @@
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-loongarch64 \
-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=loongarch.ram,acpi=on \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.ram","size":4294967296}' \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 96bc2754-8842-4714-a45f-3f69e7a9a852 \
-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-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \
-device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' \
-device '{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev '{"type":"user","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-serial chardev:charserial0 \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
-device '{"driver":"usb-kbd","id":"input1","bus":"usb.0","port":"2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 127.0.0.1:0,audiodev=audio1 \
-device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pci.7","addr":"0x0"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,116 @@
<domain type='qemu'>
<name>guest</name>
<uuid>96bc2754-8842-4714-a45f-3f69e7a9a852</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://fedoraproject.org/fedora/29"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' 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-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0xc'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0xd'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0xe'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
</controller>
<controller type='pci' index='8' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='8' port='0xf'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' 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>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='keyboard' bus='usb'/>
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
<audio id='1' type='none'/>
<video>
<model type='virtio' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>

View File

@ -0,0 +1,48 @@
<domain type='qemu'>
<name>guest</name>
<uuid>96bc2754-8842-4714-a45f-3f69e7a9a852</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'>
<libosinfo:os id='http://fedoraproject.org/fedora/29'/>
</libosinfo:libosinfo>
</metadata>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'/>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
<model type='virtio'/>
</interface>
<console type='pty'/>
<channel type='unix'>
<source mode='bind'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='keyboard' bus='usb'/>
<graphics type='vnc' port='-1'/>
<video>
<model type='virtio'/>
</video>
<memballoon model='virtio'/>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
</rng>
</devices>
</domain>

View File

@ -0,0 +1,52 @@
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-loongarch64 \
-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=loongarch.ram,acpi=on \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.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-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
-device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
-device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \
-device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' \
-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev '{"type":"user","id":"hostnet0"}' \
-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-serial chardev:charserial0 \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,102 @@
<domain type='qemu'>
<name>guest</name>
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://fedoraproject.org/fedora/29"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>4</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' 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-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0xc'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0xd'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0xe'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' 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>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<audio id='1' type='none'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>

View File

@ -0,0 +1,42 @@
<domain type='qemu'>
<name>guest</name>
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo='http://libosinfo.org/xmlns/libvirt/domain/1.0'>
<libosinfo:os id='http://fedoraproject.org/fedora/29'/>
</libosinfo:libosinfo>
</metadata>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>4</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'/>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
<model type='virtio'/>
</interface>
<console type='pty'/>
<channel type='unix'>
<source mode='bind'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
<memballoon model='virtio'/>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
</rng>
</devices>
</domain>

View File

@ -0,0 +1,31 @@
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-loongarch64 \
-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=loongarch.ram,acpi=off \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.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 \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,23 @@
<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='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
</devices>
</domain>

View File

@ -0,0 +1,31 @@
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-loongarch64 \
-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=loongarch.ram,acpi=off \
-accel tcg \
-cpu la464 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"loongarch.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 \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -0,0 +1,23 @@
<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='loongarch64' machine='virt'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>la464</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-loongarch64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
</devices>
</domain>

View File

@ -0,0 +1,12 @@
<domain type='qemu'>
<name>guest</name>
<uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
<memory>4194304</memory>
<vcpu>4</vcpu>
<os>
<type arch='loongarch64' machine='virt'>hvm</type>
</os>
<devices>
<emulator>/usr/bin/qemu-system-loongarch64</emulator>
</devices>
</domain>

View File

@ -1249,6 +1249,8 @@ mymain(void)
/* The '-nousb' test case tests machine without a built-in USB controller */ /* The '-nousb' test case tests machine without a built-in USB controller */
DO_TEST_CAPS_ARCH_LATEST("aarch64-nousb-minimal", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-nousb-minimal", "aarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("aarch64-nousb-minimal", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("aarch64-nousb-minimal", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("loongarch64-virt-minimal", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("loongarch64-virt-minimal", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-minimal", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-minimal", "riscv64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("riscv64-virt-minimal", "riscv64"); DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("riscv64-virt-minimal", "riscv64");
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-minimal", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-minimal", "ppc64");
@ -1270,6 +1272,8 @@ mymain(void)
DO_TEST_CAPS_LATEST_ABI_UPDATE("x86_64-q35-default-models"); DO_TEST_CAPS_LATEST_ABI_UPDATE("x86_64-q35-default-models");
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-default-models", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-default-models", "aarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("aarch64-virt-default-models", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("aarch64-virt-default-models", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("loongarch64-virt-default-models", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("loongarch64-virt-default-models", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-default-models", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-default-models", "riscv64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("riscv64-virt-default-models", "riscv64"); DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("riscv64-virt-default-models", "riscv64");
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-default-models", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-default-models", "ppc64");
@ -1437,6 +1441,8 @@ mymain(void)
DO_TEST_CAPS_LATEST("firmware-auto-efi-smm-off"); DO_TEST_CAPS_LATEST("firmware-auto-efi-smm-off");
DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-aarch64", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-aarch64", "aarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("firmware-auto-efi-aarch64", "aarch64"); DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("firmware-auto-efi-aarch64", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-loongarch64", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("firmware-auto-efi-loongarch64", "loongarch64");
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-path"); DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-path");
DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-template"); DO_TEST_CAPS_LATEST("firmware-auto-efi-nvram-template");
DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-nvram-template-nonstandard"); DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-nvram-template-nonstandard");
@ -2433,6 +2439,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("default-video-type-x86_64"); DO_TEST_CAPS_LATEST("default-video-type-x86_64");
DO_TEST_CAPS_ARCH_LATEST("default-video-type-aarch64", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("default-video-type-aarch64", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("default-video-type-loongarch64", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST("default-video-type-ppc64", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("default-video-type-ppc64", "ppc64");
DO_TEST_CAPS_ARCH_LATEST("default-video-type-riscv64", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("default-video-type-riscv64", "riscv64");
DO_TEST_CAPS_ARCH_LATEST("default-video-type-s390x", "s390x"); DO_TEST_CAPS_ARCH_LATEST("default-video-type-s390x", "s390x");
@ -2851,6 +2858,7 @@ mymain(void)
/* Simple headless guests for various architectures */ /* Simple headless guests for various architectures */
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless-mmio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless-mmio", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("loongarch64-virt-headless", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-headless", "ppc64");
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless", "riscv64");
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless-mmio", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-headless-mmio", "riscv64");
@ -2860,6 +2868,7 @@ mymain(void)
/* Simple guests with graphics for various architectures */ /* Simple guests with graphics for various architectures */
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-graphics", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("loongarch64-virt-graphics", "loongarch64");
DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64"); DO_TEST_CAPS_ARCH_LATEST("ppc64-pseries-graphics", "ppc64");
DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64"); DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-graphics", "riscv64");
DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x"); DO_TEST_CAPS_ARCH_LATEST("s390x-ccw-graphics", "s390x");

View File

@ -171,6 +171,14 @@ static virCPUDef cpuRiscv64Data = {
.threads = 1, .threads = 1,
}; };
static virCPUDef cpuLoongArch64Data = {
.type = VIR_CPU_TYPE_HOST,
.arch = VIR_ARCH_LOONGARCH64,
.sockets = 1,
.cores = 4,
.threads = 1,
};
static inline virCPUDef * static inline virCPUDef *
testUtilsHostCpusGetDefForModel(const char *model) testUtilsHostCpusGetDefForModel(const char *model)
{ {
@ -212,6 +220,8 @@ testUtilsHostCpusGetDefForArch(virArch arch)
return virCPUDefCopy(&cpuRiscv64Data); return virCPUDefCopy(&cpuRiscv64Data);
else if (arch == VIR_ARCH_PPC) else if (arch == VIR_ARCH_PPC)
return virCPUDefCopy(&cpuPPCData); return virCPUDefCopy(&cpuPPCData);
else if (arch == VIR_ARCH_LOONGARCH64)
return virCPUDefCopy(&cpuLoongArch64Data);
return NULL; return NULL;
} }