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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36C75C433EF for ; Mon, 1 Nov 2021 10:21:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CAB060F70 for ; Mon, 1 Nov 2021 10:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbhKAKYA (ORCPT ); Mon, 1 Nov 2021 06:24:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbhKAKX7 (ORCPT ); Mon, 1 Nov 2021 06:23:59 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77EDF60EFF; Mon, 1 Nov 2021 10:21:26 +0000 (UTC) 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 1mhURQ-002qIs-AA; Mon, 01 Nov 2021 10:21:24 +0000 Date: Mon, 01 Nov 2021 10:21:23 +0000 Message-ID: <87bl349nx8.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Andrew Jones , Peter Shier , Ricardo Koller , Reiji Watanabe Subject: Re: [PATCH 3/3] KVM: arm64: Raise KVM's reported debug architecture to v8.2 In-Reply-To: References: <20211029003202.158161-1-oupton@google.com> <20211029003202.158161-4-oupton@google.com> <87k0hw9iez.wl-maz@kernel.org> 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") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oupton@google.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, james.morse@arm.com, Alexandru.Elisei@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, drjones@redhat.com, pshier@google.com, ricarkol@google.com, reijiw@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, 29 Oct 2021 19:18:13 +0100, Oliver Upton wrote: > > Hey Marc, > > On Fri, Oct 29, 2021 at 4:31 AM Marc Zyngier wrote: > > > > On Fri, 29 Oct 2021 01:32:02 +0100, > > Oliver Upton wrote: > [...] > > > case SYS_ID_AA64DFR0_EL1: > > > - /* Limit debug to ARMv8.0 */ > > > + /* Limit debug to ARMv8.2 */ > > > val &= ~ARM64_FEATURE_MASK(ID_AA64DFR0_DEBUGVER); > > > - val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64DFR0_DEBUGVER), 6); > > > + val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64DFR0_DEBUGVER), 8); > > > + > > > + /* Hide DoubleLock from guests */ > > > + val &= ~ARM64_FEATURE_MASK(ID_AA64DFR0_DOUBLELOCK); > > > + val |= FIELD_PREP(ARM64_FEATURE_MASK(ID_AA64DFR0_DOUBLELOCK), 0CF); > > > + > > > > One issue with that is that this will break migration from an older > > kernel (DFR0 will be different between source and destination). > > > > You'll need a set_user handler and deal with it in a similar way to > > CSV2/CSV3. > > Yeah, definitely so. In that case, unless we're strongly motivated to > expose these changes soon, I'll just punt the ID register changes > until Reiji's series [1] lands, as anything I add for a writable DFR0 > will invariably be scrapped in favor of his work. Yeah, I think that's a sensible thing to do. I need to find the bandwidth to look into these patches... > I'll post v2 of this series folding in your feedback (thx for quick > review, btw), less this patch. Thanks, M. -- Without deviation from the norm, progress is not possible.