]> xenbits.xensource.com Git - xen.git/commit
x86/PVH: allow guest_remove_page to remove p2m_mmio_direct pages
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 20 Jun 2014 08:38:07 +0000 (10:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 20 Jun 2014 08:38:07 +0000 (10:38 +0200)
commit48dfb297a20a8a37de2db45710e3c42db014e7ef
tree0dd8456a76f6a15eda7143d701c8455548e76443
parentd17ac1d5433ba2c25d7fab11baba59173e339896
x86/PVH: allow guest_remove_page to remove p2m_mmio_direct pages

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>
xen/common/memory.c