mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
cd1ba7de23
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>
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2011 Citrix Ltd.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2. See
|
|
* the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#ifndef XEN_MAPCACHE_H
|
|
#define XEN_MAPCACHE_H
|
|
|
|
#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(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);
|
|
void xen_invalidate_map_cache_entry(uint8_t *buffer);
|
|
void xen_invalidate_map_cache(void);
|
|
|
|
#else
|
|
|
|
static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
|
|
void *opaque)
|
|
{
|
|
}
|
|
|
|
static inline uint8_t *xen_map_cache(target_phys_addr_t phys_addr,
|
|
target_phys_addr_t size,
|
|
uint8_t lock)
|
|
{
|
|
abort();
|
|
}
|
|
|
|
static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
|
|
{
|
|
abort();
|
|
}
|
|
|
|
static inline void xen_invalidate_map_cache_entry(uint8_t *buffer)
|
|
{
|
|
}
|
|
|
|
static inline void xen_invalidate_map_cache(void)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !XEN_MAPCACHE_H */
|