From 5eba0404b98294906134c06519c272bfb5f50453 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 27 Jan 2017 16:40:16 +0100 Subject: 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 Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/memory.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/exec') diff --git a/include/exec/memory.h b/include/exec/memory.h index 987f925..6911023 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 * -- cgit v1.1