Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1279889lqb; Thu, 18 Apr 2024 05:44:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2scyCG/GkqM03EU92Bqlam+GTAeUNhWQ3wFnesOtbBent4qwAeKMVJXdgtpPVBr9bpqsxo3fbN/D7MM/ommNS/FNyW6PIxw11SNKESA== X-Google-Smtp-Source: AGHT+IHHfeurF22NRoZN1wQjb1pEYdI6KctAaRv3YvTZIWVRwY7PTSj6lMpNCYjOQ8w4UeiN5vXw X-Received: by 2002:a50:d741:0:b0:56e:2a64:8290 with SMTP id i1-20020a50d741000000b0056e2a648290mr1623536edj.5.1713444256104; Thu, 18 Apr 2024 05:44:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713444256; cv=pass; d=google.com; s=arc-20160816; b=uQsMTsNu741k7eCbe657EFwCEs1nd920Eds/quHWtSCXINwz1HaKcONAz6t980v9nj dXErKfv0QqSJBfTaVdXqZqQ08eLMia4SGiGE5ObtZoVH8dpOC0pIOTyC5OlBOqm7iex4 ZhYAHvNq3k2Xmi3FavulXaVHynKc7hj9gDDi/Kkp/Wb8sITgDWlI7K1z6GBtAXsan3x9 0JAu4mZd1A6CblvF2RbwDtvp7542M+6c1tvH9cgRi5HkTjvUIWHuLUR7VFeOQrqjNQvQ 5CpwUPtFmxiYg0ZJGsmtAR26yquR4McbuhUTM++hU3w9vnvpeCd5iRUEDEitG865xidH feBg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=32JRcAZ8LHhKBfsqOJDGu3ZSnqgwx85ZTFPgD6hMyrs=; fh=AA73oBxWwL8XprVJKV6jSQ7kiHL2Ggkv6fOwc6StpOs=; b=FZh0MgE3vg68FMtYL9/B6McMKgQvf8zHfxouF4jts2+iORzTCN4Ohft/ANLgjXuLlP CLHedNOcBjoJwYyyPYqk2NGZOjnj7RGCmxGLXUwj+iHB296dZGi9CqyViy65Am7FX8lk UdLtp2ENTEAxoIhSL3UiC5Fmbh/cT82Bs/+71SD2V5bpIySE2gwtEijHCgF9/b4IZCy7 dnrWxMKIKCnWgLoOan2xBXTP+j0tscTa7DdZBdP3A+4hfjrWGSeflmJv9gekMFY8ksIK oqLbunyFiD4XoPzUytD7pW0j1oN8HKejb3cCrPPf9A5+P0LkyvHUIKf0PJyWRqzWZm0J fi+w==; 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=m2Tx15Tv; 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-150077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150077-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q15-20020a50cc8f000000b0056c2909f23esi817027edi.149.2024.04.18.05.44.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 05:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=m2Tx15Tv; 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-150077-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150077-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7CA7A1F2138E for ; Thu, 18 Apr 2024 12:44:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CACF415FA82; Thu, 18 Apr 2024 12:43:58 +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="m2Tx15Tv" Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 60DC312FF75 for ; Thu, 18 Apr 2024 12:43:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713444237; cv=none; b=N2F1IqxjXsGXfV2zS3mfAEOKqdUetc01WdDOyQiAduSrs9MuTRh8K6A9P1OhYusYw3OmQiMG184P+4lbBuXZlnIhWWpI25Igdpfws8kdZNCOVE1rFj3vwLVWpXRwHTAvp5A+bSZ0AKihi67e6nVgDGu9M9xv0JGD318Wx93g/EA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713444237; c=relaxed/simple; bh=BSPP+JhpgqmbSOjXMNtVSOk6UyemTIHuAPZ8lvb1GHA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Pl8otcxzHCnpuiK42jWrLDFdA1oqoP3r7gfQc+W8NTr5XycJl6aVzYfT8/D4jvViRGkUEAdG+kU2l/mG4ejT2vQalFezBLru0vpVIIPSFTl63G+iAJYBACzdzphkR1gtk+01+hXNAwbxHJjzYOMaO+ixocVKgiK6l+kk75uehhg= 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=m2Tx15Tv; arc=none smtp.client-ip=209.85.221.54 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-f54.google.com with SMTP id ffacd0b85a97d-349fd1d3723so154078f8f.0 for ; Thu, 18 Apr 2024 05:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1713444234; x=1714049034; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=32JRcAZ8LHhKBfsqOJDGu3ZSnqgwx85ZTFPgD6hMyrs=; b=m2Tx15TvdFRjHOdqyJyX67kMDKVBuysCC/o7Fc9xL4ucSvqrtNxR4vZRDWYRbobUGn bLdFWiuGaWdEo41pwwa2YLmKM+RdWZ3DXUQxl0kTRJpZrf5R+UeEKp1SCisFyZjSyHgJ qgrdEIO02UcnfX5osQXMANFnB0X1WEyATveHyhPHLMXnwoMCE6PhHNY71HivWRzEjxrN E3lwqTgFApDl2uHX3k9u6Zxb/mf34ndDFdxZXIMfFAPvk5dh79sByNmPYnVpEmgF+4t7 NkJB5+jU3wUJojc/JesjaejkSlKV6V4HD+tFPJtt6RDgyyZxjLBScj0AT75/KIr0RJjj icKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713444234; x=1714049034; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=32JRcAZ8LHhKBfsqOJDGu3ZSnqgwx85ZTFPgD6hMyrs=; b=e2xEJ4TnjsFFN/ozR611gZrtZBaMpjdk8c7YoiAyL28ct1R/QWn9UNoxw8c1yxsCSW aTG8A9SeFR3BKZQa8SsuZLyYh+H133C2Z+NiihMxru6f+42mdbX6jtN8OrIEpgZuMIa1 iIr71PdC9orcGnbj6Y3vklrS/hNmliEVyCQhclyQ0C6lSLcWENFSl5yMl50FwNHxrpzP U+B7VkPUsfWgGvoPHBmqiuYVsZT+4iQ7stWfoXs5luaaK9IxIR+EVrQ/hafCx6azG4Er FM8gmzKq2UHXwmbmEE8UXpBTLEhQswwuljKTH1ZbhTMBV5D5evz+UuuU9egpKPMsdtlL YfdQ== X-Forwarded-Encrypted: i=1; AJvYcCXXI8/OSn7TJzLg5w9osSjUQ8JVbjaphBNPnfg6VDqNqZ0GoFBw9wNbuz++ADt572uR1v7PY8vEQW44h0HHE4tvLIhWzpuG2XLPs3Ju X-Gm-Message-State: AOJu0Yzta5Hx1AL6vV29VYCvX1Ph2MGP9HLqU+ok2s83nBXc0QvSx7e/ A2OTmD/DHdExfYkC9Aw075SFQQmW25fMzR3UEQkS1AHA4vLBfruHMDrmBeS6ZfE= X-Received: by 2002:a05:600c:1c91:b0:418:9a5b:d51 with SMTP id k17-20020a05600c1c9100b004189a5b0d51mr2042383wms.0.1713444233704; Thu, 18 Apr 2024 05:43:53 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:7b64:4d1d:16d8:e38b]) by smtp.gmail.com with ESMTPSA id bi18-20020a05600c3d9200b00418d5b16fa2sm3373412wmb.30.2024.04.18.05.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 05:43:53 -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 v2 00/12] Add support for a few Zc* extensions as well as Zcmop Date: Thu, 18 Apr 2024 14:42:23 +0200 Message-ID: <20240418124300.1387978-1-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 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 Add support for (yet again) more RVA23U64 missing extensions. Add support for Zcmop, Zca, Zcf, Zcd and Zcb extensions isa string parsing, hwprobe and kvm support. Zce, Zcmt and Zcmp extensions have been left out since they target microcontrollers/embedded CPUs and are not needed by RVA23U64 This series is based on the Zimop one [1]. Link: https://lore.kernel.org/linux-riscv/20240404103254.1752834-1-cleger@rivosinc.com/ [1] --- v2: - Add Zc* dependencies validation in dt-bindings - v1: https://lore.kernel.org/lkml/20240410091106.749233-1-cleger@rivosinc.com/ Clément Léger (12): dt-bindings: riscv: add Zca, Zcf, Zcd and Zcb ISA extension description riscv: dts: enable Zc* extensions when needed dt-bindings: riscv: add Zc* extension rules implied by C extension riscv: add ISA parsing for Zca, Zcf, Zcd and Zcb riscv: hwprobe: export Zca, Zcf, Zcd and Zcb ISA extensions RISC-V: KVM: Allow Zca, Zcf, Zcd and Zcb extensions for Guest/VM KVM: riscv: selftests: Add some Zc* extensions to get-reg-list test dt-bindings: riscv: add Zcmop ISA extension description riscv: add ISA extension parsing for Zcmop riscv: hwprobe: export Zcmop ISA extension RISC-V: KVM: Allow Zcmop extension for Guest/VM KVM: riscv: selftests: Add Zcmop extension to get-reg-list test Documentation/arch/riscv/hwprobe.rst | 24 ++ .../devicetree/bindings/riscv/cpus.yaml | 8 +- .../devicetree/bindings/riscv/extensions.yaml | 124 +++++++++ arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 4 +- arch/riscv/boot/dts/microchip/mpfs.dtsi | 20 +- arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 4 +- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 20 +- arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 20 +- arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 4 +- arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi | 256 +++++++++--------- arch/riscv/boot/dts/starfive/jh7100.dtsi | 8 +- arch/riscv/boot/dts/starfive/jh7110.dtsi | 20 +- arch/riscv/boot/dts/thead/th1520.dtsi | 16 +- arch/riscv/include/asm/hwcap.h | 5 + arch/riscv/include/uapi/asm/hwprobe.h | 5 + arch/riscv/include/uapi/asm/kvm.h | 5 + arch/riscv/kernel/cpufeature.c | 5 + arch/riscv/kernel/sys_hwprobe.c | 5 + arch/riscv/kvm/vcpu_onereg.c | 10 + .../selftests/kvm/riscv/get-reg-list.c | 20 ++ 20 files changed, 394 insertions(+), 189 deletions(-) -- 2.43.0