All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rolf Neugebauer <rolf.neugebauer@netronome.com>
To: Mick.Jordan@sun.com
Cc: Ian Pratt <Ian.Pratt@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: 2MB page PV guest support clarification
Date: Mon, 02 Mar 2009 10:44:19 +0000	[thread overview]
Message-ID: <49ABB883.7050903@netronome.com> (raw)
In-Reply-To: <49A8954A.7080402@Sun.COM>



Mick Jordan wrote:
> On 02/27/09 17:28, Ian Pratt wrote:
>>> You remark about aliasing prompts me to ask a general question about
>>> that. I am currently mapping physical to virtual 1-1 (because that is
>>> what minis-os has always done) as well as mapping parts of that to
>>> other areas in virtual memory. Both of these are RW mappings. Is that
>>> ok? It perfectly possible for me to unmap the 1-1 mappings or make them
>>> RO if I have to.
>>>     
>>
>> Any page that is part of a pagetable must be mapped RO in every mapping to it. Attempting to add a page that has RW mappings to a pagetable will fail (either when you make the hypercall to add the PTE, or when you pin a constructed pagetable or try switching to it).
>>
>>   
>> Thus, you need to be careful with 1:1 maps to remove pages that may become PT pages. It's best to have a PT page allocator that tries to allocate PT's from contiguous regions and then recycles them.
>>
>>   
> Ok. I need to check this. Certainly I am at some point taking already 
> mapped pages and using them as pagetables. However, I am not getting any 
> errors when adding the PTE. So perhaps the code does the mapping change 
> already.

In mini-os, new_pt_frame() will update the 1:1 mapping to mark a PT page 
RO before hooking it into the page table.

rolf


> 
> Mick
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2009-03-02 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 23:01 2MB page PV guest support clarification Mick Jordan
2009-02-27 23:28 ` Jeremy Fitzhardinge
2009-02-27 23:54   ` Mick Jordan
2009-02-28  0:03   ` Ian Pratt
2009-02-28  0:42     ` Mick Jordan
2009-02-28  1:28       ` Ian Pratt
2009-02-28  1:37         ` Mick Jordan
2009-03-02 10:44           ` Rolf Neugebauer [this message]
2009-02-28 11:12     ` Keir Fraser
2009-03-02 13:45       ` Dave McCracken
2009-03-02 16:38         ` Mick Jordan
2009-03-02 16:23       ` Mick Jordan
2009-03-02 16:34         ` Keir Fraser

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=49ABB883.7050903@netronome.com \
    --to=rolf.neugebauer@netronome.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=Mick.Jordan@sun.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.