diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-01-18 14:48:18 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-01-18 14:48:18 +0000 |
commit | 6127bd73bde6c4265a2ac403203e24a11c582cc5 (patch) | |
tree | 41c86b70c32b358d42250376f796e2d51eb052c3 /extras/mini-os/include | |
parent | 41449bf35b76cd55f3ff5f87b8c60b18dc36cc80 (diff) | |
download | xen-6127bd73bde6c4265a2ac403203e24a11c582cc5.tar.gz xen-6127bd73bde6c4265a2ac403203e24a11c582cc5.tar.bz2 xen-6127bd73bde6c4265a2ac403203e24a11c582cc5.zip |
minios: implement xc_map_foreign_bulk
In order to do so it modifies map_frames_ex and do_map_frames to take
an int *err as parameter and return any error that way.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r-- | extras/mini-os/include/ia64/arch_mm.h | 4 | ||||
-rw-r--r-- | extras/mini-os/include/mm.h | 8 | ||||
-rw-r--r-- | extras/mini-os/include/x86/arch_mm.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/extras/mini-os/include/ia64/arch_mm.h b/extras/mini-os/include/ia64/arch_mm.h index 5a1a1a9c50..8889164533 100644 --- a/extras/mini-os/include/ia64/arch_mm.h +++ b/extras/mini-os/include/ia64/arch_mm.h @@ -35,9 +35,9 @@ #define virt_to_mfn(x) virt_to_pfn(x) #define virtual_to_mfn(x) (ia64_tpa((uint64_t)(x)) >> PAGE_SHIFT) -#define map_frames(f, n) map_frames_ex(f, n, 1, 0, 1, DOMID_SELF, 0, 0) +#define map_frames(f, n) map_frames_ex(f, n, 1, 0, 1, DOMID_SELF, NULL, 0) /* TODO */ -#define map_zero(n, a) map_frames_ex(NULL, n, 0, 0, a, DOMID_SELF, 0, 0) +#define map_zero(n, a) map_frames_ex(NULL, n, 0, 0, a, DOMID_SELF, NULL, 0) #define do_map_zero(start, n) ASSERT(n == 0) #endif /* __ARCH_MM_H__ */ diff --git a/extras/mini-os/include/mm.h b/extras/mini-os/include/mm.h index 18622d8542..2fd43f30b2 100644 --- a/extras/mini-os/include/mm.h +++ b/extras/mini-os/include/mm.h @@ -65,12 +65,12 @@ void arch_init_p2m(unsigned long max_pfn_p); unsigned long allocate_ondemand(unsigned long n, unsigned long alignment); /* map f[i*stride]+i*increment for i in 0..n-1, aligned on alignment pages */ -void *map_frames_ex(unsigned long *f, unsigned long n, unsigned long stride, +void *map_frames_ex(const unsigned long *f, unsigned long n, unsigned long stride, unsigned long increment, unsigned long alignment, domid_t id, - int may_fail, unsigned long prot); + int *err, unsigned long prot); void do_map_frames(unsigned long addr, - unsigned long *f, unsigned long n, unsigned long stride, - unsigned long increment, domid_t id, int may_fail, unsigned long prot); + const unsigned long *f, unsigned long n, unsigned long stride, + unsigned long increment, domid_t id, int *err, unsigned long prot); int unmap_frames(unsigned long va, unsigned long num_frames); unsigned long alloc_contig_pages(int order, unsigned int addr_bits); #ifdef HAVE_LIBC diff --git a/extras/mini-os/include/x86/arch_mm.h b/extras/mini-os/include/x86/arch_mm.h index 786064bf89..a95632ad49 100644 --- a/extras/mini-os/include/x86/arch_mm.h +++ b/extras/mini-os/include/x86/arch_mm.h @@ -224,9 +224,9 @@ static __inline__ paddr_t machine_to_phys(maddr_t machine) }) #define virtual_to_mfn(_virt) pte_to_mfn(virtual_to_pte(_virt)) -#define map_frames(f, n) map_frames_ex(f, n, 1, 0, 1, DOMID_SELF, 0, L1_PROT) -#define map_zero(n, a) map_frames_ex(&mfn_zero, n, 0, 0, a, DOMID_SELF, 0, L1_PROT_RO) -#define do_map_zero(start, n) do_map_frames(start, &mfn_zero, n, 0, 0, DOMID_SELF, 0, L1_PROT_RO) +#define map_frames(f, n) map_frames_ex(f, n, 1, 0, 1, DOMID_SELF, NULL, L1_PROT) +#define map_zero(n, a) map_frames_ex(&mfn_zero, n, 0, 0, a, DOMID_SELF, NULL, L1_PROT_RO) +#define do_map_zero(start, n) do_map_frames(start, &mfn_zero, n, 0, 0, DOMID_SELF, NULL, L1_PROT_RO) pgentry_t *need_pgt(unsigned long addr); int mfn_is_ram(unsigned long mfn); |