From patchwork Thu Feb 29 01:01:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 208150 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp111796dyb; Wed, 28 Feb 2024 17:21:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUURqv0L0z+5BaObgWqtCypKGVb3BNAI545D3QRbzlXetInwQYv8McbKjZUkjg6pQrZLTBbrW4kRXfiRwsWN+lpj5z+HQ== X-Google-Smtp-Source: AGHT+IHTJhckoqur4SfRE/zsF/uf9EIX9Hq2WAGz8MB2GBCDh3LnjTp3/fwHsjGP2dUcujkXNSEP X-Received: by 2002:a17:90b:802:b0:29a:e9d2:b50e with SMTP id bk2-20020a17090b080200b0029ae9d2b50emr850812pjb.3.1709169683998; Wed, 28 Feb 2024 17:21:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709169683; cv=pass; d=google.com; s=arc-20160816; b=b6bnAbB0zOUfjpydnxRBlwTE52C4BklfPGgfZtDVnylf1cuQPssIEwxro36HUplVgI nspZQ/M7ISj0CB6HI/jzI/h+0Ic1CuDGTtd9eRTKeeriOuslEYzGhC/ZMyOR6tRLLDOM wJQ4Ca2lPOh1cBv0DxfWiH/1Rv+hklMXFz8XMbz5347SApVQn4LER+RE++duUvY+tqpT liUEg9bcsYpCGYEpYIgC76CNrp1fcLJnIph3OBU6To+0AFZA9OIb4HVB0WB5hHG2luZK PywihB29XrdgV160RJ5JPUH7598sCh8rTm0arWwCujJkQO6GqiEw5mYxopkm6N2Yc+6+ njJw== 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=Wdj/IM2T1N8fRp4s3UGf7t+cLrV7XEBMNyC4UJYNwlU=; fh=bSU79JGXbFWOLIe4FmGN8M4oTtMCCVKtVVISg71hCKM=; b=MYskY0m9L91g21Ac3XTrzLcqPW0nze0Wtk+CsNIsQ2r/wbSmoLA7NiTQEqu8S8jXHv 3FteyT6yCTlWJSqvH3dYIbrXPjPeR3mL4whiIqBA4EpkTn5lKApnallaqPAARY9hAquv Tv1y439+eKW+aQFt69ZvpGsueRtwUJNe1nNz+qtpr2gDeJOJiUcT8/pWGVWnslj/q+xl 08igW/NKuxeLI/gRKNHXKe0Qb9QKJoE61dUKSTePWWyM/Y92E4rTnr0DVdBK9ETiAs7o 3UCca6DUD6dLvLGDcBlyJYTaTyEIrzTkYbuXT1kO6K6E5RKQ3BQINWc6ti1mf8JIfmnz MoHg==; 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=cTPAzz74; 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-85978-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85978-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id oa1-20020a17090b1bc100b0029ab7349999si411319pjb.49.2024.02.28.17.21.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 17:21:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85978-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=cTPAzz74; 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-85978-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85978-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 F3B19B24137 for ; Thu, 29 Feb 2024 01:09:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C647855782; Thu, 29 Feb 2024 01:02:06 +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="cTPAzz74" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 048B7535B6 for ; Thu, 29 Feb 2024 01:02:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709168523; cv=none; b=MTsLxmOm65XE2jL/mTzMBudYl9T6G7ZBdZEYIdpPsA4K6dxTTWjkrM+VVcJbYzZnpE1MYOMxA2CWr2AOuOlxVU0CO8If+DlQCfjuym9YOWpQOwS+3JE41y2irRIdAMRfq4t5/hcv4q5smvj4YtXxrdkN7Hn5BRMUg3ZHgH0e6tY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709168523; c=relaxed/simple; bh=9zwOLVexvBGlI0m4Mhk4kV7ojBkQ2+FV0JWidMYV7HM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=aB+ouhhDYj7nn045ImdzeSktwHEBfIq2BOg3jg8XJhlx9UGVxXefjCPQr/AQgYfSlQoZxfmQKryyPhpEcSHytOlnZsmh3tcrRjodxQ3xT0Zs2aUsQQrUAEvFuV/kysjMoBRT4hk3UMPo2h/PONlEh+OgtCuGJGDU9tzmLvGAy8w= 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=cTPAzz74; arc=none smtp.client-ip=209.85.214.169 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-pl1-f169.google.com with SMTP id d9443c01a7336-1dc9222b337so4276045ad.2 for ; Wed, 28 Feb 2024 17:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1709168520; x=1709773320; 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=Wdj/IM2T1N8fRp4s3UGf7t+cLrV7XEBMNyC4UJYNwlU=; b=cTPAzz742v5noWkl/GKyyby5rhm+NPSvb/mpYmbIPKTwinD/XXF8QjSAtm7zCkiYR+ iBIyNoiTN0Sraa3HAvNZpqiPzoTY+/1kQkpp0WLbIoHqwJ3DhOmHjvXlxa2SlbdfYHsv Tncu6CLSK9hnTkqq2VJ8+zrCc39rrKzoxQN9l5eZ15llj/VS+VD+VcdpzWkYzvvjLvIN uuBeBX/5WyyWxuJ0Z8Xo3pjNI3jblaaOX/y5ufJ4MCHlc0HSPg3oceuckz4On6/IJAcW LdScHRSIKK6L43g1kt3LZ7YpgF1zsWuTxd74x6Teexw8ajhxc8XmK9hrxca4HNTepWz+ Fpqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709168520; x=1709773320; 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=Wdj/IM2T1N8fRp4s3UGf7t+cLrV7XEBMNyC4UJYNwlU=; b=N37G30uRlf9SiUz4ChiZRuIZl6ePOaGh2HKkZDxAxovqKKTWgqi+Uy3A2dtTY4cStG XStOBKNTnJKcKARidP+q+WZO7akI6tobVYFZVHOY2h9afvdAA2BVKvXT9ImKGlBbccVf nnwSVkTBt2WPPlBVr+PPxzKjEIdTsFDAWPifAYdfiMzAWq00/AF7HwO9lAe6SlMhaRdv IhC5kFEY3WbWYFYVlVkbdao7qtzHCmgZ5cW+zNUAGByc9G6I4YexDlAAISpavRj2VAXH BjOM+1eSOa3LRZ2GjPALf+YinAVqH1stkoABxzfH7INvcstdi15RACJo/vEGlLbfPJY/ EGKA== X-Gm-Message-State: AOJu0YxP9mjGBX1O9vlk/hwZK068L48OaZFits6uX4r3yU0YiQtKzJVk FvfEscgfesq6KLrEZOiqnIicfvTRsPEpAa7o8OrLh0CFAtM/yL6AadkftoPorF0rfTwCxU9+GYj 4 X-Received: by 2002:a17:902:d50a:b0:1dc:d515:79c8 with SMTP id b10-20020a170902d50a00b001dcd51579c8mr691775plg.23.1709168520546; Wed, 28 Feb 2024 17:02:00 -0800 (PST) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id j14-20020a170902da8e00b001dc8d6a9d40sm78043plx.144.2024.02.28.17.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 17:02:00 -0800 (PST) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Alexandre Ghiti , Andrew Jones , Anup Patel , Atish Patra , Conor Dooley , Guo Ren , Icenowy Zheng , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Shuah Khan , Will Deacon Subject: [PATCH v4 11/15] KVM: riscv: selftests: Add Sscofpmf to get-reg-list test Date: Wed, 28 Feb 2024 17:01:26 -0800 Message-Id: <20240229010130.1380926-12-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240229010130.1380926-1-atishp@rivosinc.com> References: <20240229010130.1380926-1-atishp@rivosinc.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: 1792194310803751772 X-GMAIL-MSGID: 1792194310803751772 The KVM RISC-V allows Sscofpmf extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Atish Patra 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 8cece02ca23a..ca6d98a5dce5 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -43,6 +43,7 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_V: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SMSTATEEN: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSAIA: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSCOFPMF: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SSTC: 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: @@ -406,6 +407,7 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(V), KVM_ISA_EXT_ARR(SMSTATEEN), KVM_ISA_EXT_ARR(SSAIA), + KVM_ISA_EXT_ARR(SSCOFPMF), KVM_ISA_EXT_ARR(SSTC), KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), @@ -927,6 +929,7 @@ KVM_ISA_EXT_SUBLIST_CONFIG(fp_f, FP_F); KVM_ISA_EXT_SUBLIST_CONFIG(fp_d, FP_D); KVM_ISA_EXT_SIMPLE_CONFIG(h, H); KVM_ISA_EXT_SUBLIST_CONFIG(smstateen, SMSTATEEN); +KVM_ISA_EXT_SIMPLE_CONFIG(sscofpmf, SSCOFPMF); KVM_ISA_EXT_SIMPLE_CONFIG(sstc, SSTC); KVM_ISA_EXT_SIMPLE_CONFIG(svinval, SVINVAL); KVM_ISA_EXT_SIMPLE_CONFIG(svnapot, SVNAPOT); @@ -980,6 +983,7 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_fp_d, &config_h, &config_smstateen, + &config_sscofpmf, &config_sstc, &config_svinval, &config_svnapot,