From nobody Mon Feb 9 20:59:24 2026 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 1534929388945300.159822135612; Wed, 22 Aug 2018 02:16:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13A053086248; Wed, 22 Aug 2018 09:16:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B340B308BDA9; Wed, 22 Aug 2018 09:16:26 +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 737484A460; Wed, 22 Aug 2018 09:16:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7M9Fpgd031039 for ; Wed, 22 Aug 2018 05:15:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 126487DEED; Wed, 22 Aug 2018 09:15:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5DB87DEE6; Wed, 22 Aug 2018 09:15:47 +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 D87D530820E9; Wed, 22 Aug 2018 09:15:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 05A5AB5943; Wed, 22 Aug 2018 11:15:44 +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 Iqi1vlnLPLxv; Wed, 22 Aug 2018 11:15:34 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 22F1DB592A; Wed, 22 Aug 2018 11:15:34 +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 ewbQ2xPcSYvf; Wed, 22 Aug 2018 11:15:32 +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 50F3BB5935; Wed, 22 Aug 2018 11:15:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk From: Lubomir Rintel To: libvir-list@redhat.com Date: Wed, 22 Aug 2018 11:15:22 +0200 Message-Id: <20180822091528.99183-4-lkundrak@v3.sk> In-Reply-To: <20180822091528.99183-1-lkundrak@v3.sk> References: <20180822091528.99183-1-lkundrak@v3.sk> X-Greylist: Sender passed SPF test, ACL 232 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 22 Aug 2018 09:15:46 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 22 Aug 2018 09:15:46 +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.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Lubomir Rintel , Andrea Bolognani Subject: [libvirt] [PATCH v3 3/9] util: add RISC-V architectures 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.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Wed, 22 Aug 2018 09:16:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Lubomir Rintel Reviewed-by: Andrea Bolognani --- docs/schemas/basictypes.rng | 2 ++ src/qemu/qemu_domain.c | 2 ++ src/util/virarch.c | 5 ++++- src/util/virarch.h | 8 +++++++- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 1a18cd31b1..14a3670e5c 100644 --- a/docs/schemas/basictypes.rng +++ b/docs/schemas/basictypes.rng @@ -398,6 +398,8 @@ ppc64 ppc64le ppcemb + riscv32 + riscv64 s390 s390x sh4 diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index fcb37d45e6..60b4a9b412 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3249,6 +3249,8 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def, case VIR_ARCH_OR32: case VIR_ARCH_PARISC: case VIR_ARCH_PARISC64: + case VIR_ARCH_RISCV32: + case VIR_ARCH_RISCV64: case VIR_ARCH_PPCLE: case VIR_ARCH_UNICORE32: case VIR_ARCH_XTENSA: diff --git a/src/util/virarch.c b/src/util/virarch.c index be48bcfb89..3f5efde8e2 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -65,15 +65,18 @@ static const struct virArchData { { "ppc64le", 64, VIR_ARCH_LITTLE_ENDIAN }, { "ppcemb", 32, VIR_ARCH_BIG_ENDIAN }, =20 + { "riscv32", 32, VIR_ARCH_LITTLE_ENDIAN }, + { "riscv64", 64, VIR_ARCH_LITTLE_ENDIAN }, { "s390", 32, VIR_ARCH_BIG_ENDIAN }, { "s390x", 64, VIR_ARCH_BIG_ENDIAN }, { "sh4", 32, VIR_ARCH_LITTLE_ENDIAN }, + { "sh4eb", 64, VIR_ARCH_BIG_ENDIAN }, { "sparc", 32, VIR_ARCH_BIG_ENDIAN }, - { "sparc64", 64, VIR_ARCH_BIG_ENDIAN }, { "unicore32", 32, VIR_ARCH_LITTLE_ENDIAN }, { "x86_64", 64, VIR_ARCH_LITTLE_ENDIAN }, + { "xtensa", 32, VIR_ARCH_LITTLE_ENDIAN }, { "xtensaeb", 32, VIR_ARCH_BIG_ENDIAN }, }; diff --git a/src/util/virarch.h b/src/util/virarch.h index af5ff83528..a52de7f52c 100644 --- a/src/util/virarch.h +++ b/src/util/virarch.h @@ -55,15 +55,18 @@ typedef enum { VIR_ARCH_PPC64LE, /* PowerPC 64 LE http://en.wikipedia.org/wi= ki/PowerPC */ VIR_ARCH_PPCEMB, /* PowerPC 32 BE http://en.wikipedia.org/wi= ki/PowerPC */ =20 + VIR_ARCH_RISCV32, /* RISC-V 64 LE http://en.wikipedia.org/wi= ki/RISC-V */ + VIR_ARCH_RISCV64, /* RISC-V 32 BE http://en.wikipedia.org/wi= ki/RISC-V */ VIR_ARCH_S390, /* S390 32 BE http://en.wikipedia.org/wi= ki/S390 */ VIR_ARCH_S390X, /* S390 64 BE http://en.wikipedia.org/wi= ki/S390x */ VIR_ARCH_SH4, /* SuperH4 32 LE http://en.wikipedia.org/wi= ki/SuperH */ + VIR_ARCH_SH4EB, /* SuperH4 32 BE http://en.wikipedia.org/wi= ki/SuperH */ VIR_ARCH_SPARC, /* Sparc 32 BE http://en.wikipedia.org/wi= ki/Sparc */ - VIR_ARCH_SPARC64, /* Sparc 64 BE http://en.wikipedia.org/wi= ki/Sparc */ VIR_ARCH_UNICORE32, /* UniCore 32 LE http://en.wikipedia.org/wi= ki/Unicore*/ VIR_ARCH_X86_64, /* x86 64 LE http://en.wikipedia.org/wi= ki/X86 */ + VIR_ARCH_XTENSA, /* XTensa 32 LE http://en.wikipedia.org/wi= ki/Xtensa#Processor_Cores */ VIR_ARCH_XTENSAEB, /* XTensa 32 BE http://en.wikipedia.org/wi= ki/Xtensa#Processor_Cores */ =20 @@ -87,6 +90,9 @@ typedef enum { (arch) =3D=3D VIR_ARCH_ARMV7B ||\ (arch) =3D=3D VIR_ARCH_AARCH64) =20 +# define ARCH_IS_RISCV(arch) ((arch) =3D=3D VIR_ARCH_RISCV32 ||\ + (arch) =3D=3D VIR_ARCH_RISCV64) + # define ARCH_IS_S390(arch) ((arch) =3D=3D VIR_ARCH_S390 ||\ (arch) =3D=3D VIR_ARCH_S390X) =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list