Skip to content

Commit a4d5ca5

Browse files
YananWang-hubMarc Zyngier
authored andcommitted
KVM: arm64: Introduce mm_ops member for structure stage2_attr_data
Also add a mm_ops member for structure stage2_attr_data, since we will move I-cache maintenance for guest stage-2 to the permission path and as a result will need mm_ops for some callbacks. Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Yanan Wang <wangyanan55@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210617105824.31752-3-wangyanan55@huawei.com
1 parent 6204004 commit a4d5ca5

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

arch/arm64/kvm/hyp/pgtable.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,11 @@ int kvm_pgtable_stage2_unmap(struct kvm_pgtable *pgt, u64 addr, u64 size)
861861
}
862862

863863
struct stage2_attr_data {
864-
kvm_pte_t attr_set;
865-
kvm_pte_t attr_clr;
866-
kvm_pte_t pte;
867-
u32 level;
864+
kvm_pte_t attr_set;
865+
kvm_pte_t attr_clr;
866+
kvm_pte_t pte;
867+
u32 level;
868+
struct kvm_pgtable_mm_ops *mm_ops;
868869
};
869870

870871
static int stage2_attr_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
@@ -903,6 +904,7 @@ static int stage2_update_leaf_attrs(struct kvm_pgtable *pgt, u64 addr,
903904
struct stage2_attr_data data = {
904905
.attr_set = attr_set & attr_mask,
905906
.attr_clr = attr_clr & attr_mask,
907+
.mm_ops = pgt->mm_ops,
906908
};
907909
struct kvm_pgtable_walker walker = {
908910
.cb = stage2_attr_walker,

0 commit comments

Comments
 (0)