All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xenproject.org, Keir Fraser <keir@xen.org>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v2] xen: allow guest_remove_page to remove p2m_mmio_direct pages
Date: Thu, 19 Jun 2014 17:52:00 +0200	[thread overview]
Message-ID: <53A30720.8030505@citrix.com> (raw)
In-Reply-To: <20140619152355.GC87916@deinos.phlegethon.org>

On 19/06/14 17:23, Tim Deegan wrote:
> At 16:45 +0200 on 19 Jun (1403192739), Roger Pau Monne wrote:
>> IF a guest tries to do a foreign/grant mapping in a memory region
>> marked as p2m_mmio_direct Xen will complain with the following
>> message:
>>
>> (XEN) memory.c:241:d0v0 Bad page free for domain 0
>>
>> Albeit the mapping will succeed. This is specially problematic for PVH
>> Dom0, in which we map all the e820 holes and memory up to 4GB as
>> p2m_mmio_direct.
>>
>> In order to deal with it, add a special casing for p2m_mmio_direct
>> regions in guest_remove_page if the domain is a hardware domain, that
>> calls clear_mmio_p2m_entry in order to remove the mappings.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Acked-by: Tim Deegan <tim@xen.org>
> 
> as being an improvement on what's there right now.  But as I said, I
> think code that relies on this is probably doing the wrong thing -- in
> this case having MMIOmaps og all non-RAM areas seems wrong; dom0 ought
> to know what addresses are really hardware and map them appropriately.

Yes, the problem is mainly in the Xen Dom0 PVH domain builder, that maps
all holes and not assigned memory up to 4GB as MMIO in the p2m. I will
look into finding a better way to do this.

Roger.

      reply	other threads:[~2014-06-19 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-19 14:45 [PATCH v2] xen: allow guest_remove_page to remove p2m_mmio_direct pages Roger Pau Monne
2014-06-19 15:23 ` Tim Deegan
2014-06-19 15:52   ` Roger Pau Monné [this message]

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=53A30720.8030505@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --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 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.