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 D5AA6D74959 for ; Thu, 31 Oct 2024 13:14: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=od2LeehlXS2GZ42RQUFqe/52Py9b7ahlFAxHc+LKVfQ=; b=yIvftsaPuVN06vuWRxLxLXwe9r vEhPKNOSjuCx2r7TdHQla9xn5kfrhDkpn0S4Ty+OafAlxYVpTP/jcNh4sIDmmJox2p7X7WOD6tqOb Hpn1VP24uWW10Ookq14+7JqUQgNv+TKExr93ovbiWOpre2G7zzeuqFAeZopVjo6A70G4QL2eeeWxg uBCs2Obv+ifXv4nihiS885UPS3/11tAKCaviu42xhJCv1SAoLxbjHZi8OaxtV09hVEzfvo7Az4uNL WzzPFC0g6MLEAbKLoremCJdpzqk3jY/H3UDRwXcl07XBmrdbRnub9vekOk2EdLKV2GP/sma0kyGA5 ZvlE3b6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6V0R-00000003emd-0oNb; Thu, 31 Oct 2024 13:14:31 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6Uwo-00000003e2C-3tQp for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 13:10:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E6165A437F0; Thu, 31 Oct 2024 13:08:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21AF2C4FEA5; Thu, 31 Oct 2024 13:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730380240; bh=oCQiTJLRfPp/6kPFjAHkgEl5HJsM0xhf/6uOgNP0GPg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Klt25/4fLBa+ebQ48URjP1Bl5DC4C2QXhEVRMI7tAq8dXgtymsVOogxOZU5l3ewjy jcuN9l+iXIArQK6Qc+2QXaoFOh0iq7hzThGWCCVwsr9JfR0Wfdb9z4lUofCb01WQ4M KBJN6ivvgEc5SOokNIvFzd/ex3JiM8kBc8XHMLOU1BiYhBSPClB+wHTWKBxcPzs0Ga FWKw9pabfgD5vkMxCHypLRTpIFN5NfkCcJPLUPELXWaUpQraqiZWvrn/6YOiEiup4U xR068vDSFN29ktWMKNPUz5MahwG+ue7GXdkMUB4g3C6LaLWtJff9cOc5WqcMn4Zx7w QZ6SzL1VHDSFQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t6Uwf-008ZOj-Sr; Thu, 31 Oct 2024 13:10:37 +0000 Date: Thu, 31 Oct 2024 13:10:37 +0000 Message-ID: <86ttcs1kqa.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, anshuman.khandual@arm.com, gshan@redhat.com, james.morse@arm.com, shameerali.kolothum.thodi@huawei.com, Oliver Upton , Suzuki K Poulose , Zenghui Yu , Jing Zhang , Catalin Marinas , Will Deacon Subject: Re: [PATCH v6 5/7] KVM: arm64: Add a macro for creating filtered sys_reg_descs entries In-Reply-To: <20241030160317.2528209-6-joey.gouly@arm.com> References: <20241030160317.2528209-1-joey.gouly@arm.com> <20241030160317.2528209-6-joey.gouly@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/29.4 (aarch64-unknown-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: joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, anshuman.khandual@arm.com, gshan@redhat.com, james.morse@arm.com, shameerali.kolothum.thodi@huawei.com, oliver.upton@linux.dev, suzuki.poulose@arm.com, yuzenghui@huawei.com, jingzhangos@google.com, catalin.marinas@arm.com, will@kernel.org 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-20241031_061047_190334_8CE9575B X-CRM114-Status: GOOD ( 18.70 ) 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 On Wed, 30 Oct 2024 16:03:15 +0000, Joey Gouly wrote: > > From: James Morse > > The sys_reg_descs array holds function pointers and reset value for > managing the user-space and guest view of system registers. These > are mostly created by a set of macro's as only some combinations > of behaviour are needed. > > If a register needs special treatment, its sys_reg_descs entry is > open-coded. This is true of some id registers where the value provided > by user-space is validated by some helpers. > > Before adding another one of these, add a helper that covers the > existing special cases. 'ID_FILTERED' expects helpers to set the > user-space value, and retrieve the modified reset value. > > Like ID_WRITABLE() this uses id_visibility(), which should have no functional > change for the registers converted to use ID_FILTERED(). > > read_sanitised_id_aa64dfr0_el1() and read_sanitised_id_aa64pfr0_el1() have been > refactored to be called kvm_read_sanitised_id_reg(), to try be consistent with nit: called *from*? > ID_WRITABLE(). > > Signed-off-by: James Morse > Signed-off-by: Joey Gouly > Reviewed-by: Gavin Shan > Tested-by: Shameer Kolothum Thanks, M. -- Without deviation from the norm, progress is not possible.