xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Julien Grall <julien.grall@linaro.org>
Cc: xen-devel@lists.xenproject.org,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] xen/arm: Implement domain_get_maximum_gpfn
Date: Wed, 2 Jul 2014 12:19:43 +0200	[thread overview]
Message-ID: <53B3DCBF.5020801@citrix.com> (raw)
In-Reply-To: <53B3F1EE020000780001F64B@mail.emea.novell.com>

On 02/07/14 11:50, Jan Beulich wrote:
>>>> On 02.07.14 at 11:41, <Ian.Campbell@citrix.com> wrote:
>> On Wed, 2014-07-02 at 10:37 +0100, Julien Grall wrote:
>>> On 02/07/14 10:22, Ian Campbell wrote:
>>>> Any reason why both arm and x86 can't just use a fixed scratch pfn for
>>>> this temporary mapping? Both of them surely have spaces which they can
>>>> guarantee won't overlap with anything.
>>>
>>> This was the previous behavior until last November.
>>>
>>> commit db062c28f30eb68d1b5d7a910445a0ba1136179a
>>> Date:   Wed Nov 13 09:26:13 2013 +0100
>>>
>>>     libxc: move temporary grant table mapping to end of memory
>>>     
>>>     In order to set up the grant table for HVM guests, libxc needs to map
>>>     the grant table temporarily.  At the moment, it does this by adding the
>>>     grant page to the HVM guest's p2m table in the MMIO hole (at gfn 0xFFFFE),
>>>     then mapping that gfn, setting up the table, then unmapping the gfn and
>>>     removing it from the p2m table.
>>>     
>>>     This breaks with PVH guests with 4G or more of ram, because there is
>>>     no MMIO hole; so it ends up clobbering a valid RAM p2m entry, then
>>>     leaving a "hole" when it removes the grant map from the p2m table.
>>>     Since the guest thinks this is normal ram, when it maps it and tries
>>>     to access the page, it crashes.
>>>     
>>>     This patch maps the page at max_gfn+1 instead.
>>>
>>> I'm not sure what to do for x86, so I was planning to introduce a per-arch 
>> hook to retrieve a scratch gpfn.
>>> x86 would keep the current behavior, and ARM will use the GNTTAB space in 
>> the layout.
>>
>> Perhaps x86 could use some well known MMIO space, like the APIC at
>> 0xfff????
> 
> Except that PVH has no LAPIC right now. Yet with the recent hole
> punching patches I wonder whether "there is no MMIO hole" is actually
> correct. Roger?

For PVH guests there's still no MMIO hole (or any other kind of hole) at
all, the hole(s) is only there for Dom0.

Roger.

  parent reply	other threads:[~2014-07-02 10:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 14:57 [PATCH] xen/arm: Implement domain_get_maximum_gpfn Julien Grall
2014-07-01 16:57 ` Stefano Stabellini
2014-07-01 18:36   ` Julien Grall
2014-07-01 18:53     ` Andrew Cooper
2014-07-09 11:38   ` Julien Grall
2014-07-16 16:02     ` Ian Campbell
2014-07-16 18:17       ` Julien Grall
2014-09-01 21:32       ` Julien Grall
2014-09-03  8:44         ` Ian Campbell
2014-09-03  9:00           ` Tamas K Lengyel
2014-09-08 20:43             ` Julien Grall
2014-09-08 20:47               ` Tamas K Lengyel
2014-09-09 12:50                 ` Tamas K Lengyel
2014-09-09 13:09                   ` Andrew Cooper
2014-09-09 14:01                     ` Tamas K Lengyel
2014-09-10 11:21                 ` Tamas K Lengyel
2014-07-02  9:12 ` Ian Campbell
2014-07-02  9:19   ` Julien Grall
2014-07-02  9:22     ` Ian Campbell
2014-07-02  9:37       ` Julien Grall
2014-07-02  9:41         ` Ian Campbell
2014-07-02  9:50           ` Jan Beulich
2014-07-02  9:52             ` Ian Campbell
2014-07-02 10:19             ` Roger Pau Monné [this message]
2014-07-02 10:31               ` Jan Beulich
2014-07-02 10:51                 ` Roger Pau Monné
2014-07-02 10:52                   ` Ian Campbell
2014-07-02 10:58                     ` Andrew Cooper
2014-07-02 11:21                       ` Ian Campbell
2014-07-02 13:44                 ` Konrad Rzeszutek Wilk

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=53B3DCBF.5020801@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).