Re: [Xen-devel] [PATCH v4 7/9] arm/mem_access: Add long-descriptor based gpt

2017-06-23 Thread Julien Grall
On 23/06/17 15:23, Sergej Proskurin wrote: Hi Julien, [...] +static bool get_ttbr_and_gran_64bit(uint64_t *ttbr, unsigned int *gran, +register_t tcr, enum active_ttbr ttbrx) +{ +bool disabled; + +if ( ttbrx == TTBR0_ACTIVE ) +{ +/* Norm

Re: [Xen-devel] [PATCH v4 7/9] arm/mem_access: Add long-descriptor based gpt

2017-06-23 Thread Sergej Proskurin
Hi Julien, [...] >> +static bool get_ttbr_and_gran_64bit(uint64_t *ttbr, unsigned int *gran, >> +register_t tcr, enum active_ttbr >> ttbrx) >> +{ >> +bool disabled; >> + >> +if ( ttbrx == TTBR0_ACTIVE ) >> +{ >> +/* Normalize granule size. *

Re: [Xen-devel] [PATCH v4 7/9] arm/mem_access: Add long-descriptor based gpt

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: +/* + * Set permissions so that the caller can check the flags by herself. Note + * that stage 1 translations also inherit attributes from the tables + * (ARM DDI 0487B.a J1-5928). + */ +if ( !pte.pt.ro && !ro_table )

Re: [Xen-devel] [PATCH v4 7/9] arm/mem_access: Add long-descriptor based gpt

2017-06-22 Thread Julien Grall
Hi Sergej, On 20/06/17 21:33, Sergej Proskurin wrote: This commit adds functionality to walk the guest's page tables using the long-descriptor translation table format for both ARMv7 and ARMv8. Similar to the hardware architecture, the implementation supports different page granularities (4K, 16