diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-01-28 02:31:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-01-28 02:36:44 +0100 |
commit | 6b010591cb94032a6fef2cb81bed16446f31f8b6 (patch) | |
tree | d0137bddf0a7a1930b37b86f47396cd63d86705f /xen | |
parent | 8bb723b45c225eebc3c92b8d4632eaee50b0e496 (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 'xen')
-rw-r--r-- | xen/configfrag.ac | 10 | ||||
-rw-r--r-- | xen/console.c | 2 | ||||
-rw-r--r-- | xen/store.c | 2 |
3 files changed, 14 insertions, 0 deletions
diff --git a/xen/configfrag.ac b/xen/configfrag.ac index b55fc5b..3745a31 100644 --- a/xen/configfrag.ac +++ b/xen/configfrag.ac @@ -36,6 +36,15 @@ dnl These are experimental AM_CONDITIONAL([enable_pseudo_phys], [true]) [fi] + AC_ARG_ENABLE([pv-pagetables], + AS_HELP_STRING([--disable-pv-pagetables], [Paravirtualized page tables support])) + [if [ x"$enable_pv_pagetables" = xno ]; then] + AM_CONDITIONAL([enable_pv_pagetables], [false]) + [else] + AC_DEFINE([MACH_PV_PAGETABLES], [], [Enable paravirtualized page tables support]) + AM_CONDITIONAL([enable_pv_pagetables], [true]) + [fi] + AC_ARG_ENABLE([pv-descriptors], AS_HELP_STRING([--disable-pv-descriptors], [Paravirtualized segment descriptors support])) [if [ x"$enable_pv_descriptors" = xno ]; then] @@ -57,6 +66,7 @@ dnl These are experimental [else] AM_CONDITIONAL([PLATFORM_xen], [false]) AM_CONDITIONAL([enable_pseudo_phys], [false]) + AM_CONDITIONAL([enable_pv_pagetables], [false]) AM_CONDITIONAL([enable_pv_descriptors], [false]) AM_CONDITIONAL([enable_ring1], [false]) [fi] diff --git a/xen/console.c b/xen/console.c index cb61d45..884376f 100644 --- a/xen/console.c +++ b/xen/console.c @@ -232,7 +232,9 @@ int hypcninit(struct consdev *cp) simple_lock_init(&outlock); simple_lock_init(&inlock); console = (void*) mfn_to_kv(boot_info.console_mfn); +#ifdef MACH_PV_PAGETABLES pmap_set_page_readwrite(console); +#endif /* MACH_PV_PAGETABLES */ hyp_evt_handler(boot_info.console_evtchn, hypcnintr, 0, SPL6); return 0; } diff --git a/xen/store.c b/xen/store.c index 8796bb5..739dc36 100644 --- a/xen/store.c +++ b/xen/store.c @@ -329,7 +329,9 @@ void hyp_store_init(void) return; simple_lock_init(&lock); store = (void*) mfn_to_kv(boot_info.store_mfn); +#ifdef MACH_PV_PAGETABLES pmap_set_page_readwrite(store); +#endif /* MACH_PV_PAGETABLES */ /* SPL sched */ hyp_evt_handler(boot_info.store_evtchn, hyp_store_handler, 0, SPL7); } |