diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-13 07:37:24 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-13 07:37:24 +0000 |
commit | b8fb8d5f775d5409f6683ed8c1956cf80004e26e (patch) | |
tree | 803d56735dbe467563030ffc65ab496568553041 /extras/mini-os/include | |
parent | cde518aa7137afa61849403736f3e4b62e00fe1f (diff) | |
download | xen-b8fb8d5f775d5409f6683ed8c1956cf80004e26e.tar.gz xen-b8fb8d5f775d5409f6683ed8c1956cf80004e26e.tar.bz2 xen-b8fb8d5f775d5409f6683ed8c1956cf80004e26e.zip |
minios: allow to allocate machine contiguous pages
This is a port of XenLinux xen_alloc_contig_memory() to mini-os. A
sufficiently privileged mini-os guest can exchange a small number of
its pages with machine contiguous pages.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@netronome.com>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r-- | extras/mini-os/include/mm.h | 1 | ||||
-rw-r--r-- | extras/mini-os/include/x86/arch_mm.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/extras/mini-os/include/mm.h b/extras/mini-os/include/mm.h index c9636926ae..18622d8542 100644 --- a/extras/mini-os/include/mm.h +++ b/extras/mini-os/include/mm.h @@ -72,6 +72,7 @@ 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); int unmap_frames(unsigned long va, unsigned long num_frames); +unsigned long alloc_contig_pages(int order, unsigned int addr_bits); #ifdef HAVE_LIBC extern unsigned long heap, brk, heap_mapped, heap_end; #endif diff --git a/extras/mini-os/include/x86/arch_mm.h b/extras/mini-os/include/x86/arch_mm.h index 36b81f2f2e..786064bf89 100644 --- a/extras/mini-os/include/x86/arch_mm.h +++ b/extras/mini-os/include/x86/arch_mm.h @@ -137,6 +137,9 @@ typedef unsigned long pgentry_t; #define IO_PROT (L1_PROT) #define IO_PROT_NOCACHE (L1_PROT | _PAGE_PCD) +/* for P2M */ +#define INVALID_P2M_ENTRY (~0UL) + #include "arch_limits.h" #define PAGE_SIZE __PAGE_SIZE #define PAGE_SHIFT __PAGE_SHIFT |