ia64/xen-unstable

changeset 17741:c93a913c221f

minios: We do not need to pin the page tables, as they implicitly get
pinned when we point the permanent page directory to them.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 27 13:03:05 2008 +0100 (2008-05-27)
parents 6b28a18a8c2d
children 5de1048b884e
files extras/mini-os/arch/x86/mm.c
line diff
     1.1 --- a/extras/mini-os/arch/x86/mm.c	Tue May 27 11:51:33 2008 +0100
     1.2 +++ b/extras/mini-os/arch/x86/mm.c	Tue May 27 13:03:05 2008 +0100
     1.3 @@ -59,11 +59,10 @@ void new_pt_frame(unsigned long *pt_pfn,
     1.4  {   
     1.5      pgentry_t *tab = (pgentry_t *)start_info.pt_base;
     1.6      unsigned long pt_page = (unsigned long)pfn_to_virt(*pt_pfn); 
     1.7 -    unsigned long prot_e, prot_t, pincmd;
     1.8 +    unsigned long prot_e, prot_t;
     1.9      mmu_update_t mmu_updates[1];
    1.10 -    struct mmuext_op pin_request;
    1.11      
    1.12 -    prot_e = prot_t = pincmd = 0;
    1.13 +    prot_e = prot_t = 0;
    1.14      DEBUG("Allocating new L%d pt frame for pt_pfn=%lx, "
    1.15             "prev_l_mfn=%lx, offset=%lx", 
    1.16             level, *pt_pfn, prev_l_mfn, offset);
    1.17 @@ -77,18 +76,15 @@ void new_pt_frame(unsigned long *pt_pfn,
    1.18      case L1_FRAME:
    1.19           prot_e = L1_PROT;
    1.20           prot_t = L2_PROT;
    1.21 -         pincmd = MMUEXT_PIN_L1_TABLE;
    1.22           break;
    1.23      case L2_FRAME:
    1.24           prot_e = L2_PROT;
    1.25           prot_t = L3_PROT;
    1.26 -         pincmd = MMUEXT_PIN_L2_TABLE;
    1.27           break;
    1.28  #if defined(__x86_64__)
    1.29      case L3_FRAME:
    1.30           prot_e = L3_PROT;
    1.31           prot_t = L4_PROT;
    1.32 -         pincmd = MMUEXT_PIN_L3_TABLE;
    1.33           break;
    1.34  #endif
    1.35      default:
    1.36 @@ -113,15 +109,6 @@ void new_pt_frame(unsigned long *pt_pfn,
    1.37           do_exit();
    1.38      }
    1.39                          
    1.40 -    /* Pin the page to provide correct protection */
    1.41 -    pin_request.cmd = pincmd;
    1.42 -    pin_request.arg1.mfn = pfn_to_mfn(*pt_pfn);
    1.43 -    if(HYPERVISOR_mmuext_op(&pin_request, 1, NULL, DOMID_SELF) < 0)
    1.44 -    {
    1.45 -        printk("ERROR: pinning failed\n");
    1.46 -        do_exit();
    1.47 -    }
    1.48 -
    1.49      /* Now fill the new page table page with entries.
    1.50         Update the page directory as well. */
    1.51      mmu_updates[0].ptr = ((pgentry_t)prev_l_mfn << PAGE_SHIFT) + sizeof(pgentry_t) * offset;