OSDN Git Service

target-s390x: mvc_fast_memmove: access memory through softmmu
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 12 Jun 2015 22:45:52 +0000 (00:45 +0200)
committerAlexander Graf <agraf@suse.de>
Wed, 17 Jun 2015 10:40:51 +0000 (12:40 +0200)
commit6da528d14de29138ca5ac43d6d059889dd24f464
tree7357ac9ac39318f526c08fbcd35d136b2d3ba5c1
parentfc89efe693278c79273f3bbf6b581e8a749c85b0
target-s390x: mvc_fast_memmove: access memory through softmmu

mvc_fast_memmove is bypassing the softmmu functions, getting the
physical source and destination addresses using the mmu_translate
function and accessing the corresponding physical memory. This
prevents watchpoints to work correctly.

Instead use the tlb_vaddr_to_host function to get the host addresses
corresponding to the guest source and destination addresses through the
softmmu code and fallback to the byte level code in case the
corresponding address are not in the QEMU TLB or being examined through
a watchpoint. As a bonus it works even for area crossing pages by
splitting the are into chunks contained in a single page, bringing some
performances improvements. We can therefore remove the 8-byte
loads/stores method, as it is now quite unlikely to be used.

At the same time change the name of the function to fast_memmove as it's
not specific to mvc and use the same argument order as the C memmove
function.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/mem_helper.c