mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
xen/mapcache: introduce xen_replace_cache_entry()
This new call is trying to update a requested map cache entry according to the changes in the physmap. The call is searching for the entry, unmaps it and maps again at the same place using a new guest address. If the mapping is dummy this call will make it real. This function makes use of a new xenforeignmemory_map2() call with an extended interface that was recently introduced in libxenforeignmemory [1]. [1] https://www.mail-archive.com/xen-devel@lists.xen.org/msg113007.html Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
parent
759235653d
commit
5ba3d75645
4 changed files with 119 additions and 9 deletions
|
@ -78,6 +78,20 @@ static inline void *xenforeignmemory_map(xc_interface *h, uint32_t dom,
|
|||
|
||||
extern xenforeignmemory_handle *xen_fmem;
|
||||
|
||||
#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000
|
||||
|
||||
static inline void *xenforeignmemory_map2(xenforeignmemory_handle *h,
|
||||
uint32_t dom, void *addr,
|
||||
int prot, int flags, size_t pages,
|
||||
const xen_pfn_t arr[/*pages*/],
|
||||
int err[/*pages*/])
|
||||
{
|
||||
assert(addr == NULL && flags == 0);
|
||||
return xenforeignmemory_map(h, dom, prot, pages, arr, err);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 40900
|
||||
|
||||
typedef xc_interface xendevicemodel_handle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue