[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 7/9] qemu: assign addresses to virtio devices on RISC-V



Signed-off-by: Lubomir Rintel <lkundrak v3 sk>
---
 src/qemu/qemu_domain_address.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 317f280f92..29a1def24c 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -485,11 +485,27 @@ qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
 }
 
 
+static void
+qemuDomainAssignRISCVVirtioMMIOAddresses(virDomainDefPtr def,
+                                         virQEMUCapsPtr qemuCaps)
+{
+    if (!qemuDomainIsRISCVVirt(def))
+        return;
+
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
+        qemuDomainPrimeVirtioDeviceAddresses(def,
+                                             VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO);
+    }
+}
+
+
 static void
 qemuDomainAssignVirtioMMIOAddresses(virDomainDefPtr def,
                                     virQEMUCapsPtr qemuCaps)
 {
     qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
+
+    qemuDomainAssignRISCVVirtioMMIOAddresses(def, qemuCaps);
 }
 
 
-- 
2.17.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]