From nobody Tue Feb 10 15:29:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1687876394; cv=none; d=zohomail.com; s=zohoarc; b=EZOZ51onWEY6SSuYthl28FG9ZjbY/ms/1jlhAn5iW0X0cTyHg2EYc3k1PeZ7hj62zgUysuXwMiiAVUMwNUKmEl00Gqo/CeIbuDGV0GpyCmZPVEClG4dJfQdAmRmkr6L/RducZftEjlyQrVQARRQjXYHjjxULAsgq47COtZw/GHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687876394; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=y72Cvu7+GGKH51wZ4ZTPnItUIyTNc7r63P3IdRE4o+o=; b=IT4ei5ah8VNquTGUaTnjPSKSkM4wYN1AZ5+GouFwg2pt1nKtJTkFCjvQ4DuCAss87Idb2Fn62XJYoYfh3pFrfmV61HNCMRJyFW4kH1qqA5YWPaKCRxw1Q0Ytr7TwVWYcx4Wc6xJl5C3QMoIRqZkH3iASRBrU2QGwSeUTcOjbsSo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687876394706474.90076551587026; Tue, 27 Jun 2023 07:33:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE9kS-00042u-No; Tue, 27 Jun 2023 10:32:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE9kQ-00042E-AG for qemu-devel@nongnu.org; Tue, 27 Jun 2023 10:32:50 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE9kN-0003cG-Sa for qemu-devel@nongnu.org; Tue, 27 Jun 2023 10:32:50 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9922d6f003cso83290466b.0 for ; Tue, 27 Jun 2023 07:32:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id r24-20020a1709067fd800b009890f2c4cf9sm4627699ejs.79.2023.06.27.07.32.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 07:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687876366; x=1690468366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y72Cvu7+GGKH51wZ4ZTPnItUIyTNc7r63P3IdRE4o+o=; b=MztS8j7tLpzm56SqQpg7rc7fo6nwwsdVX1hBIumipRYBDODwklz1pxxzzxrOTaXGuq OJ6WS4isrkZ2jTgrLZ45tuQqE4N/vPiJNlLHRinRgaRRdZ4qMVKCKdrB9+3jHXOmUwXx b5SQSsJZmqNgrSpf6FhzL9lxxpvh4VrqzT84TPxrxKCJk/YdaZKVItCzC8jMf/8LrAca nEzLUfg1ho0ZYrLLWJBLJAk3jzMAmi5F74HF1VWb2viL4OxZjE28dpEnB9OiU+jnP42+ EsxZ0hErStDpZjiX3AywyQqkK0P4TdHvAoPi1wlZKS3r8W6kn1aSymOCC6JDjinBhVdJ aXfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687876366; x=1690468366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y72Cvu7+GGKH51wZ4ZTPnItUIyTNc7r63P3IdRE4o+o=; b=gdtfZJIkyfZWbDgZ28pFeujwAPGt88FcUv1ekfgT0UbcRU9EmjJCd5vLMtkr2uVeMj x6jL8eiNPEppnWd6QSVxKneFYmh+IK1TN4BMw6ulL9josmfjHU3M4Ek2TSnhB7HJRnHY agx/SR8nvmnWsXLiJZFi7gwxpQdRfx+jk0HpM781QsdQgxqyr0ch4w+vJQ4LO6rqVJnP 1eMnafHWdAX7wkhFMPT/KaF3rudPlJQdBLOCkrbQO0zvL069x4wzOSV0xvH9A8sqmlKc R1HTP08pOX/0biLIfI9bphnYURolFiF/VjVPcBZakalR5+xYz2q9UtA93RbfvIWbTzkg WJwA== X-Gm-Message-State: AC+VfDzuA8n0v1oEJ6PXjRrJ3vE4Il6pOdTdZstR4rRgUY7zzvNsx9l0 y0JKTs4SzVgzJFJfSOiwN4ecoXhKaVQjNOS0LfU= X-Google-Smtp-Source: ACHHUZ6i9BHvtFNXhZ3RkKuYWusx/WasaAnWMdOPkSkWknXDKSepYWk+KXa6CY215zaQOMuiOfOiAA== X-Received: by 2002:a17:907:724a:b0:987:16f5:692f with SMTP id ds10-20020a170907724a00b0098716f5692fmr25811436ejc.44.1687876365924; Tue, 27 Jun 2023 07:32:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alistair Francis , Paolo Bonzini , Weiwei Li , Palmer Dabbelt , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Bin Meng , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Daniel Henrique Barboza , Liu Zhiwei , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org Subject: [PATCH 1/2] target/riscv: Only unify 'riscv32/64' -> 'riscv' for host cpu in meson Date: Tue, 27 Jun 2023 16:32:34 +0200 Message-Id: <20230627143235.29947-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627143235.29947-1-philmd@linaro.org> References: <20230627143235.29947-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1687876396814100003 We want to keep the ability to distinct between 32/64-bit host. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- meson.build | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index fc3c14a810..649de244c6 100644 --- a/meson.build +++ b/meson.build @@ -55,16 +55,11 @@ qapi_trace_events =3D [] =20 bsd_oses =3D ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly',= 'darwin'] supported_oses =3D ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', '= sunos', 'linux'] -supported_cpus =3D ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64', +supported_cpus =3D ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', = 'x86_64', 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64'] =20 cpu =3D host_machine.cpu_family() =20 -# Unify riscv* to a single family. -if cpu in ['riscv32', 'riscv64'] - cpu =3D 'riscv' -endif - target_dirs =3D config_host['TARGET_DIRS'].split() have_linux_user =3D false have_bsd_user =3D false @@ -99,6 +94,8 @@ elif cpu =3D=3D 'x86' host_arch =3D 'i386' elif cpu =3D=3D 'mips64' host_arch =3D 'mips' +elif cpu in ['riscv32', 'riscv64'] + host_arch =3D 'riscv' else host_arch =3D cpu endif @@ -113,7 +110,7 @@ elif cpu in ['ppc', 'ppc64'] kvm_targets =3D ['ppc-softmmu', 'ppc64-softmmu'] elif cpu in ['mips', 'mips64'] kvm_targets =3D ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mi= ps64el-softmmu'] -elif cpu in ['riscv'] +elif cpu in ['riscv32', 'riscv64'] kvm_targets =3D ['riscv32-softmmu', 'riscv64-softmmu'] else kvm_targets =3D [] --=20 2.38.1 From nobody Tue Feb 10 15:29:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1687876408; cv=none; d=zohomail.com; s=zohoarc; b=KF3o0J/wXkf9r7Wx15BB/xVKnuTrxuasTy2Xm8vLrSZMeegeJBdpgD+hdHm3p7BvMUXkuaKCaI+bv5LtCRyLi+U3hbvE99Mku/LQBY2HS3PRUqKgmzB+E9tyucOtZNJIRkmgt4eZ+YY6GATZqqmJyf5ID8MaqanRzz9TiEzMDtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687876408; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zZH7thsC3n92/7WslOHqKTBqWIGtsrU49vkIr/rMBeI=; b=Vt3pmKcT+zuDviUmEqxenNYlHqyS4PEnZKLt77JuVhqep/1WD5yH5zRzHZBKfaAzp26LFIXCaEtnQH71QU6weV3l0DHT0USy8wLjoX7MRJ/Ts5Lx+RdHO+r7QcuDOPwWdbvIZIklCJGwABR44rnozvTZrXYHf5U2EfSpAZKcIUk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687876408302463.5140400650041; Tue, 27 Jun 2023 07:33:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qE9kY-000481-Kj; Tue, 27 Jun 2023 10:32:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qE9kW-00043i-UY for qemu-devel@nongnu.org; Tue, 27 Jun 2023 10:32:56 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qE9kU-0003fy-P1 for qemu-devel@nongnu.org; Tue, 27 Jun 2023 10:32:56 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9920b4d8a89so115552066b.3 for ; Tue, 27 Jun 2023 07:32:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.204]) by smtp.gmail.com with ESMTPSA id n1-20020a1709061d0100b0098e1116737csm3915190ejh.24.2023.06.27.07.32.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 27 Jun 2023 07:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687876372; x=1690468372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zZH7thsC3n92/7WslOHqKTBqWIGtsrU49vkIr/rMBeI=; b=UoHa58zSTWPBSIx6vApGCo0OAQ+mQUW/b9EAqRNecCLGs6jqISpaZZuPf7U9FXlTB/ 0c0s3J3tMNUnJ8Tdfnhw+QTIdiiWs6WK4cUPpysDYybjSZnTRnjED9X7zY984KIpWzYj xX1Di6K8kHUUhpHYNIsq/LMc52eq5poT8e7SQiQVw8Iq43x4QqfGGVp2NjXQKtWDjlVC LrPhvm8BxzQE8ifqoMvxw4+1gOLYKFAZVtSAUCgqAL+dkIxbH/yeOxGIVArFiKf2pKel HSnHSGA8mgdM7I8jxGOFQXk24bixKdYbRBVNzJ0SYRT5CapGRdI6c1/D7fouVNxPO0vH q3dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687876372; x=1690468372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zZH7thsC3n92/7WslOHqKTBqWIGtsrU49vkIr/rMBeI=; b=XfM5cDCPYvcI2biz0jGUZ6PRTCSAIYDjrZMeWXW22FdwkeKM3mCOClGoSZIXw+aOAF YkpD2iufe/d61caqk5dWRtWoEYNH3qIl4ixOmKJy8q2LlQjYF74qqGeTwSMqDEK/WgVe kmfx1DCwG9BJpKcyTtb1S31m0VtOPXF3wNkrF5mhENimAeD8MrOcr9K6wMPiWSjP8Efy stOsGxmHL5VwcccVlS2xyERKMNRK1k1FeKweu1e8fv/wa0HcUr1QWfRHtg3G4bcmYrmv 860G40IjAXWUwtsGFJMLkXVeV1+R4HFiozodA3+2XGBxmxZBheRF175Axs+usfhkr5Tx 4V5g== X-Gm-Message-State: AC+VfDwLFZDKiy2Re5tD/I1lzMgd9ofhmkllCguns40mFtAEfah8knYM T4CxK/6UGlE4H6KOFlfduBqwhgzTckmfVRJImc4= X-Google-Smtp-Source: ACHHUZ7A7HzUwbIUXCeSoeL4VSwApVbanU7CI9HLUXoKxMKjvySy9wU7+TO1DpVnoPIGZMuZDvdqmw== X-Received: by 2002:a17:907:7f04:b0:991:f6d0:9bc1 with SMTP id qf4-20020a1709077f0400b00991f6d09bc1mr3527179ejc.66.1687876372145; Tue, 27 Jun 2023 07:32:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alistair Francis , Paolo Bonzini , Weiwei Li , Palmer Dabbelt , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Bin Meng , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Daniel Henrique Barboza , Liu Zhiwei , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-riscv@nongnu.org Subject: [PATCH 2/2] target/riscv: Only build KVM guest with same wordsize as host Date: Tue, 27 Jun 2023 16:32:35 +0200 Message-Id: <20230627143235.29947-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230627143235.29947-1-philmd@linaro.org> References: <20230627143235.29947-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1687876408836100001 Per Anup Patel in [*]: > Currently, we only support running rv64 guest on rv64 host > and rv32 guest on rv32 host. > > In the future, we might support running rv32 guest on rv64 > host but as of now we don't see a strong push for it. Therefore, when only using the KVM accelerator it is pointless to build qemu-system-riscv32 on a rv64 host (or qemu-system-riscv64 on a rv32 host). Restrict meson to only build the correct binary, avoiding to waste ressources building unusable code. [*] https://lore.kernel.org/qemu-devel/CAAhSdy2JeRHeeoEc1XKQhPO3aDz4YKeyQsP= T4S8yKJcYTA+AiQ@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 649de244c6..a3ab614235 100644 --- a/meson.build +++ b/meson.build @@ -110,8 +110,10 @@ elif cpu in ['ppc', 'ppc64'] kvm_targets =3D ['ppc-softmmu', 'ppc64-softmmu'] elif cpu in ['mips', 'mips64'] kvm_targets =3D ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mi= ps64el-softmmu'] -elif cpu in ['riscv32', 'riscv64'] - kvm_targets =3D ['riscv32-softmmu', 'riscv64-softmmu'] +elif cpu in ['riscv32'] + kvm_targets =3D ['riscv32-softmmu'] +elif cpu in ['riscv64'] + kvm_targets =3D ['riscv64-softmmu'] else kvm_targets =3D [] endif --=20 2.38.1