]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
KVM: use slowpath for cross page cached accesses
authorRadim Krčmář <rkrcmar@redhat.com>
Wed, 8 Apr 2015 12:16:48 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:39 +0000 (22:03 +0200)
commit15254fde3f5d723bd591a73d88296e9aecdd6bb7
tree438c25fe706bd9aa556b5804fffeb6aade0cb2be
parent654de1f9fd289e10a3de1daf0806051f05f57d92
KVM: use slowpath for cross page cached accesses

commit ca3f0874723fad81d0c701b63ae3a17a408d5f25 upstream.

kvm_write_guest_cached() does not mark all written pages as dirty and
code comments in kvm_gfn_to_hva_cache_init() talk about NULL memslot
with cross page accesses.  Fix all the easy way.

The check is '<= 1' to have the same result for 'len = 0' cache anywhere
in the page.  (nr_pages_needed is 0 on page boundary.)

Fixes: 8f964525a121 ("KVM: Allow cross page reads and writes from cached translations.")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Message-Id: <20150408121648.GA3519@potion.brq.redhat.com>
Reviewed-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/kvm_main.c