Skip to content

Commit 2713532

Browse files
Dmytro Malukacxdong
authored andcommitted
SQUASHME: pKVM: x86: Use host_mmu_pte_prot() in host_mmu_map()
Fixes: e365103 ("pKVM: x86: Remove pkvm_host_mmu_map/unmap") Signed-off-by: Dmytro Maluka <dmaluka@google.com>
1 parent 13ca916 commit 2713532

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

arch/x86/kvm/pkvm/mmu.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,9 @@ static int fix_host_mmu_pgstate(void)
338338

339339
static int host_mmu_map(unsigned long phys, unsigned long size, bool mmio)
340340
{
341-
u64 prot = host_mmu.pgt_ops->calc_pte_perm(true, true, true) |
342-
host_mmu.pgt_ops->calc_pte_memtype(mmio);
343-
344341
/* The vaddr == phys for the host MMU */
345-
return pkvm_pgtable_map(&host_mmu, phys, phys, size, prot);
342+
return pkvm_pgtable_map(&host_mmu, phys, phys, size,
343+
host_mmu_pte_prot(mmio));
346344
}
347345

348346
int pkvm_hyp_mmu_init(void *pool_base, unsigned long pool_pages)

0 commit comments

Comments
 (0)