Is this a typo?
static pmd_t * __init one_md_table_init(pgd_t *pgd)
{
pud_t *pud;
pmd_t *pmd_table;#ifdef CONFIG_X86_PAE
pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE);
paravirt_alloc_pmd(__pa(page_table) >> PAGE_SHIFT);
^^^^^^^^^^ pmd_table?
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
pud = pud_offset(pgd, 0);
if (pmd_table != pmd_offset(pud, 0))
BUG();
#else
pud = pud_offset(pgd, 0);
pmd_table = pmd_offset(pud, 0);#endif
return pmd_table; }
Also, did you anticipate that these paravirt_alloc_* functions would be useful for Xen to maintain the "pagetable pages must be RO" constraint? Or do you think that will need to be done in a second pass (which is how it seems to me).
J
Quoted 9 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
static
pmd_t*__initone_md_table_init(pgd_t *pgd){ pud_t *pud; pmd_t *pmd_table;#ifdef CONFIG_X86_PAE pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); paravirt_alloc_pmd(__pa(page_table) >> PAGE_SHIFT); ^^^^^^^^^^ pmd_table?
Weird, that should be fixed already
thanks,
-chris
Quoted 7 lines · Chris Wright
Quoted 5 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
static
pmd_t*__initone_md_table_init(pgd_t *pgd){ pud_t *pud; pmd_t *pmd_table;
Quoted 8 lines
Quoted 5 lines
#ifdef CONFIG_X86_PAE pmd_table = (pmd_t *) alloc_bootmem_low_pages(PAGE_SIZE); paravirt_alloc_pmd(__pa(page_table) >> PAGE_SHIFT); ^^^^^^^^^^ pmd_table?Weird, that should be fixed already
I haven't updated in a little while, so maybe I'm looking at stale stuff.
J