From patchwork Mon Jul 10 12:31:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 701013 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5148528wrs; Mon, 10 Jul 2023 05:35:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdvhvNecvVgLawoOrZmVC3v4oquMhoFq7wvmRB6QETCjPg+SK+ZJbrZKErOeCWmbuucUIf X-Received: by 2002:a05:6214:ca5:b0:637:9da3:9193 with SMTP id s5-20020a0562140ca500b006379da39193mr15786366qvs.4.1688992504756; Mon, 10 Jul 2023 05:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688992504; cv=none; d=google.com; s=arc-20160816; b=gVyM92pnnceBvWoD9YuzXMgwtqY7LG5Er1dweAVdYltOkNzrf31YqIYmfiptKD7TGK xm2lbulm29KhGzKRwoDSgs4vb6O4fszEen3WqTJfdP2TM0ywP4fJ5BhuSUI5od6dofX1 RItJATUxOQ1GIRsV+OMBU22wIlLiDS5COuMcOH0F0cezQS+1b3GDNvr+LORGK/brff9+ L6wg4tKXiPg+xvmEXdFzrGbVfIHiq/utus3+L5MBhZi9cX70IZsallPJJG6FHJSBniNB drZ8GDttD1EUlnyWFQahujactO623gzh2Fq2q7qmbquIrjCnI0ri/OpXT1qyB5dssra8 LzNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AladqjV8VmaGmNpvRhRP+HZSi5L51b4X63iQbv0K4tY=; fh=3JNk2TdYUVAl0OhysRS6k1r+g+/51nIE9pNTaw46GUI=; b=ID61SB754gTOnJ3ceYAsV+bcHErjsySbiXBfSRy6rHbWQE4Rod1eSHkAhWctlNAdjW 1TysWh/3exzoOxIVX24abWziQrJWEC8hkOU3bQzlOqT5gmV+onf4vfXrm1wywqK+/CjQ wRnK7ljkfoPrdAqrlBGRIJu53LPT9HeNZS5vuMmtJUY2mdZ7QyPmQZAKuvtyu/I5Z5cC KWNUUf0R7PmjEiK3adGbJcP5nLN1q8lJIjQAyS5jiM5Epz0CzK3hG1adeV4buDyCibGS 4bf0qsHu1KpHoI0fCbiQhmzvIz6o+OxViusdvz+pe0GDu4Mh8tBOj7Je4eEncWMedXPK LaoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Huk0F0+K; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ow31-20020a05620a821f00b0076531887f87si5531910qkn.166.2023.07.10.05.35.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 05:35:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Huk0F0+K; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIq5S-0002rt-Cc; Mon, 10 Jul 2023 08:33:54 -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 1qIq57-0002aP-Os for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:34 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIq55-0004ef-I7 for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:32 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-666edfc50deso2797694b3a.0 for ; Mon, 10 Jul 2023 05:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688992410; x=1691584410; 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=AladqjV8VmaGmNpvRhRP+HZSi5L51b4X63iQbv0K4tY=; b=Huk0F0+K1fm6Gp1VqIhivakjO0ok2s/1fEu+xNuA0VtSWFiDJengkQtQzPzvXuHloz nm67YbzEdZzOWj1Jh7I9oW08Ov+9JMxPWVxkfU1+xvYHKOE1faFdnefs57xAPJiU6Jqa 18gaxE6Agl5qysxTN9qqwIGe+MlwiUwdoPxxBxlMOZL+8kUK+bDThpxlpn4odXSpYiu3 G8kwGRN2A/4qMpSdxYiY4uT7T94k1kqcCrK/dK5RLpFsd7wpd9LlY7sMHWB+yOe9kOdw sv6/tp+Qs0OKutB6HkRpin+Etu6mbBVTcyJRxz1b7waxY9VnZQ5WLfsMsQLcFF4gG6eR yKCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688992410; x=1691584410; 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=AladqjV8VmaGmNpvRhRP+HZSi5L51b4X63iQbv0K4tY=; b=LyW9M3Tk4B8zXhfAvi99Pp+KOlWGBCE4EFIFdd9eAsUYjdFAki6QxM+WKPUEzBlXFm Sv7R2EYDxT3a/91sl4/V6Jmjt4hXogu/1kbzPWmGMe+a8OIu5CmOHfjsckSGUxouwJW8 LyTWDl7OHWTErsFu2KfDhggtvraBbPc5h78gkHGTreqg0cQ73wos7g9M1uuIqzDa2cnQ GAwMIw7QlhpmqWNL7jD84D6mt1axDgFa1YLtNq0XMpxK+YYyoQ/lLp/7b31FeWTmF+2R uqilk7u13GDxqEQj6oq5V/sbUQ2NGtwK7d82KBwTWsdK0B3mw3qgJhMuSpfBVrZKsIUL bLaQ== X-Gm-Message-State: ABy/qLaDe1vBSlk8aqJsmmGeZLBmOINK0ljvVITSHdypDPje1ZuB/ojO 1vNsYUhnPmGKfVc8ODM77JVTgL8CIdBB2Q== X-Received: by 2002:a05:6a20:3d01:b0:125:9d2e:ae1a with SMTP id y1-20020a056a203d0100b001259d2eae1amr22862093pzi.9.1688992409736; Mon, 10 Jul 2023 05:33:29 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id i126-20020a639d84000000b0055b44a901absm181559pgd.70.2023.07.10.05.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 05:33:29 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Alistair Francis Subject: [PULL 20/54] target/riscv: Only unify 'riscv32/64' -> 'riscv' for host cpu in meson Date: Mon, 10 Jul 2023 22:31:31 +1000 Message-Id: <20230710123205.2441106-21-alistair.francis@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230710123205.2441106-1-alistair.francis@wdc.com> References: <20230710123205.2441106-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=alistair23@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé We want to keep the ability to distinct between 32/64-bit host. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-Id: <20230627143235.29947-2-philmd@linaro.org> Signed-off-by: Alistair Francis --- meson.build | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 58413d44a5..657e01069b 100644 --- a/meson.build +++ b/meson.build @@ -55,16 +55,11 @@ qapi_trace_events = [] bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin'] supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] -supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64', +supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64', 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64'] cpu = host_machine.cpu_family() -# Unify riscv* to a single family. -if cpu in ['riscv32', 'riscv64'] - cpu = 'riscv' -endif - target_dirs = config_host['TARGET_DIRS'].split() have_linux_user = false have_bsd_user = false @@ -99,6 +94,8 @@ elif cpu == 'x86' host_arch = 'i386' elif cpu == 'mips64' host_arch = 'mips' +elif cpu in ['riscv32', 'riscv64'] + host_arch = 'riscv' else host_arch = cpu endif @@ -113,7 +110,7 @@ elif cpu in ['ppc', 'ppc64'] kvm_targets = ['ppc-softmmu', 'ppc64-softmmu'] elif cpu in ['mips', 'mips64'] kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu'] -elif cpu in ['riscv'] +elif cpu in ['riscv32', 'riscv64'] kvm_targets = ['riscv32-softmmu', 'riscv64-softmmu'] else kvm_targets = [] From patchwork Mon Jul 10 12:31:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 701014 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5151389wrs; Mon, 10 Jul 2023 05:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEAUQp00HQaNA+8H3mOhRbsfLuk0xDHFWlwxvKKnV6R0R1+U50tHLAwVD+O3mxeZO2Wyi7j X-Received: by 2002:a05:622a:28e:b0:403:b10c:8365 with SMTP id z14-20020a05622a028e00b00403b10c8365mr2478988qtw.62.1688992856137; Mon, 10 Jul 2023 05:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688992856; cv=none; d=google.com; s=arc-20160816; b=PgLu09a1XkvyEsnOGb2i0qiRK0sDncZbrKXzCJN8z49ARUA98BZYSbZ0xn3zkNS+po 0MGFV9PFfeesRTKHR4Qsovuxi0sWbEGag5eNyECvxOViomrLKbnwGFjZtfzzNbop8eU8 fPA8XLbooHA4MjoM46FcK0zGEIe+lPgL1A4hX23yBgJwDJ32KngL4lRaebXgdjVwUODy 6DN4P+QpARR0fg1tINpdorwd/bZGwRWLYz7tXxBF/xK0lxTM/24gLDf6iRl0VnbNiHfh 1YmjfAh0PmFfKBLTEF5q2aGwj1ROhkO3fHIdW408U30TyRl3fQu9s8mDxQvdxRNEWmSW /YQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/BxT6mZSvReQNnn/TdB/plDM9sBVaU+QVWT9sBu1Rsc=; fh=3JNk2TdYUVAl0OhysRS6k1r+g+/51nIE9pNTaw46GUI=; b=nq0kwTk8x5o+UtrEM4TKD2ajDIbmf8b1DNeD/BZAit4juZvaS6LJ99IhLQrpzSRK7Z R+TutCwM6g+6qnyFkrttdhMJI8PRiMnirAQQ75RNQBsbw5fM3sqgGD2rzBsz3fvC0Skd C2P1cdJzvzk61e9Tf6dRWQ+M9IhhPTbw760G8ETlrRZRLS4Z7EnB7g7lXCS/rK1C4WvP s4geiCowZ5I8TtSsBIYWN34y4eblK6M0pMMlFGzNab0d4qTmfMu7l5BK6bv3Nctudhtr CHXVZV/mKN1CJyVlcLwUjPOnYsr/9sV7Wm5jVGSBQDDIaRx2QRSMwRdeDgDgCrPK3GJC 9bUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dO848v0G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f18-20020a05622a105200b00403aa4949e4si1358775qte.547.2023.07.10.05.40.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 05:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=dO848v0G; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIq5V-000356-OJ; Mon, 10 Jul 2023 08:33:57 -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 1qIq5H-0002kN-Dn for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:45 -0400 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIq58-0004fb-TC for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:43 -0400 Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-392116ae103so3397168b6e.0 for ; Mon, 10 Jul 2023 05:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688992413; x=1691584413; 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=/BxT6mZSvReQNnn/TdB/plDM9sBVaU+QVWT9sBu1Rsc=; b=dO848v0GGSCJhdOcATFRONoT9VPkD+4FlVoBgBJEHSpEO3GiLs/ouAIuTglRrx1bXl YKwO5egJgKNUIjV6CoiZaYezLUgTZAnbRo/MSMv9iuqMiWCJIVcaeC/4Tlm9y8jB7TF7 xZxJdF9OzpH5GUysVbARCSNW5hfgyjRjynuLX9KW8p/C/PWNGcc771kOAoEP94k1IGUX JOE/sjAuQ5UMANZmKquKtYXh8kLtHBw5cG4TIZCuO25Fv7d/28XiIyDTqmBj8Puzt3mc cnsluOyF1DqLAfhIQE3Q8E9KFhkGiJl5uqUjYzFLu7IjNqeTfsE2jlQEema+VxP800eF YdYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688992413; x=1691584413; 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=/BxT6mZSvReQNnn/TdB/plDM9sBVaU+QVWT9sBu1Rsc=; b=ehhdyPLFMp9NRDyI33FKGw+zFQeCDJuP1FqTmeP8yUmuueazGFcaoothfAjl7+zM7r FLpjPao3bs/8Vc7kt/KptZHZRiO01zt7f0f1dkkt1quV6m1XkiE2/aKKT1wmeYMPGH4h A0F5SKjv7gv4aSGLIXIsyVbrTIaQMld7QwU9clmfSlhnVMoDSbH6DOzqwWaIai5Ns93v 5Porv43t8vryoqv1nIjBH8IQpIgy/COIQ4oA/vRdoATd4jERjvDI4+qGiQuAbEGtCftP rdc9eGE4WDbwA7yJ4d+rSCgO3/aqh7CtdIE2WhKHADOTvEMwM5If7oHQzP4/NqEagXXT Yipw== X-Gm-Message-State: ABy/qLb0HCoUr23eXWyyyyaPoVoIBA8wYPpSvvJsxkTG2QB5NRmdfn2d 7T1wcQoxkFSkfdExGo10XKZ3eYko7gA3HA== X-Received: by 2002:a05:6808:1a97:b0:3a3:6331:fd6f with SMTP id bm23-20020a0568081a9700b003a36331fd6fmr8698567oib.40.1688992412945; Mon, 10 Jul 2023 05:33:32 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id i126-20020a639d84000000b0055b44a901absm181559pgd.70.2023.07.10.05.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 05:33:32 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Alistair Francis Subject: [PULL 21/54] target/riscv: Only build KVM guest with same wordsize as host Date: Mon, 10 Jul 2023 22:31:32 +1000 Message-Id: <20230710123205.2441106-22-alistair.francis@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230710123205.2441106-1-alistair.francis@wdc.com> References: <20230710123205.2441106-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22d; envelope-from=alistair23@gmail.com; helo=mail-oi1-x22d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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/CAAhSdy2JeRHeeoEc1XKQhPO3aDz4YKeyQsPT4S8yKJcYTA+AiQ@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-Id: <20230627143235.29947-3-philmd@linaro.org> Signed-off-by: Alistair Francis --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 657e01069b..1ed47c779d 100644 --- a/meson.build +++ b/meson.build @@ -110,8 +110,10 @@ elif cpu in ['ppc', 'ppc64'] kvm_targets = ['ppc-softmmu', 'ppc64-softmmu'] elif cpu in ['mips', 'mips64'] kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu'] -elif cpu in ['riscv32', 'riscv64'] - kvm_targets = ['riscv32-softmmu', 'riscv64-softmmu'] +elif cpu in ['riscv32'] + kvm_targets = ['riscv32-softmmu'] +elif cpu in ['riscv64'] + kvm_targets = ['riscv64-softmmu'] else kvm_targets = [] endif From patchwork Mon Jul 10 12:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 701015 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5151392wrs; Mon, 10 Jul 2023 05:40:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGMOtsQH7jrJOOBRghB3xBdTKcIepfATTqIZJAG0FoqeB4XziQjk7gp0/JbN8D73kJuWizL X-Received: by 2002:a05:6214:21a8:b0:637:b20d:899d with SMTP id t8-20020a05621421a800b00637b20d899dmr11437164qvc.10.1688992856304; Mon, 10 Jul 2023 05:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688992856; cv=none; d=google.com; s=arc-20160816; b=gBmOCHtfAyKy3fwQLcFzX2PfZ2M/B1eQkSNPYAtKkoL6NT54LbpL+8wonsWmNvpw7I 5XNSkLAPY79RU9tMw08ftv2kTAKfFviBG3Vyq7Ad3z56seVi3guLAA1hFjBHp3i2i3fy KM59fIWnhzw0KU941tYokD41Od/SP4+k4Vx2Nnh4+/xA6CxzGixgZbMOpE24T2wNvssX GdTVnRuX6lX1v3tw6/rfFvxypgl6kFQfVWmagXMtPnTExKNu7bZq1ChJfrJg3ahuHznC Mj4NzNZHXesHNpnogg/Sy6TumkkM8WPuaydK2s5D9KQv/1OPhH628KhUdS5Qm/kKhqJd hLUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wXe+2KFOeGwtoQqJS3myvFCpkWAdqzvjnCRCxb1hkgM=; fh=1/abGiKhfZB2JZ1Da7zxPWW6NGDGKtVovUD3c7+N5DI=; b=yFU1WsTbZovQ08PzcRR0o5HKge8kkCVpdr+xS8W4GgrsArfVfF/tJQX+63a+gLGnHc UudcLYEiPaxQXzM9vu44diD2uPu8ZSwY1yXYLHW0uUWojgdInp1Vu44EwxztKC5lYhkc dMaJF55yYNabytSXIUUPCLaN//7v2lc7AD8KS3ufAzzo0XeU8XHOoHwCmwkjRAR6+X8i XTv7Pxr2nRz4/ZOWlYqtjfX5/rWOQhAK4RPBIdtQ50FxIVicrvsGjth4f7O7XxsFYirM pNd1+YbxoJ3rCOc5RXMEfWc0JVMjQOy8LPusct7dj/dOukHULHsptQFxnGW+2hEP5JZG FQgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=E1VHk0zs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p6-20020a0cf546000000b0063751b56c18si5437070qvm.533.2023.07.10.05.40.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 05:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=E1VHk0zs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qIq5V-000348-Ik; Mon, 10 Jul 2023 08:33:57 -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 1qIq5I-0002kP-6W for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:46 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIq5G-0004ie-E7 for qemu-devel@nongnu.org; Mon, 10 Jul 2023 08:33:43 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-666edfc50deso2797803b3a.0 for ; Mon, 10 Jul 2023 05:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688992419; x=1691584419; 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=wXe+2KFOeGwtoQqJS3myvFCpkWAdqzvjnCRCxb1hkgM=; b=E1VHk0zsk/FZc9qJGUdDEMrR8aBPoWTHLeyc9fTB1KkJfR/CehsgIf+iKSZKEghV3K r8miGqpzL8/AMj4KGtHLADjGI7IqLUNyC/830JmwDvRNFEyuiZTxanAooi/GVNu/LnGt O/KU9V4R3uklKFpt9Pxmr6RsxVXc9V6xwdyySoyOPUyL8mNiwf8qGMSBojX4D2XS02fa 1dCQFsXFVCxZ3UcpqeFWadzgz+DJCx3N3M24aF2lduF4z4/bQOpLktnuGJw7Uc6kgHFt NetaZtVXtMuMP7Qs5oL6o99YdQ+ikO97LTLT9vKCLWlTj1baJDeV/DVdTEbajkGMIY7G 04zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688992419; x=1691584419; 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=wXe+2KFOeGwtoQqJS3myvFCpkWAdqzvjnCRCxb1hkgM=; b=bNV4Z+b6NZdR4q5kkWxJMqWFRPyiGz/s2GYMrXxw2jRHWT/i37RL1v5CqpvgOFF/RO IQY+F70T1jBtZQc1iup7dJQOrF+wYlnaAKh5GK380XjbrUpOAyuZOh6M47SRpF5lJzCd wkrYWOEp/Mbi0FzMGfu3+Ea27qesXAort2VSOXhCdM6quW40E4oppwh0+g3bqU2Cw1J7 xUFhN7z/26ywP2RUgCRsJ0xrKhwkqdhTnNFAzxwOZBviXzaUnFKgSmfMzp99QKvI+JJu tJT1TWJRkXL5OvyVTbDGMuP1aXtWSKBat7abadIERJhhOHdPW7M80uqzBpuMA5vTKI4t lhOA== X-Gm-Message-State: ABy/qLYai668KLKccp3vmd8nESzrSWpmq0MeaQ1VfCemvdP8SQSbN/24 qE+cuQwpfi/Om9gN1qqwx9+Sn6/4uOM16Q== X-Received: by 2002:a05:6a20:4325:b0:117:3c00:77ea with SMTP id h37-20020a056a20432500b001173c0077eamr18849681pzk.0.1688992419287; Mon, 10 Jul 2023 05:33:39 -0700 (PDT) Received: from toolbox.alistair23.me (2403-580b-97e8-0-321-6fb2-58f1-a1b1.ip6.aussiebb.net. [2403:580b:97e8:0:321:6fb2:58f1:a1b1]) by smtp.gmail.com with ESMTPSA id i126-20020a639d84000000b0055b44a901absm181559pgd.70.2023.07.10.05.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jul 2023 05:33:38 -0700 (PDT) From: Alistair Francis X-Google-Original-From: Alistair Francis To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 23/54] hw/riscv/virt: Restrict ACLINT to TCG Date: Mon, 10 Jul 2023 22:31:34 +1000 Message-Id: <20230710123205.2441106-24-alistair.francis@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230710123205.2441106-1-alistair.francis@wdc.com> References: <20230710123205.2441106-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=alistair23@gmail.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé The Advanced Core Local Interruptor (ACLINT) device can only be used with TCG. Check for TCG enabled instead of KVM being not. Only add the property when TCG is used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Message-Id: <20230629121103.87733-3-philmd@linaro.org> Signed-off-by: Alistair Francis --- docs/system/riscv/virt.rst | 1 + hw/riscv/virt.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/system/riscv/virt.rst b/docs/system/riscv/virt.rst index b33f45e5b3..f9a2eac544 100644 --- a/docs/system/riscv/virt.rst +++ b/docs/system/riscv/virt.rst @@ -93,6 +93,7 @@ The following machine-specific options are supported: When this option is "on", ACLINT devices will be emulated instead of SiFive CLINT. When not specified, this option is assumed to be "off". + This option is restricted to the TCG accelerator. - aia=[none|aplic|aplic-imsic] diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 68ccd0bde1..cdb88a1529 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -44,6 +44,7 @@ #include "chardev/char.h" #include "sysemu/device_tree.h" #include "sysemu/sysemu.h" +#include "sysemu/tcg.h" #include "sysemu/kvm.h" #include "sysemu/tpm.h" #include "hw/pci/pci.h" @@ -776,7 +777,7 @@ static void create_fdt_sockets(RISCVVirtState *s, const MemMapEntry *memmap, g_free(clust_name); - if (!kvm_enabled()) { + if (tcg_enabled()) { if (s->have_aclint) { create_fdt_socket_aclint(s, memmap, socket, &intc_phandles[phandle_pos]); @@ -1370,7 +1371,7 @@ static void virt_machine_init(MachineState *machine) hart_count, &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->soc[i]), &error_fatal); - if (!kvm_enabled()) { + if (tcg_enabled()) { if (s->have_aclint) { if (s->aia_type == VIRT_AIA_TYPE_APLIC_IMSIC) { /* Per-socket ACLINT MTIMER */ @@ -1682,12 +1683,13 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); #endif - object_class_property_add_bool(oc, "aclint", virt_get_aclint, - virt_set_aclint); - object_class_property_set_description(oc, "aclint", - "Set on/off to enable/disable " - "emulating ACLINT devices"); - + if (tcg_enabled()) { + object_class_property_add_bool(oc, "aclint", virt_get_aclint, + virt_set_aclint); + object_class_property_set_description(oc, "aclint", + "Set on/off to enable/disable " + "emulating ACLINT devices"); + } object_class_property_add_str(oc, "aia", virt_get_aia, virt_set_aia); object_class_property_set_description(oc, "aia",