]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Fix idmap size and alignment
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 12 Mar 2018 14:25:10 +0000 (14:25 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 13:04:17 +0000 (13:04 +0000)
commit0ceb885468242eaf8c5fbdc039ec6d6ed6fd931c
treef4a777adab64a7572f270695ca7d0f9de7948a30
parentd87b9957870b1118162bafb8ed50c8dcff14aa9e
KVM: arm/arm64: Fix idmap size and alignment

Although the idmap section of KVM can only be at most 4kB and
must be aligned on a 4kB boundary, the rest of the code expects
it to be page aligned. Things get messy when tearing down the
HYP page tables when PAGE_SIZE is 64K, and the idmap section isn't
64K aligned.

Let's fix this by computing aligned boundaries that the HYP code
will use.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: James Morse <james.morse@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/mmu.c