From patchwork Fri Apr 5 08:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 13618606 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D33FC67861 for ; Fri, 5 Apr 2024 08:00:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UXmRM7HnUZjPDW+R9ZcfgMuHmG7E0YWIqVhS+TTKTuM=; b=Mc0742fl/kvzzu 31a91ga3Pr+bdHiEPvf0XUMiOcH8HFzVqJbCMakwFxSeiRTo3gA3AjtGBrdEk6fJIFCajhQ3kMsKa 9JGSdk3JVHdmbu5BGeIwU4wwLvjaGjdOHiBWtDQZDKJMY2deZlW8bZPnwEectTZYsq2arZywkFd9h nGgwMO7rKV8WhHIUj/gpIpO816/z2PyaqgchOOW9GhbWINqA+L0GIbGSYIV8DvEb/tH9RBJY6DbMd CSgyG2IfQdzRgsrOM1lmsVUXlKVR1hH2mwoxU2NxAm1IIto+JGEnEoHuEoOGUzo+35iPhC+RlPOeb 3rqQG6Wu33Iatn2zUndA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rseUq-00000005p6Z-1erD; Fri, 05 Apr 2024 08:00:24 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rseUn-00000005p3r-02mU for linux-arm-kernel@lists.infradead.org; Fri, 05 Apr 2024 08:00:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D362DFEC; Fri, 5 Apr 2024 01:00:48 -0700 (PDT) Received: from a077893.blr.arm.com (a077893.blr.arm.com [10.162.41.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0B0C63F64C; Fri, 5 Apr 2024 01:00:13 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Jonathan Corbet , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Mark Brown , Mark Rutland , kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [RFC 0/8] arm64/hw_breakpoint: Enable FEAT_Debugv8p9 Date: Fri, 5 Apr 2024 13:30:00 +0530 Message-Id: <20240405080008.1225223-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240405_010021_161205_70DE1B6D X-CRM114-Status: UNSURE ( 8.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series enables FEAT_Debugv8p9 thus extending breakpoint and watchpoint support upto 64. This has been lightly tested and still work is in progress but would like to get some early feedback on the approach. Possible impact of context switches while tracing kernel addresses needs to be evaluated regarding MDSELR_EL1 access. This series is based on v6.9-rc2. Cc: Jonathan Corbet Cc: Marc Zyngier Cc: Oliver Upton Cc: James Morse Cc: Suzuki K Poulose Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Brown Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.linux.dev Cc: linux-kernel@vger.kernel.org Anshuman Khandual (8): arm64/sysreg: Add register fields for MDSELR_EL1 arm64/sysreg: Add register fields for HDFGRTR2_EL2 arm64/sysreg: Add register fields for HDFGWTR2_EL2 arm64/sysreg: Update ID_AA64MMFR0_EL1 register KVM: arm64: Explicitly handle MDSELR_EL1 traps as UNDEFINED arm64/cpufeature: Add field details for ID_AA64DFR1_EL1 register arm64/boot: Enable EL2 requirements for FEAT_Debugv8p9 arm64/hw_breakpoint: Enable FEAT_Debugv8p9 Documentation/arch/arm64/booting.rst | 19 +++++++ arch/arm64/include/asm/debug-monitors.h | 2 +- arch/arm64/include/asm/el2_setup.h | 27 ++++++++++ arch/arm64/include/asm/hw_breakpoint.h | 46 +++++++++++++---- arch/arm64/include/asm/kvm_arm.h | 1 + arch/arm64/kernel/cpufeature.c | 21 ++++++-- arch/arm64/kernel/debug-monitors.c | 16 ++++-- arch/arm64/kernel/hw_breakpoint.c | 33 ++++++++++++ arch/arm64/kvm/sys_regs.c | 1 + arch/arm64/tools/sysreg | 68 +++++++++++++++++++++++++ 10 files changed, 214 insertions(+), 20 deletions(-)