summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-01-28 02:31:44 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-01-28 02:36:44 +0100
commit6b010591cb94032a6fef2cb81bed16446f31f8b6 (patch)
treed0137bddf0a7a1930b37b86f47396cd63d86705f /include
parent8bb723b45c225eebc3c92b8d4632eaee50b0e496 (diff)
Add initial code for disabling PV pagetables
* xen/configfrag.ac (--disable-pv-pagetables): Add option. * i386/xen/xen_boothdr.S (XEN_ELFNOTE_FEATURES) [!MACH_PV_PAGETABLES]: Add writable_page_tables. * i386/i386/gdt.c: Turn appropriate MACH_XEN/MACH_HYP tests into MACH_PV_PAGETABLES tests. * i386/i386/i386asm.sym: Likewise * i386/i386/ldt.c: Likewise * i386/i386/locore.S: Likewise * i386/i386/proc_reg.h: Likewise * i386/i386/user_ldt.c: Likewise * i386/i386/vm_param.h: Likewise * i386/i386/xen.h: Likewise * i386/i386at/model_dep.c: Likewise * i386/intel/pmap.h: Likewise * include/mach/xen.h: Likewise * xen/console.c: Likewise * xen/store.c: Likewise * i386/intel/pmap.c: Likewise. Define pmap_map_mfn as TODO stub.
Diffstat (limited to 'include')
-rw-r--r--include/mach/xen.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mach/xen.h b/include/mach/xen.h
index 3bb1d95..6fc626f 100644
--- a/include/mach/xen.h
+++ b/include/mach/xen.h
@@ -28,6 +28,7 @@ extern struct start_info boot_info;
extern volatile struct shared_info hyp_shared_info;
+#ifdef MACH_PV_PAGETABLES
/* Memory translations */
/* pa are physical addresses, from 0 to size of memory */
@@ -77,6 +78,11 @@ extern unsigned long *mfn_list;
#define kv_to_mfn(a) pa_to_mfn(_kvtophys(a))
#define kv_to_ma(a) pa_to_ma(_kvtophys(a))
+#else /* MACH_PV_PAGETABLES */
+#define mfn_to_pfn(n) (n)
+#define pfn_to_mfn(n) (n)
+#endif /* MACH_PV_PAGETABLES */
+
#define mfn_to_kv(mfn) phystokv(ptoa(mfn_to_pfn(mfn)))
#include <machine/xen.h>