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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 482BAC04A95 for ; Wed, 28 Sep 2022 10:40:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 8CDD84B62E; Wed, 28 Sep 2022 06:40:12 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SKQ2jEsZQV8T; Wed, 28 Sep 2022 06:40:11 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 626634B5DB; Wed, 28 Sep 2022 06:40:11 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9184E40FB2 for ; Wed, 28 Sep 2022 06:40:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z15XX4o3An8Y for ; Wed, 28 Sep 2022 06:40:09 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 5270E40DE6 for ; Wed, 28 Sep 2022 06:40:09 -0400 (EDT) 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 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 Cc: Catalin Marinas , LKML , Will Deacon , "moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 \(KVM/arm64\)" , Linux ARM X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm