[virt-tools-list] [virt-manager PATCH 1/9] tests: Add RISC-V support
Andrea Bolognani
abologna at redhat.com
Thu Apr 4 10:49:42 UTC 2019
RISC-V doesn't support KVM yet, so we are forced to use TCG
on x86 until that's working.
Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
.../capabilities-xml/qemu-riscv64-domcaps.xml | 91 ++++++++++++++
tests/capabilities-xml/qemu-riscv64.xml | 113 ++++++++++++++++++
tests/clitest.py | 1 +
tests/utils.py | 2 +
4 files changed, 207 insertions(+)
create mode 100644 tests/capabilities-xml/qemu-riscv64-domcaps.xml
create mode 100644 tests/capabilities-xml/qemu-riscv64.xml
diff --git a/tests/capabilities-xml/qemu-riscv64-domcaps.xml b/tests/capabilities-xml/qemu-riscv64-domcaps.xml
new file mode 100644
index 00000000..6b1a7498
--- /dev/null
+++ b/tests/capabilities-xml/qemu-riscv64-domcaps.xml
@@ -0,0 +1,91 @@
+<domainCapabilities>
+
+ <!-- Generated on Fedora 29 with QEMU ~4.0.0 and libvirt ~5.3.0 -->
+
+ <path>/usr/bin/qemu-system-riscv64</path>
+ <domain>qemu</domain>
+ <machine>spike_v1.10</machine>
+ <arch>riscv64</arch>
+ <vcpu max='1'/>
+ <iothreads supported='yes'/>
+ <os supported='yes'>
+ <loader supported='yes'>
+ <value>/usr/share/OVMF/OVMF_CODE.fd</value>
+ <value>/usr/share/OVMF/OVMF_CODE.secboot.fd</value>
+ <enum name='type'>
+ <value>rom</value>
+ <value>pflash</value>
+ </enum>
+ <enum name='readonly'>
+ <value>yes</value>
+ <value>no</value>
+ </enum>
+ </loader>
+ </os>
+ <cpu>
+ <mode name='host-passthrough' supported='no'/>
+ <mode name='host-model' supported='no'/>
+ <mode name='custom' supported='no'/>
+ </cpu>
+ <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>
+ </enum>
+ </graphics>
+ <video supported='yes'>
+ <enum name='modelType'>
+ <value>vga</value>
+ <value>cirrus</value>
+ <value>vmvga</value>
+ <value>virtio</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'/>
+ </hostdev>
+ </devices>
+ <features>
+ <gic supported='no'/>
+ <vmcoreinfo supported='no'/>
+ <genid supported='no'/>
+ <sev supported='no'/>
+ </features>
+</domainCapabilities>
diff --git a/tests/capabilities-xml/qemu-riscv64.xml b/tests/capabilities-xml/qemu-riscv64.xml
new file mode 100644
index 00000000..c8b69f15
--- /dev/null
+++ b/tests/capabilities-xml/qemu-riscv64.xml
@@ -0,0 +1,113 @@
+<capabilities>
+
+ <!-- Generated on Fedora 29 with QEMU ~4.0.0 and libvirt ~5.3.0 -->
+
+ <host>
+ <uuid>2b763ba8-82a1-44dd-a197-9132a8d520a2</uuid>
+ <cpu>
+ <arch>x86_64</arch>
+ <model>Skylake-Client-IBRS</model>
+ <vendor>Intel</vendor>
+ <microcode version='150'/>
+ <topology sockets='1' cores='4' threads='2'/>
+ <feature name='ds'/>
+ <feature name='acpi'/>
+ <feature name='ss'/>
+ <feature name='ht'/>
+ <feature name='tm'/>
+ <feature name='pbe'/>
+ <feature name='dtes64'/>
+ <feature name='monitor'/>
+ <feature name='ds_cpl'/>
+ <feature name='vmx'/>
+ <feature name='smx'/>
+ <feature name='est'/>
+ <feature name='tm2'/>
+ <feature name='xtpr'/>
+ <feature name='pdcm'/>
+ <feature name='osxsave'/>
+ <feature name='tsc_adjust'/>
+ <feature name='clflushopt'/>
+ <feature name='intel-pt'/>
+ <feature name='stibp'/>
+ <feature name='ssbd'/>
+ <feature name='xsaves'/>
+ <feature name='pdpe1gb'/>
+ <feature name='invtsc'/>
+ <pages unit='KiB' size='4'/>
+ <pages unit='KiB' size='2048'/>
+ <pages unit='KiB' size='1048576'/>
+ </cpu>
+ <power_management>
+ <suspend_mem/>
+ <suspend_disk/>
+ <suspend_hybrid/>
+ </power_management>
+ <iommu support='no'/>
+ <migration_features>
+ <live/>
+ <uri_transports>
+ <uri_transport>tcp</uri_transport>
+ <uri_transport>rdma</uri_transport>
+ </uri_transports>
+ </migration_features>
+ <topology>
+ <cells num='1'>
+ <cell id='0'>
+ <memory unit='KiB'>16298176</memory>
+ <pages unit='KiB' size='4'>4074544</pages>
+ <pages unit='KiB' size='2048'>0</pages>
+ <pages unit='KiB' size='1048576'>0</pages>
+ <distances>
+ <sibling id='0' value='10'/>
+ </distances>
+ <cpus num='8'>
+ <cpu id='0' socket_id='0' core_id='0' siblings='0,4'/>
+ <cpu id='1' socket_id='0' core_id='1' siblings='1,5'/>
+ <cpu id='2' socket_id='0' core_id='2' siblings='2,6'/>
+ <cpu id='3' socket_id='0' core_id='3' siblings='3,7'/>
+ <cpu id='4' socket_id='0' core_id='0' siblings='0,4'/>
+ <cpu id='5' socket_id='0' core_id='1' siblings='1,5'/>
+ <cpu id='6' socket_id='0' core_id='2' siblings='2,6'/>
+ <cpu id='7' socket_id='0' core_id='3' siblings='3,7'/>
+ </cpus>
+ </cell>
+ </cells>
+ </topology>
+ <cache>
+ <bank id='0' level='3' type='both' size='8' unit='MiB' cpus='0-7'/>
+ </cache>
+ <secmodel>
+ <model>selinux</model>
+ <doi>0</doi>
+ <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
+ <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
+ </secmodel>
+ <secmodel>
+ <model>dac</model>
+ <doi>0</doi>
+ <baselabel type='kvm'>+0:+0</baselabel>
+ <baselabel type='qemu'>+0:+0</baselabel>
+ </secmodel>
+ </host>
+
+ <guest>
+ <os_type>hvm</os_type>
+ <arch name='riscv64'>
+ <wordsize>64</wordsize>
+ <emulator>/usr/bin/qemu-system-riscv64</emulator>
+ <machine maxCpus='1'>spike_v1.10</machine>
+ <machine maxCpus='8'>virt</machine>
+ <machine maxCpus='1'>sifive_u</machine>
+ <machine maxCpus='1'>sifive_e</machine>
+ <machine maxCpus='1'>spike_v1.9.1</machine>
+ <domain type='qemu'/>
+ </arch>
+ <features>
+ <cpuselection/>
+ <deviceboot/>
+ <disksnapshot default='on' toggle='no'/>
+ </features>
+ </guest>
+
+</capabilities>
diff --git a/tests/clitest.py b/tests/clitest.py
index d3bd6044..41f10cd6 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -65,6 +65,7 @@ test_files = {
'URI-KVM-AARCH64': utils.URIs.kvm_aarch64,
'URI-KVM-PPC64LE': utils.URIs.kvm_ppc64le,
'URI-KVM-S390X': utils.URIs.kvm_s390x,
+ 'URI-QEMU-RISCV64': utils.URIs.qemu_riscv64,
'NEWIMG1': "/dev/default-pool/new1.img",
'NEWIMG2': "/dev/default-pool/new2.img",
diff --git a/tests/utils.py b/tests/utils.py
index 14b9d75c..f8d5b2ad 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -74,6 +74,7 @@ class _URIs(object):
_uri_kvm = _uri_qemu + _domcaps("kvm-x86_64-domcaps.xml")
_uri_kvm_q35 = _uri_qemu + _domcaps("kvm-x86_64-domcaps-q35.xml")
_uri_kvm_aarch64 = _uri_qemu + _domcaps("kvm-aarch64-domcaps.xml")
+ _uri_qemu_riscv64 = _uri_qemu + _domcaps("qemu-riscv64-domcaps.xml")
self.kvm = _uri_kvm + _caps("kvm-x86_64.xml")
self.kvm_remote = _uri_kvm + _caps("kvm-x86_64.xml") + ",remote"
@@ -88,6 +89,7 @@ class _URIs(object):
self.kvm_ppc64le = _uri_kvm + _caps("kvm-ppc64le.xml")
self.kvm_s390x = _uri_kvm + _caps("kvm-s390x.xml")
self.kvm_s390x_KVMIBM = _uri_kvm + _caps("kvm-s390x-KVMIBM.xml")
+ self.qemu_riscv64 = _uri_qemu_riscv64 + _caps("qemu-riscv64.xml")
--
2.20.1
More information about the virt-tools-list
mailing list