summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2014-03-28 14:25:19 +0000
committerChristoffer Dall <christoffer.dall@linaro.org>2014-04-28 03:21:48 -0700
commit5d4e08c45a6cf8f1ab3c7fa375007635ac569165 (patch)
treedcdab60be89d96865d9d375f7dcb076cfe67bdf7 /virt/kvm
parent4e4468fac4381b92eb333d94256e7fb8350f3de3 (diff)
downloadlinux-stable-5d4e08c45a6cf8f1ab3c7fa375007635ac569165.tar.gz
linux-stable-5d4e08c45a6cf8f1ab3c7fa375007635ac569165.tar.bz2
linux-stable-5d4e08c45a6cf8f1ab3c7fa375007635ac569165.zip
arm: KVM: fix possible misalignment of PGDs and bounce page
The kvm/mmu code shared by arm and arm64 uses kalloc() to allocate a bounce page (if hypervisor init code crosses page boundary) and hypervisor PGDs. The problem is that kalloc() does not guarantee the proper alignment. In the case of the bounce page, the page sized buffer allocated may also cross a page boundary negating the purpose and leading to a hang during kvm initialization. Likewise the PGDs allocated may not meet the minimum alignment requirements of the underlying MMU. This patch uses __get_free_page() to guarantee the worst case alignment needs of the bounce page and PGDs on both arm and arm64. Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Mark Salter <msalter@redhat.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions