|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 2/2] Linux support for hugepages as a Xen PV gues
On Friday 10 October 2008, Keir Fraser wrote:
> hugetlbfs should only be enabled at runtime if supported by the hypervisor.
> Perhaps we can enable the PSE CPUID flag if the hypervisor supports
> superpages?
I'll look into it.
> > --- linux-2.6.18-xen//./mm/hugetlb.c 2008-07-17 09:54:19.000000000 -0500
> > +++ linux-hpage/./mm/hugetlb.c 2008-10-02 15:07:54.000000000 -0500
> > @@ -294,12 +294,14 @@ static pte_t make_huge_pte(struct vm_are
> > int writable)
> > {
> > pte_t entry;
> > + pgprot_t pgprot;
> >
> > + pgprot = __pgprot(pgprot_val(vma->vm_page_prot) | _PAGE_PRESENT);
> > if (writable) {
> > entry =
> > - pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
> > + pte_mkwrite(pte_mkdirty(mk_pte(page, pgprot)));
> > } else {
> > - entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot));
> > + entry = pte_wrprotect(mk_pte(page, pgprot));
> > }
> > entry = pte_mkyoung(entry);
> > entry = pte_mkhuge(entry);
>
> Why do we need to do something different for Xen here?
In the original implementation _PAGE_PRESENT is set in later macros. Xen
needs it early to trigger the proper phys_to_machine() translation.
Dave McCracken
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|