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

Re: [Xen-devel] [PATCH 3/6] xentrace: P2M lookup suport for ARM platform

Julien and George,

Thank you for the comments. I had one question I wanted to ask.

>A DOMID_XEN page could be read only too. For instance, the meta-data
>of the trace buffer is read-only (see t_info), we don't want a domain
>to be able to overwrite them.

>However, all the foreign page are mapped read-write. You will need to
>rework the code to map a foreign domain (see
>XENMAPSPACE_gmfn_foreign) to allow read-only foreign page (maybe by
>adding a new p2m_type_t?).

I understand what you are saying in general, but I'm not familiar
enough with the Xen memory mapping system to know how to actually
implement this. The p2m_type_t p2m_ram_ro exists, which I could assign
to read-only pages, but I'm unsure as to how to detect whether a
request is to a read only mapping or a read-write. The normal (non
DOMID_XEN) p2m_lookup function normally does this by reading the root-
level page tables and somehow extracting the mapping type from the
lpae_t structure. Given that we are not looking up the page tables for
non-translated addresses, I'm not sure where/how to find the correct
mapping type. Can I still lookup the page table entries for the MFN
address and extract the p2m_type_t the same way?

Thank you for any insight or assistance,
Xen-devel mailing list



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