|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 21/25] arm/altp2m: Add HVMOP_altp2m_change_gfn.
On 06/08/2016 14:45, Sergej Proskurin wrote: Hi Julien, Hello Sergej, On 08/04/2016 04:04 PM, Julien Grall wrote:On 01/08/16 18:10, Sergej Proskurin wrote:+ return rc; + + hp2m = p2m_get_hostp2m(d); + ap2m = d->arch.altp2m_p2m[idx]; + + altp2m_lock(d); + + /* + * Flip mem_access_enabled to true when a permission is set, as to prevent + * allocating or inserting super-pages. + */ + ap2m->mem_access_enabled = true;Can you give more details about why you need this?Similar to altp2m_set_mem_access, if we remap a page that is part of a super page in the hostp2m, we first map the superpage in form of 512 pages into the ap2m and then change only one page. So, we set mem_access_enabled to true to shatter the superpage on the ap2m side. mem_access_enabled should only be set when mem access is enabled and nothing. I don't understand why you want to avoid superpage in the altp2m. If you copy a host mapping is a superpage, then a altp2m mapping should be a superpage. The code is able to cope with inserting a mapping in the middle of a superpage without mem_access_enabled.
Patch #19 has a different check which does not explain this one. (p2mt != p2m_ram_rw) only guest read-write RAM can effectively be remapped which is different than shared page cannot be remapped. BTW, ARM does not support shared page. This also lead to my question, why not allowing p2m_ram_ro?
Then add a comment in the code. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |