[RFC PATCH v2 2/8] KVM: arm64: Add KVM_PGTABLE_WALK_HW_DBM for HW DBM support
Oliver Upton
oliver.upton at linux.dev
Fri Sep 15 15:05:34 PDT 2023
Hi Shameer,
On Fri, Aug 25, 2023 at 10:35:22AM +0100, Shameer Kolothum wrote:
> KVM_PGTABLE_WALK_HW_DBM - Indicates page table walk is for HW DBM
> related updates.
>
> No functional changes here. Only apply any HW DBM bit updates to last
> level only. These will be used by a future commit where we will add
> support for HW DBM.
>
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi at huawei.com>
> ---
> arch/arm64/include/asm/kvm_pgtable.h | 3 +++
> arch/arm64/kvm/hyp/pgtable.c | 10 ++++++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/asm/kvm_pgtable.h
> index d3e354bb8351..3f96bdd2086f 100644
> --- a/arch/arm64/include/asm/kvm_pgtable.h
> +++ b/arch/arm64/include/asm/kvm_pgtable.h
> @@ -219,6 +219,8 @@ typedef bool (*kvm_pgtable_force_pte_cb_t)(u64 addr, u64 end,
> * @KVM_PGTABLE_WALK_SKIP_CMO: Visit and update table entries
> * without Cache maintenance
> * operations required.
> + * @KVM_PGTABLE_WALK_HW_DBM: Indicates that the attribute update is
> + * HW DBM related.
> */
> enum kvm_pgtable_walk_flags {
> KVM_PGTABLE_WALK_LEAF = BIT(0),
> @@ -228,6 +230,7 @@ enum kvm_pgtable_walk_flags {
> KVM_PGTABLE_WALK_HANDLE_FAULT = BIT(4),
> KVM_PGTABLE_WALK_SKIP_BBM_TLBI = BIT(5),
> KVM_PGTABLE_WALK_SKIP_CMO = BIT(6),
> + KVM_PGTABLE_WALK_HW_DBM = BIT(7),
> };
Rather than making this DBM specific, call it KVM_PGTABLE_WALK_FORCE_PTE
and get rid of stage2_map_data::force_pte. Then it becomes immediately
obvious what this flag implies.
--
Thanks,
Oliver
More information about the linux-arm-kernel
mailing list