summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorPaolo Bonzini2017-01-27 16:40:16 +0100
committerMichael S. Tsirkin2017-02-17 20:52:30 +0100
commit5eba0404b98294906134c06519c272bfb5f50453 (patch)
tree1b4b5492cd31c96ec473254d751a08e9989f4e3d /include/exec
parentexec: make address_space_cache_destroy idempotent (diff)
downloadqemu-5eba0404b98294906134c06519c272bfb5f50453.tar.gz
qemu-5eba0404b98294906134c06519c272bfb5f50453.tar.xz
qemu-5eba0404b98294906134c06519c272bfb5f50453.zip
virtio: use MemoryRegionCache to access descriptors
For now, the cache is created on every virtqueue_pop. Later on, direct descriptors will be able to reuse it. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r--include/exec/memory.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 987f9251c6..691102317c 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1426,6 +1426,8 @@ struct MemoryRegionCache {
bool is_write;
};
+#define MEMORY_REGION_CACHE_INVALID ((MemoryRegionCache) { .mr = NULL })
+
/* address_space_cache_init: prepare for repeated access to a physical
* memory region
*