KVM: Allow cross page reads and writes from cached translations.
authorAndrew Honig <ahonig@google.com>
Fri, 29 Mar 2013 16:35:21 +0000 (09:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Apr 2013 04:19:55 +0000 (21:19 -0700)
commit2a6b0247eee46f424e032fb7431cc4700ad19ea5
tree99660b47a9ccc8e1123f4363ca0a95875a7f7ea6
parentf56d137aa68f8edadac247aa48b335f2776954ff
KVM: Allow cross page reads and writes from cached translations.

commit 8f964525a121f2ff2df948dac908dcc65be21b5b upstream.

This patch adds support for kvm_gfn_to_hva_cache_init functions for
reads and writes that will cross a page.  If the range falls within
the same memslot, then this will be a fast operation.  If the range
is split between two memslots, then the slower kvm_read_guest and
kvm_write_guest are used.

Tested: Test against kvm_clock unit tests.

Signed-off-by: Andrew Honig <ahonig@google.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c
include/linux/kvm_host.h
include/linux/kvm_types.h
virt/kvm/kvm_main.c