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 E5319C433F5 for ; Thu, 28 Apr 2022 21:01:16 +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:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b2/fOicze6jNQByJR2Yk7fnyxzPsi5+N4xC18Yzxbsg=; b=Y+Zek8mZX2ATov pif97mQmrMlhwiK/DMSkXJFDj/4WPiK+nyruAVPjrL4fKvpVHLJzpxuBDLXlGbNg/vcjh0Iv/cQii b7pI+VnEu3Wtqx04gU2X+GQPWLWDQ7AlStggRx+MTtl9s0ZuPUXBtfggS+QsR5ozmVa2uIJTguG1X Vd//FPmb1mJYsUKcCc9QrHaMZ0zej88a5sDxO1wEoONsyWSG9nAaaDFomHrjaL2nkZwChdJk3vxad F75uaXTi2tk1iqG1rB/3/upuy/sGBEfESo/lfuwBO1Y308XLfhqSYQbTgRcXLYj0CFqRF0VWH/ADq mare3CqdHbRG58lBwPiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkBF7-008QuL-DP; Thu, 28 Apr 2022 21:00:05 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkBF4-008QtZ-IT for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 21:00:04 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4AF0B83036; Thu, 28 Apr 2022 20:59:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 780DEC385A9; Thu, 28 Apr 2022 20:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651179598; bh=j2F1E9EcpdnjqQ0aWfONaAfWZbJZ0eFC7BwA5vIzrDo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EJHfK2TtiLPQy31VeyXF5LHoikUz1CANwKqF0cVcAR6+gSeoY1JaOW5g0IEAlIXpm A/LNaiMDpxktqgTZwlinjx7XleS/cRfCZgg1sY6wxn1KnHCX8xJC5Hv6bniYMSwBEV XlXacFZBN7q3mSwMY9cDUnkRE5ljnafkqXdHVg59t6CzdXmnhVxvXGaJHQ74zKdb92 f0nXKjAOZTULh3bjBIhQ3FTIqyN0SgU00yBsjNl9ahBbot9gq+rcaxH8XdsfUpq8iO pfOYHbD80bwU5gUwZb24N8I7kSTy5Cx1UYtgg2T9oX/YSosDZdQ+Qe2Abcu0FZuTTU 8JK4queHzqiQA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nkBEx-007liY-S9; Thu, 28 Apr 2022 21:59:56 +0100 Date: Thu, 28 Apr 2022 21:59:55 +0100 Message-ID: <87tuac9b5g.wl-maz@kernel.org> From: Marc Zyngier To: Alexandru Elisei Cc: catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com Subject: Re: [PATCH v3 0/5] arm64: Treat ESR_ELx as a 64-bit register In-Reply-To: <20220425114444.368693-1-alexandru.elisei@arm.com> References: <20220425114444.368693-1-alexandru.elisei@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: alexandru.elisei@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_140002_958207_2DE3EDAE X-CRM114-Status: GOOD ( 29.71 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 25 Apr 2022 12:44:39 +0100, Alexandru Elisei wrote: > > The ESR_EL{1,2} registers were originally 32-bit, then were extended to > 64-bit with the upper 32 bits RES0, and in ARM DDI 0487H.a the FEAT_LS64 > feature was added which now makes use of the upper bits. This series aims > to teach Linux to treat it consistently as a 64-bit register with the goal > of making it easier to add support in the future for features that use the > upper 32 bits. > > Patches #1 ("arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly") > and #2 ("arm64: compat: Do not treat syscall number as ESR_ELx for a bad > syscall") are fixes for some minor issues which I found while working on > changing ESR_ELx to 64-bit. > > Patches #3 ("arm64: Treat ESR_ELx as a 64bit register") and #4 ("KVM: > arm64: Treat ESR_EL2 as a 64-bit register") are where the ESR_ELx registers > are changed to 64-bit. I chose to make the KVM changes a separate patch > because KVM prefers to use u64 for the registers. > > And in patch #5 ("KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high") I > add a new field to the user API struct kvm_debug_exit_arch that represents > the higher 32 bits, and a flag to go with it (details in the patch). > > Tested by running ltp for a few hours (minimal changes from the previous > version) and kvm-unit-tests on a rockpro64. > > Changes in v3: > > * Rebased on top of v5.18-rc4 > * Clear kvm_run->flags in kvm_arch_vcpu_ioctl_run() in patch #5 ("KVM: > arm64: uapi: Add kvm_debug_exit_arch.hsr_high") > * Documented KVM_DEBUG_ARCH_HSR_HIGH_VALID. > > Changes in v2: > > * Added the KVM_DEBUG_ARCH_HSR_HIGH_VALID kvm_run flag to patch #5 ("KVM: > arm64: uapi: Add kvm_debug_exit_arch.hsr_high"), and updated the commit > message to match (Marc) > * Rebased on top of v5.18-rc3. > > > Alexandru Elisei (5): > arm64: Make ESR_ELx_xVC_IMM_MASK compatible with assembly > arm64: compat: Do not treat syscall number as ESR_ELx for a bad > syscall > arm64: Treat ESR_ELx as a 64-bit register > KVM: arm64: Treat ESR_EL2 as a 64-bit register > KVM: arm64: uapi: Add kvm_debug_exit_arch.hsr_high > > Documentation/virt/kvm/api.rst | 2 + > arch/arm64/include/asm/debug-monitors.h | 4 +- > arch/arm64/include/asm/esr.h | 8 +-- > arch/arm64/include/asm/exception.h | 28 +++++----- > arch/arm64/include/asm/kvm_emulate.h | 6 +-- > arch/arm64/include/asm/kvm_host.h | 2 +- > arch/arm64/include/asm/kvm_ras.h | 2 +- > arch/arm64/include/asm/system_misc.h | 4 +- > arch/arm64/include/asm/traps.h | 12 ++--- > arch/arm64/include/uapi/asm/kvm.h | 2 + > arch/arm64/kernel/debug-monitors.c | 12 ++--- > arch/arm64/kernel/entry-common.c | 6 +-- > arch/arm64/kernel/fpsimd.c | 6 +-- > arch/arm64/kernel/hw_breakpoint.c | 4 +- > arch/arm64/kernel/kgdb.c | 6 +-- > arch/arm64/kernel/probes/kprobes.c | 4 +- > arch/arm64/kernel/probes/uprobes.c | 4 +- > arch/arm64/kernel/sys_compat.c | 2 +- > arch/arm64/kernel/traps.c | 66 +++++++++++------------ > arch/arm64/kvm/arm.c | 1 + > arch/arm64/kvm/handle_exit.c | 16 +++--- > arch/arm64/kvm/hyp/include/hyp/switch.h | 2 +- > arch/arm64/kvm/hyp/nvhe/sys_regs.c | 2 +- > arch/arm64/kvm/hyp/vgic-v3-sr.c | 4 +- > arch/arm64/kvm/inject_fault.c | 4 +- > arch/arm64/kvm/sys_regs.c | 4 +- > arch/arm64/mm/fault.c | 70 ++++++++++++------------- > 27 files changed, 145 insertions(+), 138 deletions(-) For the series: Reviewed-by: Marc Zyngier Given the scale of the changes, I expect this go be routed via the arm64 tree, but I can also take it if needed. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel