From patchwork Wed Jun 19 15:39:12 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: 13704193 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 E5C38C27C53 for ; Wed, 19 Jun 2024 15:41:38 +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=Abz7UAFqiN67ddQZR5wsOJSM/BeJeVsqyZKOjwE2fX8=; b=KOMOzXtVLKlvYO pMR3wpKBeVEot84LYXoTS1YUEn/q08TLAaJm7tVrOJ8wDfOrVoej/gyT6z2TicVm9o4pJkzSGTV8i ogbYfc4FGb3KuW+ksrUMpuEf3k1cfFiUpemHdyLm308gdb8TIjhP6pmrSIavxL866/p5kVLUutiqs R0BAYd310pGsUK9p+vO1996WBTOBxxZPRM3lQ0xd4BKc6dNupY1IOLvAVWrDx7E2ImOoyxrontaRY 9YSj2y+XkRineuxLgf8//bYsnrEERPuW2xCgMp1nnefoqGn4Bk6STJlhfsGKC8jFVhApZIocNQTcu 6bIvzJ4NP+f7Ax+GIBmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxRH-00000001qjg-2FgT; Wed, 19 Jun 2024 15:41:35 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxR0-00000001qWp-26OL for linux-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:20 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42181803bf2so4909285e9.1 for ; Wed, 19 Jun 2024 08:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811676; x=1719416476; 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=uhmrjq4H2Oq8xJPevOPzXZFQ+Nl3u1sJLUiSeD49DFE=; b=RGE9CB2EQzeCSocRK1YporQkp08YmIMYUU4SYQEHPSagkPYC3iTPw4z/DV21HEXBmM 5k5FD7OK9734pO6YmcdJaakKeCK8oVxWV45xs3FQVkLs6+dKmwBuJp2z9KNSu6bSj2uK CgqKiWs9fRjYjYCl6h1A4nVhE7Gm4pSj8r1N4/ApxP2SOJW7mnqGaVLw7Vtx8WXDLRPF oFOguyJ5fmQD8CnJhjHFK+iES8t5ZiOjDuKL/P6oMCQLA1jzGSClygTmsGwqRXTILo83 r4dF16DdcmQFDnVTfvz8S6yRQY8MrhEXrPDL/WOxk9aQTRLgtpAOg/WIyiEibXn1fXym lB9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811676; x=1719416476; 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=uhmrjq4H2Oq8xJPevOPzXZFQ+Nl3u1sJLUiSeD49DFE=; b=XglyrMygj+OSK7R2yCFrB9KI7iWxlmwMTmKsd9L/V3SFYiXUREhPSWqeyXO4nQ2M6p xod0K0optoO2pXKGX7LK2enfOgd5rRJbsJMOrfmk+AgEhxICSXi2uQg2LHytuB8LOKxu k1t29rcP8sPzyb6ZyjXtiJPsxQDOGR9udl4wdIE0X+GwdQD602w8+HW/o7gpBmEpdoK+ 2o8FPZKeeUar/HiN53CViNc89/r6S72EUO3YVG9zzo6AOdh4mSOodE9XqfLEFoisrG70 Kozn6PXzb1MmJBmwKOeWMGOjnwahrYKKeO3bKJClL9PmLU/gV3OV+wQlILwss3RXsP1E UUgw== X-Forwarded-Encrypted: i=1; AJvYcCUI5IRMFSXPO3zn/06d4/YgZODzaS4Zb7yk5VE+zpA1y45t6+kapxdLR0yMEu/YYBrBVwjsGPDvKwtuPV0yvL1VV1vMBd0Fgq2/vmoTTj+q X-Gm-Message-State: AOJu0YwEsuucm0y0hrSCKcFy2XjysdZiRjAmzlRx5vd4QlKJcXBK91Z3 w58SWkiLNdQoarbXRj9uZHU8rnWh+FCSUYXpDD3Yxbk4LkscY+XlJBqSTmwVOOA= X-Google-Smtp-Source: AGHT+IGjwtUZf3kMWB9g1O1qJeQzBRQZ0qEbWnfWNveuCVuurscQ/RMRjo/RFMkwbrEud2Tb1Hd71w== X-Received: by 2002:a05:600c:1d09:b0:422:2f06:92d1 with SMTP id 5b1f17b1804b1-42475296800mr18928745e9.2.1718811675796; Wed, 19 Jun 2024 08:41:15 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41: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 , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , 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 5/5] KVM: riscv: selftests: Add Zaamo/Zalrsc extensions to get-reg-list test Date: Wed, 19 Jun 2024 17:39:12 +0200 Message-ID: <20240619153913.867263-6-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084118_556547_178C7F56 X-CRM114-Status: UNSURE ( 9.44 ) 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 Zaamo/Zalrsc 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 1a5637a6ea1e..70216a1760c3 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -48,7 +48,9 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVINVAL: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVNAPOT: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVPBMT: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZAAMO: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZACAS: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZALRSC: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBA: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBB: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBC: @@ -420,7 +422,9 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), + KVM_ISA_EXT_ARR(ZAAMO), KVM_ISA_EXT_ARR(ZACAS), + KVM_ISA_EXT_ARR(ZALRSC), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBC), @@ -950,7 +954,9 @@ KVM_ISA_EXT_SIMPLE_CONFIG(sstc, SSTC); KVM_ISA_EXT_SIMPLE_CONFIG(svinval, SVINVAL); KVM_ISA_EXT_SIMPLE_CONFIG(svnapot, SVNAPOT); KVM_ISA_EXT_SIMPLE_CONFIG(svpbmt, SVPBMT); +KVM_ISA_EXT_SIMPLE_CONFIG(zaamo, ZAAMO); KVM_ISA_EXT_SIMPLE_CONFIG(zacas, ZACAS); +KVM_ISA_EXT_SIMPLE_CONFIG(zalrsc, ZALRSC); KVM_ISA_EXT_SIMPLE_CONFIG(zba, ZBA); KVM_ISA_EXT_SIMPLE_CONFIG(zbb, ZBB); KVM_ISA_EXT_SIMPLE_CONFIG(zbc, ZBC); @@ -1012,7 +1018,9 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_svinval, &config_svnapot, &config_svpbmt, + &config_zaamo, &config_zacas, + &config_zalrsc, &config_zba, &config_zbb, &config_zbc,