From mboxrd@z Thu Jan 1 00:00:00 1970 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 08057C79F9E for ; Mon, 5 Jan 2026 15:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K/N3zAbb9Io53mL9MfScjAIE7UgKalQY+fltjoVvwuo=; b=cN6XgmOz/pavs3gIZYnTvewch7 eVAkjQ+gQuhkb0Xh1kc3Oky6rskG4Igc/A+s0X9Ix8m310HQpNU04o048YlYcG+HmfvT2Gb/rj0wp upOCryg2jHf+gafMQnymOAZxKJPWxw+mO2ghcfmqo3fsJNIbbOhYqJnpFpR/VDGLb6IxLFdGnAti0 t5GJi82P9m26KutUN2G+j7Ghl6f9V7tF/cCzNxUT5LWP5T3fON06mEx8zlhAQG6yew4y0XOzuPNZM xUjP577nyKs4vGDlWeLplUWpSwVJRUf7A4E9spWJJ1f+ySEm7YzRyY6+6nJZvJZp6qWYcOrnI5ZIH sm7NoN6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vcmqR-0000000Bdef-1z79; Mon, 05 Jan 2026 15:50:11 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vcmqM-0000000Bdbp-1no1 for linux-arm-kernel@lists.infradead.org; Mon, 05 Jan 2026 15:50:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id BA3CD4421E; Mon, 5 Jan 2026 15:50:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F5A5C19421; Mon, 5 Jan 2026 15:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1767628205; bh=slfr55E2le7kv/1YuB/BPrtDozKTarzMBTzRIRUEr8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PNe2ibjzuSwchxppJkcNekOmPZiyvcX2vgZVhiTNwmI+HRhxbVPeU6mvM00A4hBgS zibDsgfG0sZ49CPxi2HBT5oPZmpoOWmRlXaNc0iL4qBiwOQVV++Plz6AUagm7+WBlz 7Yw8Wfdvyk3yt0LSUWAG3Tw4vNKvWiN2Q7pHCp5o0bFugNkLqTyNPebQKWD4KcLkln /9E4Sq5JF91eQEGBr5QfOe47HPcG5sN1Fr1sCWH9mfjUCt1egaGfORAR9eOAr5U/Vo RmvZSsjH4DfwAF5Yg06wPKDrrQI3jAVI/A7uf2KQSb22ZFkXbesBoTJ512EIEe2lGs VZB4jf/bBAFrA== From: Will Deacon To: kvmarm@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org, Will Deacon , Marc Zyngier , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Quentin Perret , Fuad Tabba , Vincent Donnefort , Mostafa Saleh Subject: [PATCH 05/30] KVM: arm64: Expose self-hosted debug regs as RAZ/WI for protected guests Date: Mon, 5 Jan 2026 15:49:13 +0000 Message-ID: <20260105154939.11041-6-will@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260105154939.11041-1-will@kernel.org> References: <20260105154939.11041-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260105_075006_496239_2F08C16C X-CRM114-Status: GOOD ( 10.04 ) 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 From: Fuad Tabba Debug and trace are not currently supported for protected guests, so trap accesses to the related registers and emulate them as RAZ/WI for now. Although this isn't strictly compatible with the architecture, it's sufficient for Linux guests and means that debug support can be added later on. Signed-off-by: Fuad Tabba Signed-off-by: Will Deacon --- arch/arm64/kvm/hyp/nvhe/sys_regs.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/kvm/hyp/nvhe/sys_regs.c b/arch/arm64/kvm/hyp/nvhe/sys_regs.c index 3108b5185c20..c106bb796ab0 100644 --- a/arch/arm64/kvm/hyp/nvhe/sys_regs.c +++ b/arch/arm64/kvm/hyp/nvhe/sys_regs.c @@ -372,6 +372,14 @@ static const struct sys_reg_desc pvm_sys_reg_descs[] = { /* Cache maintenance by set/way operations are restricted. */ /* Debug and Trace Registers are restricted. */ + RAZ_WI(SYS_DBGBVRn_EL1(0)), + RAZ_WI(SYS_DBGBCRn_EL1(0)), + RAZ_WI(SYS_DBGWVRn_EL1(0)), + RAZ_WI(SYS_DBGWCRn_EL1(0)), + RAZ_WI(SYS_MDSCR_EL1), + RAZ_WI(SYS_OSLAR_EL1), + RAZ_WI(SYS_OSLSR_EL1), + RAZ_WI(SYS_OSDLR_EL1), /* Group 1 ID registers */ HOST_HANDLED(SYS_REVIDR_EL1), -- 2.52.0.351.gbe84eed79e-goog