Signed-off-by: Lubomir Rintel <lkundrak(a)v3.sk>
---
src/qemu/qemu_domain_address.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 01cfdbeadf..d3259212f5 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -502,6 +502,23 @@ qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
}
+static void
+qemuDomainAssignRISCVVirtioMMIOAddresses(virDomainDefPtr def,
+ virQEMUCapsPtr qemuCaps)
+{
+ if (!ARCH_IS_RISCV(def->os.arch))
+ return;
+
+ if (STRNEQ(def->os.machine, "virt"))
+ return;
+
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
+ qemuDomainPrimeVirtioDeviceAddresses(def,
+
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO);
+ }
+}
+
+
/**
* qemuDomainDeviceCalculatePCIConnectFlags:
*
@@ -2940,6 +2957,8 @@ qemuDomainAssignAddresses(virDomainDefPtr def,
qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
+ qemuDomainAssignRISCVVirtioMMIOAddresses(def, qemuCaps);
+
if (qemuDomainAssignPCIAddresses(def, qemuCaps, driver, obj) < 0)
return -1;
--
2.17.1