Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1332162rwb; Tue, 27 Sep 2022 11:28:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zAdF7aqU9UfsAE9VKto03mnyH/IrZYEmXfRgijaELT77BEOF6cXGNwDYNuVfsXGUl3O/h X-Received: by 2002:a05:6a00:2385:b0:544:c42d:8a72 with SMTP id f5-20020a056a00238500b00544c42d8a72mr30777282pfc.84.1664303316109; Tue, 27 Sep 2022 11:28:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664303316; cv=none; d=google.com; s=arc-20160816; b=KFwHm7ZG/I3usaQ3n0X/C85D2zg7G5qaYMrrPsGHLRit99Dwr+od1vlCvtJ2QAWUYi 3Sq/piH3pf8TRB6As5lDJ/5WBQv0xG4/7fB8MrSVaZTIu01Vd11F/iKp0S/7NJzqQuN0 XbDiRVrNuSbOFgepiIjxDz/qMjqPfizinRJ+6jlifqf9hByqRvZ/vDRB1fmvn4FwCWKW XNG1TTv/EzyJkmh+UZhFE3VRpBdjVxTD2HzEzZvY9IUoZ7OMFCX1ZDEaMFZbhpFUSoSU h+vFyPkim9leSUsce1szNksq9SmrVGirXGknVqDwIZUDAF9YLyCHqXly69vPVe45lABt KzwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zwWYKbkkIMXnui5gCfkJ00LzKXpPlaBP/wjajc/qT2s=; b=lRXYx3Xncf6NEe9ZmVnts25/qxphdhixey+IRvEgJqAljiRI3yy+1fO09VekfRy3qo 9o04Y+UHUgGEIfuszdGSyMZu4wb5c1wXHaOpNTXSZ0ngRkCLHrbw8yfA24x5zJEfzpIO Dg9HWYHdaeP2/6TAbXS8dGSkwTalSpGjVEe3Q/dBnyCTvANHg3wJcdJBuaKnJCAXCKWe 7Uwsmk1kXt/xYD/KpJWMPvjLf02Ypu64QY6lxZh7KaBJBuWw71tTxazV/BJVM5SNvwT9 Av8Y7nb8H3MocYwJTun0qjKIDmypw1OWWxiSfulwtytb45w0vNYo+sl7mEjkyviOyG7D ATlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=syVso9JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020aa788ce000000b00536c198ca83si142238pff.15.2022.09.27.11.28.22; Tue, 27 Sep 2022 11:28:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=syVso9JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233195AbiI0Rjq (ORCPT + 99 others); Tue, 27 Sep 2022 13:39:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233157AbiI0Rix (ORCPT ); Tue, 27 Sep 2022 13:38:53 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4961F1E2747 for ; Tue, 27 Sep 2022 10:38:35 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id b23so8341712iof.2 for ; Tue, 27 Sep 2022 10:38:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=zwWYKbkkIMXnui5gCfkJ00LzKXpPlaBP/wjajc/qT2s=; b=syVso9JR6664/0/8mv5Q0ETYytR/HniKXmKiH3T1jW5szdgBIeR6jrNwGL0FX2LiCm F4PGCPVRtW9j/nghuwf+gEtj2HzOLg+ajhiadpCHFepcUySHBDw2v1zsD7VzKKvJxyo4 CL0j58elRqrDEmDWTSJecNQ6lX5TKYckWqFOa9PxrRmeg0dSBR+rT2vYjCYMUkI4txut M0c/TqRHQG+mjav8eL5QgGwTx/qw47Uz3bLYSGQHC8RyeTK0oJq1VjBWksj3kJx9zPFL IIt160iugt34uDrqxE1tX48P9LKN3c+EWbH/SIMBl1Vc4zDimqX1nWXB3R5IU8y84mDc Gymg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=zwWYKbkkIMXnui5gCfkJ00LzKXpPlaBP/wjajc/qT2s=; b=oN4Agqs9aYFGgu2Jlpod71N7eOSiccWc1TfPKe9Wg0VQzdlpDfqAMh6Oc88QZhcKig gVc/1v278HTfgf17nifKQBQ4xouWTHY3UuzWrEw2E+9yLZQLaZELN6Jevp0TeMYkHeAo mJG36XzDu5bokRMF+gE/lijNNerol6IKBaR/v1JPbhf9E1NmkPN8aJ2xiNsUoJuR6ze2 fdP6yRYrKP7Lh2vft4OV6xwyvGBuQ2dYzLTWb0mGkk+Ibw7fLbRD68ioQcJJp6C8HXBI NaUvi3oQlbgGnFiq41de84pDIJgDTBlz8l9spav2anyVqlLR632Vel4W9kzcb3mWkXow itaQ== X-Gm-Message-State: ACrzQf3WSMozp3AcMOLg6XYXz6NbfoJT5Y8I6jJ+72dHvjFGom0OmEY9 1JoFGD2A1VCH7WpakEOEKgTICiRSfcNzMLnaxbCHDT5+YXA= X-Received: by 2002:a05:6638:4184:b0:35a:3eb4:f932 with SMTP id az4-20020a056638418400b0035a3eb4f932mr15108246jab.216.1664300314532; Tue, 27 Sep 2022 10:38:34 -0700 (PDT) MIME-Version: 1.0 References: <20220927002715.2142353-1-mizhang@google.com> In-Reply-To: From: Mingwei Zhang Date: Tue, 27 Sep 2022 10:38:22 -0700 Message-ID: Subject: Re: [PATCH] KVM: arm64: Cleanup the __get_fault_info() to take out the code that validates HPFAR To: Reiji Watanabe Cc: Marc Zyngier , Catalin Marinas , Will Deacon , LKML , "moderated list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , Linux ARM Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static inline bool __hpfar_is_valid(u64 esr) > > Unlike what the name implies, this function returns true for some > cases that HPFAR is not valid (i.e. SEA). I think the function > returns true when KVM doesn't need HPFAR, or when HPFAR is valid. > IMHO the name might be a bit misleading, although I don't have > a good name for this. It would be nice to state that in the > comment at least. > > Thank you, > Reiji > Yeah, I agree with you Reiji that the name does not reflect the meaning of the function. So I was thinking about other names like __translate_hpfar_to_far_needed().