mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
Revert "ANDROID: KVM: arm64: Avoid BBM when changing only s/w bits in Stage-2 PTE"
This reverts commit 233f0df2b1.
Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: If70acbf8ec01efb259ba9874ab4f38766694f16f
This commit is contained in:
@@ -744,13 +744,6 @@ static int stage2_map_walker_try_leaf(u64 addr, u64 end, u32 level,
|
||||
if (!stage2_pte_needs_update(old, new))
|
||||
return -EAGAIN;
|
||||
|
||||
/*
|
||||
* If we're only changing software bits, then we don't need to
|
||||
* do anything else/
|
||||
*/
|
||||
if (!((old ^ new) & ~KVM_PTE_LEAF_ATTR_HI_SW))
|
||||
goto out_set_pte;
|
||||
|
||||
stage2_put_pte(ptep, data->mmu, addr, level, mm_ops);
|
||||
}
|
||||
|
||||
@@ -762,11 +755,9 @@ static int stage2_map_walker_try_leaf(u64 addr, u64 end, u32 level,
|
||||
if (mm_ops->icache_inval_pou && stage2_pte_executable(new))
|
||||
mm_ops->icache_inval_pou(kvm_pte_follow(new, mm_ops), granule);
|
||||
|
||||
smp_store_release(ptep, new);
|
||||
if (stage2_pte_is_counted(new))
|
||||
mm_ops->get_page(ptep);
|
||||
|
||||
out_set_pte:
|
||||
smp_store_release(ptep, new);
|
||||
if (kvm_phys_is_valid(phys))
|
||||
data->phys += granule;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user