[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLdg3K6m0P+cis2P@google.com>
Date: Wed, 2 Jun 2021 10:43:40 +0000
From: Quentin Perret <qperret@...gle.com>
To: Yanan Wang <wangyanan55@...wei.com>
Cc: Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>,
Alexandru Elisei <alexandru.elisei@....com>,
kvmarm@...ts.cs.columbia.edu, linux-arm-kernel@...ts.infradead.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Catalin Marinas <catalin.marinas@....com>,
James Morse <james.morse@....com>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Gavin Shan <gshan@...hat.com>, wanghaibin.wang@...wei.com,
zhukeqian1@...wei.com, yuzenghui@...wei.com
Subject: Re: [PATCH v5 1/6] KVM: arm64: Introduce KVM_PGTABLE_S2_GUEST
stage-2 flag
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
Powered by blists - more mailing lists