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

Re: [Xen-devel] [PATCH v3 2/5] xentrace: Memory/Page Mapping support for DOMID_XEN on ARM

>>> On 08.04.16 at 12:42, <julien.grall@xxxxxxx> wrote:
> On 04/04/16 19:48, Benjamin Sanda wrote:
>> +    else
>> +    {
>> +        /* retrieve the page to determine read/write or read only mapping */
>> +        mfn = paddr >> PAGE_SHIFT;
>> +        if (mfn_valid(mfn))
>> +        {
>> +            page = mfn_to_page(mfn);
>> +            *t = (page->u.inuse.type_info == PGT_writable_page ?
>> +                                p2m_ram_rw : p2m_ram_ro);
> Unfortunately, xenmem_add_to_physmap_one will ignore the return type and 
> will always map using the type p2m_map_foreign. I would introduce
> a new type p2m_map_foreign_ro to allow read-only foreign mapping.
> I've looked at the x86 code (p2m_add_foreign) and I haven't been able to 
> find how the page will be mapped read-only in the guest P2M. 
> get_page_from_gfn will always return p2m_raw_rw for DOMID_XEN as it's a 
> non translated domain.
> Andrew and Jan, do you know how this is supposed to work when xentrace 
> is used in a HVM domain? Does x86 Xen always mapped Read-Write the page?

I don't think that case is being taken care of right now: xentrace
is to be used by privileged guests only anyway, and the only
HVM-like privileged guest would be a PVHv1 Dom0 (which likely
no-one cared about to make work with xentrace so far).


Xen-devel mailing list



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