Skip to content

Commit 5879c97

Browse files
willdeaconMarc Zyngier
authored andcommitted
KVM: arm64: Remove redundant hyp_assert_lock_held() assertions
host_stage2_try() asserts that the KVM host lock is held, so there's no need to duplicate the assertion in its wrappers. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 112f3ba commit 5879c97

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/arm64/kvm/hyp/nvhe/mem_protect.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,11 @@ static int host_stage2_adjust_range(u64 addr, struct kvm_mem_range *range)
314314
int host_stage2_idmap_locked(phys_addr_t addr, u64 size,
315315
enum kvm_pgtable_prot prot)
316316
{
317-
hyp_assert_lock_held(&host_kvm.lock);
318-
319317
return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot);
320318
}
321319

322320
int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id)
323321
{
324-
hyp_assert_lock_held(&host_kvm.lock);
325-
326322
return host_stage2_try(kvm_pgtable_stage2_set_owner, &host_kvm.pgt,
327323
addr, size, &host_s2_pool, owner_id);
328324
}

0 commit comments

Comments
 (0)