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 173CCC32771 for ; Wed, 28 Sep 2022 10:41:07 +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=TkyylCxbedsn+fRdztxh4yW0yUz57xu530xZctOwZUA=; b=AqJVzyXmR4bto2 OldXT/J6JdGeWZ/i7pFyYtK6zkPvugXQ7DW1YgsIj+zfMoDytSokaccTReAiAfpgRZXckIJJDcn9O A//l2tr3GnJSRKWmfLhrw7r5FB4tku5v2jSasxghoGp/ZbIUQgtGinQRGoUAamwQ95tM8vzdOhw9I kpcGb4nfUveD/pVHs/6dZQPenCO+FffotmzTkGK6Fvn1/6RPhHu2SD7BhZegh2EvhbFfhC5mrVIrD JkKH8XjYdPJ60dnK1mDPM5+vCeT7VY8BhUCwKHTb8bk9p9Azc3IzA0XYlN376dwRDk/F6nvHhDQC7 ZZiFFgEakF9eS/P1bNlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odUU9-00Fgq6-4g; Wed, 28 Sep 2022 10:40:13 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odUU5-00Fgo6-Gq for linux-arm-kernel@lists.infradead.org; Wed, 28 Sep 2022 10:40:11 +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 98A66B82023; Wed, 28 Sep 2022 10:40:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57F45C433C1; Wed, 28 Sep 2022 10:40:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664361606; bh=3OlAOaBEucQdk6L8MDDnhqGqP1Abnek8vfO+0TZSSqM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=o/aX5kL6a1a7qgG9wFBeAX7p0tkKi3ubcDkLHi+moH4yxN9TfMTEuD/9eDq08aqs7 url400grUoEe4eyQOHVIy+FiB7dAmab8EwRShiQ+M8nYDqXokCTnBZX2sKWjLsR2h7 r/b8wyMc0PvCr2gu/zQtGc+SbN6Uh7rPhOmvBIVMV2vObrtxbCo/8jiEul9GOcMbRc Fts+ysARw97B8+jichqAu/n1FLjLe8dWiVZnK/QJT9ddcCaLiUcLo77hK2Y8cojU2v ntKcOUbiU87sFovAD5VuMq7/plLoY0jyaYcAm18feTDwQWhmvS0QD2l51SyMJrG/mM Eg189wdkfu3qg== 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 1odUU0-00DFSl-5o; Wed, 28 Sep 2022 11:40:04 +0100 Date: Wed, 28 Sep 2022 06:40:03 -0400 Message-ID: <86pmff7pfg.wl-maz@kernel.org> From: Marc Zyngier To: Mingwei Zhang Cc: Oliver Upton , Catalin Marinas , Will Deacon , James Morse , Alexandru Elisei , Suzuki K Poulose , Linux ARM , "moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , LKML Subject: Re: [PATCH] KVM: arm64: Cleanup the __get_fault_info() to take out the code that validates HPFAR In-Reply-To: References: <20220927002715.2142353-1-mizhang@google.com> <86zgel6rz8.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 (aarch64-unknown-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: mizhang@google.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.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-20220928_034009_895386_7F7C39AC X-CRM114-Status: GOOD ( 27.92 ) 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 Mingwei, On Tue, 27 Sep 2022 13:48:52 -0400, Mingwei Zhang wrote: > > > > > Honestly, I'd refrain from such changes *unless* they enable something > > else. The current code is well understood by people hacking on it, and > > although I don't mind revamping it, it has to be for a good reason. > > > > I'd be much more receptive to such a change if it was a prefix to > > something that actually made a significant change. > > > > Thanks, > > > > M. > > > Hi Marc, > > Thanks for the feedback. I am not sure about the style of the KVM ARM > side. But in general I think mixing the generic code for ARM and > specific CPU errata handling is misleading. For instance, in this > case: > > + if ((esr & ESR_ELx_FSC_TYPE) == FSC_PERM) > + return false; > + > + if (cpus_have_final_cap(ARM64_WORKAROUND_834220)) > + return false; > > As shown it would be much cleaner to separate the two cases as the > former case is suggested in ARMv8 Spec D13.2.55. The latter case would > definitely come from a different source. I think we're talking at cross purposes. I don't object to the change per se. I simply question its value *in isolation*. One of the many things that makes the kernel hard to maintain is churn. Refactoring just for the sake of it *is* churn. In this case, cosmetic churn. But if you make this is part of something touching this area and improving things from a functional perspective, then I'll happily merge it. 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