From nobody Fri Jul 4 08:38:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1529008411262519.6149389697838; Thu, 14 Jun 2018 13:33:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0DDC03086241; Thu, 14 Jun 2018 20:33:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACA9FA27C5; Thu, 14 Jun 2018 20:33:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 205891800534; Thu, 14 Jun 2018 20:33:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5EKXJm7008168 for ; Thu, 14 Jun 2018 16:33:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5CB9E30043D4; Thu, 14 Jun 2018 20:33:19 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F78C308BDB9; Thu, 14 Jun 2018 20:33:16 +0000 (UTC) Received: from shell.v3.sk (shell.v3.sk [90.176.6.54]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A71598762A; Thu, 14 Jun 2018 20:33:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 2233BAE5AA; Thu, 14 Jun 2018 22:33:14 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id EyZcixXtgPI8; Thu, 14 Jun 2018 22:32:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id EF6E5AE66B; Thu, 14 Jun 2018 22:32:48 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id npNjUgtcvsZc; Thu, 14 Jun 2018 22:32:46 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id A793CAE65D; Thu, 14 Jun 2018 22:32:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk From: Lubomir Rintel To: libvir-list@redhat.com Date: Thu, 14 Jun 2018 22:32:28 +0200 Message-Id: <20180614203233.3115735-7-lkundrak@v3.sk> In-Reply-To: <20180614203233.3115735-1-lkundrak@v3.sk> References: <20180614203233.3115735-1-lkundrak@v3.sk> X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 14 Jun 2018 20:33:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 14 Jun 2018 20:33:16 +0000 (UTC) for IP:'90.176.6.54' DOMAIN:'shell.v3.sk' HELO:'shell.v3.sk' FROM:'lkundrak@v3.sk' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 90.176.6.54 shell.v3.sk 90.176.6.54 shell.v3.sk X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: Lubomir Rintel , Andrea Bolognani Subject: [libvirt] [PATCH v2 06/11] qemu: assign addresses to virtio devices on RISC-V X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 14 Jun 2018 20:33:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lubomir Rintel --- 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, } =20 =20 +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_TYP= E_VIRTIO_MMIO); + } +} + + /** * qemuDomainDeviceCalculatePCIConnectFlags: * @@ -2940,6 +2957,8 @@ qemuDomainAssignAddresses(virDomainDefPtr def, =20 qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps); =20 + qemuDomainAssignRISCVVirtioMMIOAddresses(def, qemuCaps); + if (qemuDomainAssignPCIAddresses(def, qemuCaps, driver, obj) < 0) return -1; =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list