From patchwork Wed Apr 10 09:10:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 13623925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 886CECD129C for ; Wed, 10 Apr 2024 09:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FcydCKnI95qi4XTlWt3FCotUVu5EhO9XHhvsYfwA1yc=; b=UKaqdeR+MoBqlw fgavnzu15DMlEGUFoeKz6O2kfcbr6NvqRDH4c5TqzqmebLGZ/+xmnPdQRXEdAL68oZ12AtRmJ5uke IAn3ZienGr/zg4LXibeiRksM7FA0ESjZsczTdImcvUxsoOyppaWbnDi+ySySYq18R8Lc2FBq5MaGS 5/zplWpOq44ikH75fejUGNnwhUEq6+iI3OwBx70XkyDD84DFHfdKS9na+btSG/0d9fOsoLomX0vrA 6oJsuBJCI/j2nqgx7EJDMJ84V+GQVrcBDoH4gwDMUlymdnKGIcOmPVdDkGrLN1NDbJhnCA96udlDD 1IpatcLOhSSFMrGqKyaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruTzc-000000063Rr-1W1A; Wed, 10 Apr 2024 09:11:44 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruTzB-0000000635e-3B4J for linux-riscv@lists.infradead.org; Wed, 10 Apr 2024 09:11:20 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-343c8d7064aso1125255f8f.0 for ; Wed, 10 Apr 2024 02:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712740276; x=1713345076; darn=lists.infradead.org; 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=3Bj6qFEBTQkW22oNb4zguAXGn3Gn0KYF9aSmL0IcZwU=; b=cqW1t2Hy+Bfc7UaoHPVHRs3XKWJD00Lbx/WWykxqWuT0UBv/egCgCV4m082sP7pr+F BUwVe5vIohDSP50iR6avbRRgghjgFglgkfUSY4Wg9IYBGIrBxMd5rhoJZTqI4JLMszu/ 3CTo9r6M6sKgjRGMrJpslwpiX59vW1fYaJfSOdp6CK0gxMWxtCVIQBM2BWWt8y9FQmif GTGbaJWA/OcmwAKwnV3OeGU6GmlPo/rbnAv1MsC1iSfYgqEMHKagHEsB1Rv+62oRGEGW FvKuPpGIBiWuUbxZqDeRbD6DaJtdupJSFa9DmMF+3PMUSvXcbNcG175EakOLxF2nbpDg dliQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712740276; x=1713345076; 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=3Bj6qFEBTQkW22oNb4zguAXGn3Gn0KYF9aSmL0IcZwU=; b=HWUzBmVpujLXW2cvrQiAvg6CbHuUb2PybM29yUVvvEsZjn/Ue0x66ShITpE3Q/aOXx EUBMlai46LqRr1xywor7CDB4/UnJXANMhY3fv+Hg3gswZTitdu++/5VrHAOh84BQI4bp Zkw3eWd9csMbH63wEytairqYFxmI/xUMFMCi5CPEtCYJADnVT9jzqmnWvBx+ZX/gMj15 3f+XxFmjuJgSJH3YwbHXtAWEoRmsnxsWLQyubQRgK/nzozgp8IcK7lSeY2g9o/0Byfti V5nFz/xhTxW6UND12sjL/DvIDb/R+nCokbmSyikk9jTkx58pDMAxUgh+5vChSZGeeuZ8 b2rA== X-Forwarded-Encrypted: i=1; AJvYcCVMQXnBrCRrFi9M/L7gCM+3Ng+iimG4kCedF6TMav47E6RcUpbKX7/wH1AJVYJFHLTaiQTiTjcS0CyeiDRzsnrC0JxDmnIBOFHH6gm8VMX2 X-Gm-Message-State: AOJu0Yyc9L4SG+U7d/Cql7UpEV88/bWK5/mJJuJw46ERC6nzyaQqUdYl Xxlu/P/1/ngOIYUpVpyG2FOO+KKjld7vyOHTQhvHjjFyizKDWLzwL71MkEUqMiQ= X-Google-Smtp-Source: AGHT+IFAB0sJwJ6MYsANct+Q6sx/TH9SG9iB1/Tv2iCf5OGRfMeMXNSvy6Zvyw0SeigYNf2ZXmUcCg== X-Received: by 2002:a05:6000:1448:b0:346:65dd:55f5 with SMTP id v8-20020a056000144800b0034665dd55f5mr1201789wrx.2.1712740276476; Wed, 10 Apr 2024 02:11:16 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:d4a6:5856:3e6c:3dff]) by smtp.gmail.com with ESMTPSA id d6-20020a056000114600b003456c693fa4sm9079086wrx.93.2024.04.10.02.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 02:11:15 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Atish Patra , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 05/10] KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test Date: Wed, 10 Apr 2024 11:10:58 +0200 Message-ID: <20240410091106.749233-6-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240410091106.749233-1-cleger@rivosinc.com> References: <20240410091106.749233-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_021118_008219_D43B90CD X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The KVM RISC-V allows Zca, Zcf, Zcd and Zcb extensions for Guest/VM so add these extensions to get-reg-list test. Signed-off-by: Clément Léger --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 40107bb61975..61cad4514197 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -55,6 +55,10 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBKC: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBKX: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBS: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZCA: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZCB: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZCD: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZCF: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZFA: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZFH: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZFHMIN: @@ -421,6 +425,10 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(ZBKC), KVM_ISA_EXT_ARR(ZBKX), KVM_ISA_EXT_ARR(ZBS), + KVM_ISA_EXT_ARR(ZCA), + KVM_ISA_EXT_ARR(ZCB), + KVM_ISA_EXT_ARR(ZCD), + KVM_ISA_EXT_ARR(ZCF), KVM_ISA_EXT_ARR(ZFA), KVM_ISA_EXT_ARR(ZFH), KVM_ISA_EXT_ARR(ZFHMIN), @@ -945,6 +953,10 @@ KVM_ISA_EXT_SIMPLE_CONFIG(zbkb, ZBKB); KVM_ISA_EXT_SIMPLE_CONFIG(zbkc, ZBKC); KVM_ISA_EXT_SIMPLE_CONFIG(zbkx, ZBKX); KVM_ISA_EXT_SIMPLE_CONFIG(zbs, ZBS); +KVM_ISA_EXT_SIMPLE_CONFIG(zca, ZCA), +KVM_ISA_EXT_SIMPLE_CONFIG(zcb, ZCB), +KVM_ISA_EXT_SIMPLE_CONFIG(zcd, ZCD), +KVM_ISA_EXT_SIMPLE_CONFIG(zcf, ZCF), KVM_ISA_EXT_SIMPLE_CONFIG(zfa, ZFA); KVM_ISA_EXT_SIMPLE_CONFIG(zfh, ZFH); KVM_ISA_EXT_SIMPLE_CONFIG(zfhmin, ZFHMIN); @@ -1001,6 +1013,10 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_zbkc, &config_zbkx, &config_zbs, + &config_zca, + &config_zcb, + &config_zcd, + &config_zcf, &config_zfa, &config_zfh, &config_zfhmin,