aboutsummaryrefslogtreecommitdiff
path: root/xen-mapcache.h
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2012-01-18 12:21:38 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-03-19 18:21:12 +0000
commitcd1ba7de230b3a85fb4dba53bb681b7ea626b4eb (patch)
tree34322fda4fe9cf32e9e6db52485b2c69ee2e99b2 /xen-mapcache.h
parentd1814e08c0409d9f352f9ea7fab377bcee1286b8 (diff)
downloadqemu-arm-cd1ba7de230b3a85fb4dba53bb681b7ea626b4eb.tar.gz
xen mapcache: check if memory region has moved.
This patch changes the xen_map_cache behavior. Before trying to map a guest addr, mapcache will look into the list of range of address that have been moved (physmap/set_memory). There is currently one memory space like this, the vram, "moved" from were it's allocated to were the guest will look into. This help to have a succefull migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'xen-mapcache.h')
-rw-r--r--xen-mapcache.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/xen-mapcache.h b/xen-mapcache.h
index da874ca23d..70301a57e4 100644
--- a/xen-mapcache.h
+++ b/xen-mapcache.h
@@ -11,9 +11,13 @@
#include <stdlib.h>
+typedef target_phys_addr_t (*phys_offset_to_gaddr_t)(target_phys_addr_t start_addr,
+ ram_addr_t size,
+ void *opaque);
#ifdef CONFIG_XEN
-void xen_map_cache_init(void);
+void xen_map_cache_init(phys_offset_to_gaddr_t f,
+ void *opaque);
uint8_t *xen_map_cache(target_phys_addr_t phys_addr, target_phys_addr_t size,
uint8_t lock);
ram_addr_t xen_ram_addr_from_mapcache(void *ptr);
@@ -22,7 +26,8 @@ void xen_invalidate_map_cache(void);
#else
-static inline void xen_map_cache_init(void)
+static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
+ void *opaque)
{
}