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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2EAFC4708F for ; Wed, 2 Jun 2021 10:45:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C4AAF613B4 for ; Wed, 2 Jun 2021 10:45:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4AAF613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZfFnKBXEHu2+ef+kBaAcxav4wFsIf5Sw/hLqPmqJ6F0=; b=JuWr++wMsPOsUr ig8r24Bm2ilK11jKYxrd12WtSVSL292G7AlWQcEzl7uSgJYjbEKXxfieUp+KTkCt5B8uSbAmHsmBR cgcBdlfalwpL/688k4WxlQn7TAxyoVfp+RsAwXAlSYTThASfJuyjCPAryFoQGkc1tIQ48ZZ6ZUoqV pxePSHO8qnotrtxJEop6CE5fJY5Noz/h3fgJ+6Wf2ryZJQmtK+Defs1mrwrV7B1+zU09YvBicSsZj 8j3rSzjl4REF48MSUT46wqkDld+POlQAZaNAV1e0nqgyw2EixMgyBqB6/16jMtRls5SOVuFygQnPg 1qaqs2VHDUP4vVNlj+Ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loOLo-003QAU-3w; Wed, 02 Jun 2021 10:43:52 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1loOLh-003Q8G-AC for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 10:43:46 +0000 Received: by mail-wm1-x32d.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so1377084wmh.4 for ; Wed, 02 Jun 2021 03:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uetljnpMVagZUL5muUxDZIQ/D9uiCnsyXeZAzCtugkc=; b=S5AMEA55e6WiHfILJvvLPJjjSa/Yq2hHfihL5FLlwc0nkqiEigDVv6zGaQ9Zqw30CZ ZcNArqEE1KLDPi62Lj3DON4XRA4lRQEPl3mkiGXqf1NuzcbVyz2xB5213Beslcbi0VY+ vsODVyRmobfR1fCmUKCnp2nQgPmer3uq6shiln93ca9H6FsgwmDg30qGDQ8d9/7e24Mp CSLPgs6X+XyQ7pC/c2x8ETo1zkBVPUtq9sPOkmehhhoJFv3lhBEv40tvpOSBlEY1/b8H QUE7F5ZbBoi4Gyi+g8C3tw7hkEOfNdrM3DT6aidkaFGmRGF0N81BVxOpbVVxuR5GQeKr JnRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uetljnpMVagZUL5muUxDZIQ/D9uiCnsyXeZAzCtugkc=; b=Qvl3wmmauir5WZqIJyD9udssfP9K5YeRapxt4ajwQ/81e2LcpwG1SpuCpbuaSNN1Tk SjtAivcURmguLM2NMAoRIVIYbkxBZS//8luZjsb+IqL79fL7HTqDpSW+dC+4+d4S0EMk lW+mLANRSD5YKqldNxvjVahYqJuxbtoBrtVAQlF4uzyfUXSaZAVmbAcS/5tsoKjK7WE2 kH6vafi4a2b4K6jINR7vfay0BgYJtfc0mz8d7U1ZkkF0kiHU7GC7LiJwuzXJMh1m26VI 4nfFCDiSdB9lyCAFW2EySfKa6XXhsfrTL6TNPRwaLDal470hC2w43JhDXX7j7vLpx2bU jGew== X-Gm-Message-State: AOAM532wRpWGtTFKb4Mz+eG4kUludvVWkyhxdtB5OR09ZP2y5zByEjdz 89YP7ncaj5y2qGfOJGJSmdf2gA== X-Google-Smtp-Source: ABdhPJwVt/mkHfPZsWQ7XeVPY+TVxGZoc9ruOznSEZgl2V+JcARglYdu24JT3h1Ue3fGnhgc5QDPqA== X-Received: by 2002:a7b:c042:: with SMTP id u2mr30819876wmc.127.1622630623364; Wed, 02 Jun 2021 03:43:43 -0700 (PDT) Received: from google.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id 31sm7003760wrc.96.2021.06.02.03.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 03:43:42 -0700 (PDT) Date: Wed, 2 Jun 2021 10:43:40 +0000 From: Quentin Perret To: Yanan Wang Cc: Marc Zyngier , Will Deacon , Alexandru Elisei , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose , Gavin Shan , wanghaibin.wang@huawei.com, zhukeqian1@huawei.com, yuzenghui@huawei.com Subject: Re: [PATCH v5 1/6] KVM: arm64: Introduce KVM_PGTABLE_S2_GUEST stage-2 flag Message-ID: References: <20210415115032.35760-1-wangyanan55@huawei.com> <20210415115032.35760-2-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210415115032.35760-2-wangyanan55@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_034345_410793_E68543D5 X-CRM114-Status: GOOD ( 13.89 ) 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 Hi Yanan, On Thursday 15 Apr 2021 at 19:50:27 (+0800), Yanan Wang wrote: > diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h > index c3674c47d48c..a43cbe697b37 100644 > --- a/arch/arm64/include/asm/kvm_pgtable.h > +++ b/arch/arm64/include/asm/kvm_pgtable.h > @@ -61,10 +61,12 @@ struct kvm_pgtable_mm_ops { > * @KVM_PGTABLE_S2_NOFWB: Don't enforce Normal-WB even if the CPUs have > * ARM64_HAS_STAGE2_FWB. > * @KVM_PGTABLE_S2_IDMAP: Only use identity mappings. > + * @KVM_PGTABLE_S2_GUEST: Whether the page-tables are guest stage-2. > */ > enum kvm_pgtable_stage2_flags { > KVM_PGTABLE_S2_NOFWB = BIT(0), > KVM_PGTABLE_S2_IDMAP = BIT(1), > + KVM_PGTABLE_S2_GUEST = BIT(2), Assuming that we need this flag (maybe not given Marc's suggestion on another patch), I'd recommend re-naming it to explain _what_ it does, rather than _who_ is using it. That's the principle we followed for e.g. KVM_PGTABLE_S2_IDMAP, so we should be consistent here as well. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel