aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2008-07-08 18:06:38 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-16 04:57:16 -0400
commitf6e587325b3bc7e5c829a407ddc25b52c1e73851 (patch)
treebc525b9bf2967491593b89bf022888102dfff57e /arch/x86/xen/enlighten.c
parente74359028d5489a281fb2c379a47b1d3cb14526e (diff)
xen64: add extra pv_mmu_ops
We need extra pv_mmu_ops for 64-bit, to deal with the extra level of pagetable. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Stephen Tweedie <sct@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index c5f0b40aa39d..afb047e30bdc 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -803,6 +803,18 @@ static void xen_release_pmd(u32 pfn)
803 xen_release_ptpage(pfn, PT_PMD); 803 xen_release_ptpage(pfn, PT_PMD);
804} 804}
805 805
806#if PAGETABLE_LEVELS == 4
807static void xen_alloc_pud(struct mm_struct *mm, u32 pfn)
808{
809 xen_alloc_ptpage(mm, pfn, PT_PUD);
810}
811
812static void xen_release_pud(u32 pfn)
813{
814 xen_release_ptpage(pfn, PT_PUD);
815}
816#endif
817
806#ifdef CONFIG_HIGHPTE 818#ifdef CONFIG_HIGHPTE
807static void *xen_kmap_atomic_pte(struct page *page, enum km_type type) 819static void *xen_kmap_atomic_pte(struct page *page, enum km_type type)
808{ 820{
@@ -922,6 +934,11 @@ static __init void xen_pagetable_setup_done(pgd_t *base)
922 pv_mmu_ops.alloc_pmd = xen_alloc_pmd; 934 pv_mmu_ops.alloc_pmd = xen_alloc_pmd;
923 pv_mmu_ops.release_pte = xen_release_pte; 935 pv_mmu_ops.release_pte = xen_release_pte;
924 pv_mmu_ops.release_pmd = xen_release_pmd; 936 pv_mmu_ops.release_pmd = xen_release_pmd;
937#if PAGETABLE_LEVELS == 4
938 pv_mmu_ops.alloc_pud = xen_alloc_pud;
939 pv_mmu_ops.release_pud = xen_release_pud;
940#endif
941
925 pv_mmu_ops.set_pte = xen_set_pte; 942 pv_mmu_ops.set_pte = xen_set_pte;
926 943
927 xen_setup_shared_info(); 944 xen_setup_shared_info();
@@ -937,6 +954,9 @@ static __init void xen_post_allocator_init(void)
937{ 954{
938 pv_mmu_ops.set_pmd = xen_set_pmd; 955 pv_mmu_ops.set_pmd = xen_set_pmd;
939 pv_mmu_ops.set_pud = xen_set_pud; 956 pv_mmu_ops.set_pud = xen_set_pud;
957#if PAGETABLE_LEVELS == 4
958 pv_mmu_ops.set_pgd = xen_set_pgd;
959#endif
940 960
941 xen_mark_init_mm_pinned(); 961 xen_mark_init_mm_pinned();
942} 962}
@@ -1185,15 +1205,26 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = {
1185 .make_pte = xen_make_pte, 1205 .make_pte = xen_make_pte,
1186 .make_pgd = xen_make_pgd, 1206 .make_pgd = xen_make_pgd,
1187 1207
1208#ifdef CONFIG_X86_PAE
1188 .set_pte_atomic = xen_set_pte_atomic, 1209 .set_pte_atomic = xen_set_pte_atomic,
1189 .set_pte_present = xen_set_pte_at, 1210 .set_pte_present = xen_set_pte_at,
1190 .set_pud = xen_set_pud_hyper,
1191 .pte_clear = xen_pte_clear, 1211 .pte_clear = xen_pte_clear,
1192 .pmd_clear = xen_pmd_clear, 1212 .pmd_clear = xen_pmd_clear,
1213#endif /* CONFIG_X86_PAE */
1214 .set_pud = xen_set_pud_hyper,
1193 1215
1194 .make_pmd = xen_make_pmd, 1216 .make_pmd = xen_make_pmd,
1195 .pmd_val = xen_pmd_val, 1217 .pmd_val = xen_pmd_val,
1196 1218
1219#if PAGETABLE_LEVELS == 4
1220 .pud_val = xen_pud_val,
1221 .make_pud = xen_make_pud,
1222 .set_pgd = xen_set_pgd_hyper,
1223
1224 .alloc_pud = xen_alloc_pte_init,
1225 .release_pud = xen_release_pte_init,
1226#endif /* PAGETABLE_LEVELS == 4 */
1227
1197 .activate_mm = xen_activate_mm, 1228 .activate_mm = xen_activate_mm,
1198 .dup_mmap = xen_dup_mmap, 1229 .dup_mmap = xen_dup_mmap,
1199 .exit_mmap = xen_exit_mmap, 1230 .exit_mmap = xen_exit_mmap,