All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: Dave McCracken <dcm@mccr.org>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [PATCH 2/2] Linux support for hugepages as a Xen PVguest
Date: Fri, 10 Oct 2008 16:35:23 +0100	[thread overview]
Message-ID: <48EF925B.76E4.0078.0@novell.com> (raw)
In-Reply-To: <200810101006.44389.dcm@mccr.org>

>>> Dave McCracken <dcm@mccr.org> 10.10.08 17:06 >>>
>> > --- 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.

That should then better be taken care of in the place where _PAGE_PRESENT
gets actually set. Also, doesn't vma->vm_page_prot already properly
reflect the intended setting of _PAGE_PRESENT?

Jan

  reply	other threads:[~2008-10-10 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 13:29 [PATCH 1/2] Xen PV support for hugepages dcm
2008-10-10 13:30 ` [PATCH 2/2] Linux support for hugepages as a Xen PV guest dcm
2008-10-10 13:38   ` Keir Fraser
2008-10-10 15:06     ` Dave McCracken
2008-10-10 15:35       ` Jan Beulich [this message]
2008-10-15 17:01       ` Dave McCracken
2008-10-15 21:48         ` Jeremy Fitzhardinge
2008-10-15 22:12           ` Dave McCracken
2008-10-15 22:31             ` Jeremy Fitzhardinge
2008-10-10 15:32   ` [PATCH 2/2] Linux support for hugepages as a Xen PVguest Jan Beulich
2008-10-10 15:28 ` [PATCH 1/2] Xen PV support for hugepages Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48EF925B.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=dcm@mccr.org \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.