diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-04-04 11:40:55 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-04-04 11:40:55 +0100 |
commit | 87cc4c61020addea6a001b94b662596b1896d1b3 (patch) | |
tree | eceec77ab6e5df3c37f8b86097ec5888762ff1a9 /include | |
parent | d9123d09f711bf1b855de2b5a907d4c85f46d6c3 (diff) | |
parent | ecbddbb106114f90008024b4e6c3ba1c38d7ca0e (diff) | |
download | qemu-87cc4c61020addea6a001b94b662596b1896d1b3.tar.gz |
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* MemoryRegionCache revert
* glib optimization workaround
* fix "info lapic" segfault on isapc
* fix QIOChannel memory leak
# gpg: Signature made Mon 03 Apr 2017 18:17:00 BST
# gpg: using RSA key 0xBFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream:
main-loop: Acquire main_context lock around os_host_main_loop_wait.
exec: revert MemoryRegionCache
nbd: fix memory leak on socket_connect failed
ipmi: Fix macro issues
target-i386: fix "info lapic" segfault on isapc
iscsi: drop unused IscsiAIOCB.qiov field
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/memory.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index e39256ad03..f20b191793 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1426,13 +1426,11 @@ void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val); struct MemoryRegionCache { hwaddr xlat; - void *ptr; hwaddr len; - MemoryRegion *mr; - bool is_write; + AddressSpace *as; }; -#define MEMORY_REGION_CACHE_INVALID ((MemoryRegionCache) { .mr = NULL }) +#define MEMORY_REGION_CACHE_INVALID ((MemoryRegionCache) { .as = NULL }) /* address_space_cache_init: prepare for repeated access to a physical * memory region @@ -1688,7 +1686,7 @@ address_space_read_cached(MemoryRegionCache *cache, hwaddr addr, void *buf, int len) { assert(addr < cache->len && len <= cache->len - addr); - memcpy(buf, cache->ptr + addr, len); + address_space_read(cache->as, cache->xlat + addr, MEMTXATTRS_UNSPECIFIED, buf, len); } /** @@ -1704,7 +1702,7 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr, void *buf, int len) { assert(addr < cache->len && len <= cache->len - addr); - memcpy(cache->ptr + addr, buf, len); + address_space_write(cache->as, cache->xlat + addr, MEMTXATTRS_UNSPECIFIED, buf, len); } #endif |