mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ANDROID: KVM: arm64: Pass the pagetable struct as an argument to the freewalker
Extend the scope of the stage2_freewalker by passing the pgt instead of the mm_ops callbacks. This will later be used by the stage2_pte_is_counted function. Bug: 222044487 Signed-off-by: Sebastian Ene <sebastianene@google.com> Change-Id: I390661eb106cbdb863cbb1832e39ec155c439091
This commit is contained in:
@@ -1201,7 +1201,8 @@ static int stage2_free_walker(u64 addr, u64 end, u32 level, kvm_pte_t *ptep,
|
||||
enum kvm_pgtable_walk_flags flag,
|
||||
void * const arg)
|
||||
{
|
||||
struct kvm_pgtable_mm_ops *mm_ops = arg;
|
||||
struct kvm_pgtable *pgt = arg;
|
||||
struct kvm_pgtable_mm_ops *mm_ops = pgt->mm_ops;
|
||||
kvm_pte_t pte = *ptep;
|
||||
|
||||
if (!stage2_pte_is_counted(pte))
|
||||
@@ -1222,7 +1223,7 @@ void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt)
|
||||
.cb = stage2_free_walker,
|
||||
.flags = KVM_PGTABLE_WALK_LEAF |
|
||||
KVM_PGTABLE_WALK_TABLE_POST,
|
||||
.arg = pgt->mm_ops,
|
||||
.arg = pgt,
|
||||
};
|
||||
|
||||
WARN_ON(kvm_pgtable_walk(pgt, 0, BIT(pgt->ia_bits), &walker));
|
||||
|
||||
Reference in New Issue
Block a user