lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2021-06-02 12:44    [W:1.252 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site