memory: try to inline constant-length reads
commit3cc8f884996584630734a90c9b3c535af81e3c92
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Dec 2015 09:34:13 +0000 (9 10:34 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Dec 2015 16:33:49 +0000 (17 17:33 +0100)
treee71d7f1db7792348e5496d6b4ca2622037081b44
parent1619d1fe737d2af068aefe134386a69b76164794
memory: try to inline constant-length reads

memcpy can take a large amount of time for small reads and writes.
Handle the common case of reading s/g descriptors from memory (there
is no corresponding "write" case that is as common, because writes
often use address_space_st* functions) by inlining the relevant
parts of address_space_read into the caller.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c
include/exec/memory.h
include/exec/ram_addr.h