From cd1ba7de230b3a85fb4dba53bb681b7ea626b4eb Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Wed, 18 Jan 2012 12:21:38 +0000 Subject: 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 Signed-off-by: Stefano Stabellini --- xen-mapcache.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xen-mapcache.h') 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 +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) { } -- cgit v1.2.3