summaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa2011-05-07 09:31:36 +0200
committerAvi Kivity2011-05-22 14:47:54 +0200
commit12cb814f3bb35736420cc6bfc9fed7b6a9d3a828 (patch)
tree86371ff3cc2a2e9e08211cd20c464b8efbabb1d6 /lib/genalloc.c
parentKVM: PPC: booke: add sregs support (diff)
downloadkernel-qcow2-linux-12cb814f3bb35736420cc6bfc9fed7b6a9d3a828.tar.gz
kernel-qcow2-linux-12cb814f3bb35736420cc6bfc9fed7b6a9d3a828.tar.xz
kernel-qcow2-linux-12cb814f3bb35736420cc6bfc9fed7b6a9d3a828.zip
KVM: MMU: Clean up gpte reading with copy_from_user()
When we optimized walk_addr_generic() by not using the generic guest memory reader, we replaced copy_from_user() with get_user(): commit e30d2a170506830d5eef5e9d7990c5aedf1b0a51 KVM: MMU: Optimize guest page table walk commit 15e2ac9a43d4d7d08088e404fddf2533a8e7d52e KVM: MMU: Fix 64-bit paging breakage on x86_32 But as Andi pointed out later, copy_from_user() does the same as get_user() as long as we give a constant size to it. So we use copy_from_user() to clean up the code. The only, noticeable, regression introduced by this is 64-bit gpte reading on x86_32 hosts needed for PAE guests. But this can be mitigated by implementing 8-byte get_user() for x86_32, if needed. Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions