[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] xen: allow guest_remove_page to remove p2m_mmio_direct pages



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@xxxxxxxxxx>
> 
> Acked-by: Tim Deegan <tim@xxxxxxx>
> 
> 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.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.