Implement MULTI_update_va_mapping() and MULTI_update_va_mapping_otherdomain(),

which fills in multicall arguments for __HYPERVISOR_update_va_mapping
and __HYPERVISOR_update_va_mapping_otherdomain dealing with
differences between i386 and amd64.
This commit is contained in:
bouyer 2006-03-06 19:57:31 +00:00
parent 8f1c5de2eb
commit 9c7083dfa0

View File

@ -1,4 +1,4 @@
/* $NetBSD: xenpmap.h,v 1.13 2006/02/16 20:17:15 perry Exp $ */
/* $NetBSD: xenpmap.h,v 1.14 2006/03/06 19:57:31 bouyer Exp $ */
/*
*
@ -245,4 +245,50 @@ xpmap_ptom_masked(paddr_t ppa)
XPMAP_OFFSET) >> PAGE_SHIFT] << PAGE_SHIFT);
}
#ifdef XEN3
static inline void
MULTI_update_va_mapping(
multicall_entry_t *mcl, vaddr_t va,
paddr_t new_val, unsigned long flags)
{
mcl->op = __HYPERVISOR_update_va_mapping;
mcl->args[0] = va;
#if defined(__x86_64__)
mcl->args[1] = new_val;
mcl->args[2] = flags;
#else
mcl->args[1] = new_val;
mcl->args[2] = 0;
mcl->args[3] = flags;
#endif
}
static inline void
MULTI_update_va_mapping_otherdomain(
multicall_entry_t *mcl, vaddr_t va,
paddr_t new_val, unsigned long flags, domid_t domid)
{
mcl->op = __HYPERVISOR_update_va_mapping_otherdomain;
mcl->args[0] = va;
#if defined(__x86_64__)
mcl->args[1] = new_val;
mcl->args[2] = flags;
mcl->args[3] = domid;
#else
mcl->args[1] = new_val;
mcl->args[2] = 0;
mcl->args[3] = flags;
mcl->args[4] = domid;
#endif
}
#if defined(__x86_64__)
#define MULTI_UVMFLAGS_INDEX 2
#define MULTI_UVMDOMID_INDEX 3
#else
#define MULTI_UVMFLAGS_INDEX 3
#define MULTI_UVMDOMID_INDEX 4
#endif
#endif /* XEN3 */
#endif /* _XEN_XENPMAP_H_ */