target-s390x: use softmmu functions for mvcp/mvcs
commita3084e8055067b3fe8ed653a609021d2ab368564
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 3 Jun 2015 21:09:55 +0000 (3 23:09 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 4 Jun 2015 23:37:59 +0000 (5 01:37 +0200)
treef892dc648ad60b670fefc7219f039b351b7fa42e
parentc255ac601231e8c53007e10d640722ac58eb77cc
target-s390x: use softmmu functions for mvcp/mvcs

mvcp and mvcs helper get access to the physical memory by a call to
mmu_translate for the virtual to real conversion and then using ldb_phys
and stb_phys to physically access the data. In practice this is quite
slow because it bypasses the QEMU softmmu TLB and because stb_phys calls
try to invalidate the corresponding memory for each access.

Instead use cpu_ldb_{primary,secondary} for the loads and
cpu_stb_{primary,secondary} for the stores. Ideally this should be
further optimized by a call to memcpy, but that already improves the
boot time of a guest by a factor 1.8.

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