Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Yanan Wang and committed by
Marc Zyngier
a4d5ca5c 6204004d

+6 -4
+6 -4
arch/arm64/kvm/hyp/pgtable.c
··· 861 861 } 862 862 863 863 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; 868 869 }; 869 870 870 871 static int stage2_attr_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep, ··· 904 903 struct stage2_attr_data data = { 905 904 .attr_set = attr_set & attr_mask, 906 905 .attr_clr = attr_clr & attr_mask, 906 + .mm_ops = pgt->mm_ops, 907 907 }; 908 908 struct kvm_pgtable_walker walker = { 909 909 .cb = stage2_attr_walker,