Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1430240lqa; Mon, 29 Apr 2024 08:15:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVHeS5OhQM1z1Q741pEhVivKhZFujuvOnsnx/acl7eT7gA1cOe5YpXbD8Cn+rSN8sBU0FLwg/xtK3x7fx8dlCAfhdNWebitvz4iJhJT8A== X-Google-Smtp-Source: AGHT+IGgCYahnPQvGXBtTmCr22QfT8pJulcaNl5s79wd7rrog/YPk9zxqTjeEFSPRw903gz02y1g X-Received: by 2002:a05:622a:5b06:b0:43b:16d1:a6ee with SMTP id ea6-20020a05622a5b0600b0043b16d1a6eemr1125575qtb.17.1714403741508; Mon, 29 Apr 2024 08:15:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714403741; cv=pass; d=google.com; s=arc-20160816; b=M/N8P+tmn2mjD0ba5DMPlkpFkFVoxz6Wq8r6X7oXdlL8s+jmMFfLSmh0IMI9RsxdCH /0SKVaWU8GrXNgrAbLAq8ZwNwcoDGLr6yBWFNerPRnIlWzrCYrtEIAmx8ZHIlzr19cuo bArCMQyCVjL9FNbL8rfy2NpbuUHlgrkG0YouPP1bw0H2RaKU/xEi6fUIB3ZKHSTwRX0O lFHaixHq9xgELuessNM4zzxRD+qXMhulUasLtioamRmpglCaeG0KjC2pLYxsydKFfTGl RdQgIfRkoUGwIEJaDWGeQ7mr4KiIaJBDfpgOC3XIao6WQkJqY4ofSv4KsVlSlWwtHwNB Zmeg== 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=HO1pUvU0QFRoXzPxVhmpQLKjzbVC9RycGYDtZgzkuNE=; fh=NnYPFkbjdZqUdCmziflbeI75Du+MasuqQnb1EWHhc68=; b=0qcW2+0ptNrDluD55iyCtySGCC1lJbQ2abG5MZtziG5cCiQrQSxQoWnYVryEQb7T+f ZPIm7B+AygG79KvNAKokP86gC3Rd9mfTK9IQDgc1ycVdJTPLvgwl2QAjyyKkbueZ0AB2 Giy1zZ1mZ7TuMDr72oS7BxhTJYdefm5qo3g4drHsA/EQg4hX6NTa5I2+uVDneNRYgDqh +JSkqgIP2SL2Y1r5avIyLztjGn29vRmC+T1bJBhRwNLqRqdEDMOI17N8k3KYiy1fWRxQ Gu5FTkH4rBMCpwJZDOTyXisKbIcLGi7ZxkN3ao6AsncoP0o2Dzdenp8+iF3Ksas5nGMN MRuA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=ieLUpllq; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-162545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162545-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e19-20020ac85dd3000000b0043b15616c00si495252qtx.631.2024.04.29.08.15.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:15:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=ieLUpllq; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-162545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162545-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1044E1C217DB for ; Mon, 29 Apr 2024 15:15:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C9ADA12F5BB; Mon, 29 Apr 2024 15:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="ieLUpllq" Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (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 8931E12F5A9 for ; Mon, 29 Apr 2024 15:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403201; cv=none; b=mAT+iU+C0AgtbSFEak8XUSggnIDPq7kP5UgIHJs6gTxcB5t713vDV/yB97AJhXOXM3cinWSTbvdpgU1okaRVxAMU3qHU8ngXuUMNtdo+wrztN3Qkzgwopp7Si3mEkmkapL8Pn2t0y/macQkVHxXF3alWBkWtJnammOgO/PiRPds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714403201; c=relaxed/simple; bh=u6ulU0BPQmNSIcLbsuogo6WHzBJ6ZqZxhPCHBhuLYhk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CWapTrVY53ewoLJkPfgzaqSoSMOuG5JQ67E4pV5asD57uL8Wv2ymK4IKhYPj1ivU+chCrGVanoMyVhJShszoAFp6jbvf82HPRR/421sddshyD6fm4XrnhdZRbfT+jec3w+Na1UtvSr0ARF3xnn3hbdpGonEzTftOXVIaHsOzdVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=ieLUpllq; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-34a42d6e216so1009536f8f.1 for ; Mon, 29 Apr 2024 08:06:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714403198; x=1715007998; 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=HO1pUvU0QFRoXzPxVhmpQLKjzbVC9RycGYDtZgzkuNE=; b=ieLUpllqsARfwt/7I7ww4PVq6V4fj512DDDiiNtBQYMKJ0pfEhUfQJpkZZRi0U9S90 q7qaSK00zTLFkN5/PrsStN4/+0bjZTPqjP1Lui9fML18g9qa+z492lIZFSdRu5FZX5C8 xYvIh6rW4bMkDWPjrz9wi1L1C8A/mRsT9rJx3dlPkziUh+pOth7BL6nxvlOMd5CuJJmG CQ3AUuqPNyipmYt1AldKBigKA0hDWu+XkhhX2cFJZXEjyO/DqKNHmnSY5cnIhG/gST6q Wk/Bm0tozjLMKXOUqZQ70kpZkUb3S+fOk1mPmw9jp5sTX16BKo54/4YVT8UwL+9xgcIk nj+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714403198; x=1715007998; 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=HO1pUvU0QFRoXzPxVhmpQLKjzbVC9RycGYDtZgzkuNE=; b=ZWHbI76veSMuFSlgNobNUm6H0PJ5eRG2JszsYpNK1fic24P6dZ3wV5mYTmYybWIBlZ 8aEtYKDHaAgjS6tICk2lY2ficszSmzZkhAhBmPmK2aTXsoELEjCVzgaDXEUo2YOpS+qN 93BGJUfF/Mqf/j3Pp4IpH/Xlicj0EYcNX9lsvrK8NDGkTVG0xI1HjiCVRzWhGst8AiCv niefyhM6+4WQYG4rhu7+6/r2E3uy5q6E+/sWQ6U7BNSpd9cSosFJCkUIewQMwcu5z6YT Hesui8sYBfeZy7WqkKy7BqT1LToKTvOH8rmT4yufEjiAOq+rqQWXZ5TUjchjFb2EGfUC XMpA== X-Forwarded-Encrypted: i=1; AJvYcCWvRxXcSAzVbZqFfRbIaqLRqS1yc8hR882SxvFRGkRijrQsqOlxjihfZhlDYgnGKMulfXX7YRcfXE/AkLHnFhix3CltzMCSWJvRayvD X-Gm-Message-State: AOJu0YwqZIYPzBGjvaE6q/ou1hzxpXXMyblhVd85zYZjvgvPSyDy8C5f WupLECnqqFBeEkDyZHPPSOfvTGi+P0W99FLIJB7BKXFChqvEyYu1TDCpaYU0sGc= X-Received: by 2002:a05:600c:3b17:b0:418:2719:6b14 with SMTP id m23-20020a05600c3b1700b0041827196b14mr8083792wms.3.1714403198041; Mon, 29 Apr 2024 08:06:38 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:2fec:d20:2b60:e334]) by smtp.gmail.com with ESMTPSA id l23-20020a05600c1d1700b00418f99170f2sm39646638wms.32.2024.04.29.08.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 08:06:37 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , 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 v4 06/11] KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test Date: Mon, 29 Apr 2024 17:04:59 +0200 Message-ID: <20240429150553.625165-7-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240429150553.625165-1-cleger@rivosinc.com> References: <20240429150553.625165-1-cleger@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Anup Patel Acked-by: Anup Patel --- 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, -- 2.43.0