From patchwork Wed Feb 14 12:37:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 200947 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1188130dyb; Wed, 14 Feb 2024 04:53:41 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXJQG0ssmVLN3zNEIL6uTwBUXioWy3gyCcOSDlm3vp9zltvgAFG4e1LqGlvNq6MyTXfr3myxn0ZtxRzIK0r2LgP1vtvAg== X-Google-Smtp-Source: AGHT+IEduWs0HJfGdFkhypIvj7hSCF5slJvFyNjrVRCyYZB32BT8sKwqu0fmE9ZWiiBO7YMDrRlv X-Received: by 2002:a05:6a00:929f:b0:6e0:4b09:a9c4 with SMTP id jw31-20020a056a00929f00b006e04b09a9c4mr3195142pfb.2.1707915220961; Wed, 14 Feb 2024 04:53:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707915220; cv=pass; d=google.com; s=arc-20160816; b=uiPdc/BTgJUyLHyzKs4Dt1gQIEshyOZu5gE46F+6Q4T4BLGqfMw1eQEKOU9KF2UwiT PbTKgypKuRExHVxfQ2Lbmw9XyxrKBpQk/S4yM1V/PWyu3O6CHmHJV7jg1woZhKWIYmiH v2JcT5pQ9bZ/On0huKvMNUVeZvMeq5xP2ou8WDgp5nPw4BeF7LOHTOWy0o6ofSO5ApyZ yB8mU/zJYFTIW9b8ARSdn2Zx5UfBuJUnWL6wJv9ZJD0Ni6KihmN0zRlw6uigxM1lhWDd ieJf6itpXRcwjXjl40VVHaOXgYzOrWhGFrJi25xq2YwJNaXdP/NZqMVKShQuE/nwg31X kipQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NHKjtl+TiQN3xkVjk4Gl68ZjMVAysMTJP3yyqxhX3IM=; fh=1h344eUY23AlB3rrIGsT8cBvWjQ243nHcvN4Yal9c5k=; b=x5BuRjssCybY7oc+nuHCTsmtTc3g295iZzeYaLIXbmG411V0+Fg7uwoGeOtero3QVU ZM7TqYYSEDGTPqLA51zsYGq1aVoO/UfnXcifCfgdQ8KdwtelmqyEKtZ961TmfKeWkxNS BywVBUo6VWad+zct4PM9HDZsHF3PgG1AFjaGHIuW7AzyMTPsTPT4Wyg8PCUirDTzsUfs pkdLVaO8LiijTczuZOuqicExPlb97wEIPxyBouqEocX9A0E5Z7AEUj59QLKNSCoMCQk8 yUU4rR6/0KQkSmm2LjidqHIa4So2tMd67ohPTxuCWEiQUa1oiosUnHSo/s7c3M8VhaiF 5trg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=RTcdItvK; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-65206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65206-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCWvsvuaz3vrp5gQSoC1z2h7t/IiVJiGZtrOMTlGhwf1lIV2CWe01yZw94OhbF+6jC9xzsX3hSONnP3Cq1Jb5Or31qst3A== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y129-20020a636487000000b005dc957fe12bsi824048pgb.165.2024.02.14.04.53.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:53:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=RTcdItvK; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-65206-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65206-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C1B14B2761E for ; Wed, 14 Feb 2024 12:40:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3185754F8F; Wed, 14 Feb 2024 12:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="RTcdItvK" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2219C54BC5 for ; Wed, 14 Feb 2024 12:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707914309; cv=none; b=Y3dOwgwawnzGjtzZc/c5AdwrG9f4iLijsihxQOj3Cc7P2MzoPNlZQRpbMkHewa08vviC75zjpUY8FRE2gFdZxNvITN5Vvs3HSzNlf2zng4De1l3w0Q4w+iy7C2Y2GISBGke+DcKMKDy6wzUXpWhEiT0H8JW4785a5d6TlRHj+aM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707914309; c=relaxed/simple; bh=2Q4nmJxL8PyzVuzCrgLSok65VnBv52aekZnQ81VzKko=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QtUfHNbRO00tu6TuAkfStdIxKig399VClafZkXeU4mHwhMecd40THP6MAXwQ2+eBzfuIlgD/dhaHe5ZXzF+O2jf1UY3IRYl+xEMX1G2MSszVy7QjgNEATarfEVZZtmZ+ZWUap34tgWNPmjvHFh46xRI/NEAWaBM07HzTRrGNJ90= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=RTcdItvK; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1db4cafbbebso6844495ad.3 for ; Wed, 14 Feb 2024 04:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1707914307; x=1708519107; darn=vger.kernel.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=NHKjtl+TiQN3xkVjk4Gl68ZjMVAysMTJP3yyqxhX3IM=; b=RTcdItvKtzRGfWBTIhMRyrYHPEk/0/b1NM/KPNPc6oSFOqui452MWjkHTE8YVWKPx5 bIyr3N7kKGaXtNB9YX1HVQwTh9qHS5hnYdh0tDRQIXwTfd1KrJ3gWoUD2abCt5pj+/4e gUEghV303Vki9FY61b5fC8r1KuwMwSCjafb9fiFMyktImjvvhPX56dymmcrhPR5qmU+U TOPE62FKb188XcJ/kEAPj5jsxPiGdi93dLacINavt/JDqxo2mQGevCHH2w4JfNBKPEUS yWXW34+VPiTXKH7pziaUYNn4MK8/1IVHSbYgt2M8g9peASd9A3vEAEn/SQPaMgJx+1kI xZjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707914307; x=1708519107; 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=NHKjtl+TiQN3xkVjk4Gl68ZjMVAysMTJP3yyqxhX3IM=; b=wiquBOdk4/cr1SEJ7wfCK5WCMP23TdpyQt5OJO5wPF2lLR0b/c26YqI/1QF5mUdjr5 MB1Z+BI1/hEmSPeOySVag6oZULg9buVmuJ/8yH4yFIc2TSPRtCj2Y92LQJpqC/liHCdB ZmvFYZiWetHjr9xlV5v5H6feseN4lkS0SMY1ZIFQGQE1Y2DfPJ5jxq50MT937r+tFns3 MOSOaa2HVChmriuBeKWNaOJeCCfv/ic7NOVMqz8enxyUh9S/YOJMZ2+4mHihaIN6xbcQ HbhI2vdq9atblAF7hulYNY1znf+9fh1c8OAUXIYNsrw/3IwrSjoSrsZRBWRlcEOKZfC6 Jegw== X-Forwarded-Encrypted: i=1; AJvYcCUGkujFxmiFKtEuodRxYTASTzopPctJTlZsf9bwRgc29yJMJJpe4fO9yZ1x0WLnzWUCSp03tqAXrXv1hdOp/neab3xdWqTTesV6kke/ X-Gm-Message-State: AOJu0YzrATOMJhymcnM+Mo5uljcmmxyW/pPI2q3Ywy4dn9OanatLAF9U x1iiTZuU7IGZh0K7iBK9X7o2kdSVYGYiPn1Z3SwvLFAaORc3mghYQcehnDdzCW0WKInoU38gBKN v X-Received: by 2002:a17:902:eb89:b0:1db:68d5:6281 with SMTP id q9-20020a170902eb8900b001db68d56281mr717883plg.35.1707914307513; Wed, 14 Feb 2024 04:38:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU6JYSlk0nXCb0cCSJmJVtMcA3/mi/wxVgTU49YydRY51DqTvVP0HOsuMu+uEiHFW5vdTQBkqUZY9o5tBwRP6TqnEv+nZnUhap2OH+nfGTbEt3lY/Ae/q4i9vdc/StMRf+9juoiTb/5jO4vlL/PqQK3OjSqQ5dh7uzMrrlFalyKWpy+t+tn0Fo0/V2Tp2w0HKwrTY7LYbYAtv4VlJgxcpzDN8v0xk6gU0lKQbcRYPrLUTNWXKMg7VyqN9gdLEg1/FaCxccjnyp/qaIA0HjWXBKEUDaA1hBUn+wc2bETB9VvFzfzckufJ8BKYSQzn3cTVYx9swbNbLAACI5d2s7kS1aF8ZwYTw3o9N7OZFInjwG0TMXNnyBL31t5GwmjElQXq09vk4owgaVGpVZDJGgc292s+M5meW0j8nnGCPfgm/rfrIQxUno++Ly0eMQ/Ng== Received: from anup-ubuntu-vm.localdomain ([171.76.87.178]) by smtp.gmail.com with ESMTPSA id o20-20020a170902e29400b001d9b749d281sm3041419plc.53.2024.02.14.04.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 04:38:27 -0800 (PST) From: Anup Patel To: Paolo Bonzini , Atish Patra , Shuah Khan Cc: Palmer Dabbelt , Paul Walmsley , Andrew Jones , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anup Patel Subject: [PATCH 5/5] KVM: riscv: selftests: Add Zacas extension to get-reg-list test Date: Wed, 14 Feb 2024 18:07:57 +0530 Message-Id: <20240214123757.305347-6-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240214123757.305347-1-apatel@ventanamicro.com> References: <20240214123757.305347-1-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790878910330542209 X-GMAIL-MSGID: 1790878910330542209 The KVM RISC-V allows Zacas extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 5429453561d7..d334c4c9765f 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -47,6 +47,7 @@ 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_ZACAS: 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: @@ -411,6 +412,7 @@ 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(ZACAS), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBC), @@ -933,6 +935,7 @@ 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(zacas, ZACAS); KVM_ISA_EXT_SIMPLE_CONFIG(zba, ZBA); KVM_ISA_EXT_SIMPLE_CONFIG(zbb, ZBB); KVM_ISA_EXT_SIMPLE_CONFIG(zbc, ZBC); @@ -987,6 +990,7 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_svinval, &config_svnapot, &config_svpbmt, + &config_zacas, &config_zba, &config_zbb, &config_zbc,