Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp36946lqt; Thu, 18 Apr 2024 07:53:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMnRj6FRkTO0clvinNukfQtpjXCQJcrKuWf5mGihmMfhlBZWxgKMe9rI8DE6JuzDW8zCDzJrn9SL09EupGEphGJkEyWsWrW28IbPdwCg== X-Google-Smtp-Source: AGHT+IEa6WF05nHuWw/tWaZmcPefjweiUOUe62M0BvDgnOVIZDkPYXaMfUfV2l2RiadiEC9Ya0rZ X-Received: by 2002:a17:90a:4a09:b0:2a6:e857:4b2e with SMTP id e9-20020a17090a4a0900b002a6e8574b2emr2683167pjh.3.1713452014109; Thu, 18 Apr 2024 07:53:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713452014; cv=pass; d=google.com; s=arc-20160816; b=HikCnebAtJnhRtqXofo2l8Fzn/AK9XqkssrwCdwp+5cmtS3Xpo5FEg6r1xra9Ya4yN 8Fs2Ddurf0duR1H8PGTmCAXLEi0jemWPANSRcWY3kXz61xMo7sqj8D7LO5YiEVKd3LEY kce1iUt4jpcx8oCRTqefiNyB6FZiGXoCMzS5jueGm4oPYoO6TItBJuOj7JLEFJvwICUW MvDW2mbI4EzmyTxgXSWWie3/FMdWKs9FKjWxk8QYoFDHoJBjubUVEpE/dw4GEYxmNiYh m7CGgVRgExEvRTMrebJ2GpZJadXaVJDXfeViAt+ujScX9Fh/P3b7nAAQTQAgmhZyrwGL sh1w== 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=2hh6e2GF78oUYrxH7UeTADA8qs5jCuVhRAdsmr48k94=; fh=BM3VmeiBoOOA5g2KifNuu3RV5n7m+kjHR28RdR5AB+0=; b=G1PGuVw0USJtG5PX24doYGfn1fEKtxX7qRoGAdgT7Mq8sH2dMDnBacIr2vLGmi9VUH TNNNRiYc0eJRDG3Zy22+Yt9BhGkio8zVxqqhYtHCCBBUhJzmBl390GrxbRtBA4o7fjx5 2RfGaetkqTN/tXoradUgGb2zQQ8M+cvifbKxeQLNzP1GXycNwK269+S67HZDLfV5KQ9O d5pgixeg5JDyY/Kt3O6y50OonaZ0/r+KW2sjC5VN5u5A73mAHDhUUcgZS7WMKDdmwLTg +IcAadS1eHnM2Ki7ktdj679COo6gEttR5ImlCrTYCOW2VRiAm3r2vPBTj+YZk7w27OAj se4w==; 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=VRmzY6KX; 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-150304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150304-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w20-20020a17090a8a1400b002a77ecb3a3csi3264074pjn.154.2024.04.18.07.53.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:53:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150304-linux.lists.archive=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=VRmzY6KX; 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-150304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150304-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7828DB28A63 for ; Thu, 18 Apr 2024 14:28:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F8E116D31B; Thu, 18 Apr 2024 14:27:17 +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="VRmzY6KX" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 DB18A168AF2 for ; Thu, 18 Apr 2024 14:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450436; cv=none; b=KCnPkvIMjr9L8SI8CHeaFCltvlyV1KNNK53qpUPQp2xZrZuPeTHEZhY/VsdLI0jRbA0B480R6ItIkNhaElbmMm0PfdZb45j4Dr/sGvPWNu4/esxSDh2IRGhmZ/sc98uk+W3VsP5ldkXxxve3HSaw7glie9+bGONXLn/pLSxedXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450436; c=relaxed/simple; bh=5d6XfuE/x8oTMptqSbd/TVtSF87TfLSJfp9I2jf+T9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aN1awSDYGdxHpJaonxAwLRjVAk6f7W2KD3zVBH8XVlk1X47u2mHMHpELMMmN4yRwFfgzdthhxO/QDLxPzjIxspGwggcfwCAEPACE0+Nj12FJnkuZofTFdOC+AurzjW0Jz/CLfXFgls29gKBmpvUqhBA4eTEGtEDR0S42bO9K6V8= 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=VRmzY6KX; arc=none smtp.client-ip=209.85.221.43 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-f43.google.com with SMTP id ffacd0b85a97d-346407b8c9aso257187f8f.0 for ; Thu, 18 Apr 2024 07:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713450433; x=1714055233; 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=2hh6e2GF78oUYrxH7UeTADA8qs5jCuVhRAdsmr48k94=; b=VRmzY6KXZmHtl6X7P54Mn5CDqpSgmEKeemvLM3kijxNQXJZTpfY3hm6o9pjQT+E66R j7wqUtLUK2fIEG4uEsMGiPeFpLfuK1maOvzKrF8SAOHWZ/CTni4oDC0Cty79G1i/svOX efjZau2lil0E7lUHqGSXFI9JcUX+3z7DCRb4NPeOkUrcqc0k8uN1fooeZ65Wj5AA3RVm FzLOM6OiqaPH0VvZXK5UeY+2Pd14M1M3WIMNNJc2hwbRStWFSFa0XY1KAK1aE6OKhyTQ 2KxKz02N8vfS/4yyFUgZGFlz2xye2GX2VJR+vH2hM843haH8cBNvpc9re202ZpQIW/TW ZqgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713450433; x=1714055233; 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=2hh6e2GF78oUYrxH7UeTADA8qs5jCuVhRAdsmr48k94=; b=KdcPiv+dx5fnOVtgpGCB81p18IDBD6Mt5jn++ZZeBtrxNPoW4cEgm1VbJXz05ut9Kj z4iPWgaJP5LmHWK2ilSbgW7fmurst5yObmbbhk6I0e1l2mJtQNK4Xs8rvXzKRuT12mp0 pAK84XKF0+Il9jUnn8FwEgG3tMi9nCC1JtjS4uZPdNJ6iOOoamCPoKzb/2Q1qJCIgiLo V48+0sKenAw8y5JMkVhxFDWdnYsTe2O+CkMFFBbjKeSZEG5RhVKtjpFKK08adSqYCZ8W lx5SB9Zz0XoQDphG6gZ5JiNN/UDbJJ/H5gC+6hujIErz23hFc5jNol5BC2/GbjFtYOH5 Mptg== X-Forwarded-Encrypted: i=1; AJvYcCVIvnbrwtSIpv6kcriIXhePX7+EHmUEcr3VCldPVTv9Hj5ixTRRTIQ5SUfZVzNE3BUJKpyQCBawazBpufEKoUkJ3bBwU6PVOFY9Q6oL X-Gm-Message-State: AOJu0Yz6Rsz0JzYIJS1tj6/79VghuWLCaGOpp2PSoCYMOZyKBzB0NRF2 L8AtWhty/k7MDiBKAHN5HvvgldIRcEgAFlsoIHAuFukkbmD7LX1qxw/WwPbkci/BZN0JCUY1fvP M050= X-Received: by 2002:a05:600c:55d7:b0:418:ef65:4b5f with SMTP id jq23-20020a05600c55d700b00418ef654b5fmr1037961wmb.3.1713450433361; Thu, 18 Apr 2024 07:27:13 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7b64:4d1d:16d8:e38b]) by smtp.gmail.com with ESMTPSA id v10-20020a05600c470a00b00418a386c059sm2873645wmo.42.2024.04.18.07.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 07:27:12 -0700 (PDT) From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= To: Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Atish Patra Cc: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Ved Shanbhogue Subject: [RFC PATCH 3/7] riscv: add Ssdbltrp ISA extension parsing Date: Thu, 18 Apr 2024 16:26:42 +0200 Message-ID: <20240418142701.1493091-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240418142701.1493091-1-cleger@rivosinc.com> References: <20240418142701.1493091-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 Handle Ssdbltrp extension at isa parsing level. Signed-off-by: Clément Léger --- arch/riscv/include/asm/csr.h | 1 + arch/riscv/include/asm/hwcap.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 510014051f5d..5528159b3d5d 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -102,6 +102,7 @@ #define EXC_INST_PAGE_FAULT 12 #define EXC_LOAD_PAGE_FAULT 13 #define EXC_STORE_PAGE_FAULT 15 +#define EXC_DOUBLE_TRAP 16 #define EXC_INST_GUEST_PAGE_FAULT 20 #define EXC_LOAD_GUEST_PAGE_FAULT 21 #define EXC_VIRTUAL_INST_FAULT 22 diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 5340f818746b..16d2ad7ca9b2 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -80,6 +80,7 @@ #define RISCV_ISA_EXT_ZFA 71 #define RISCV_ISA_EXT_ZTSO 72 #define RISCV_ISA_EXT_ZACAS 73 +#define RISCV_ISA_EXT_SSDBLTRP 74 #define RISCV_ISA_EXT_MAX 128 #define RISCV_ISA_EXT_INVALID U32_MAX diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 89920f84d0a3..5cff21adf2c4 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -303,6 +303,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(smstateen, RISCV_ISA_EXT_SMSTATEEN), __RISCV_ISA_EXT_DATA(ssaia, RISCV_ISA_EXT_SSAIA), __RISCV_ISA_EXT_DATA(sscofpmf, RISCV_ISA_EXT_SSCOFPMF), + __RISCV_ISA_EXT_DATA(ssdbltrp, RISCV_ISA_EXT_SSDBLTRP), __RISCV_ISA_EXT_DATA(sstc, RISCV_ISA_EXT_SSTC), __RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL), __RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT), -- 2.43.0