Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-09-07 Thread Razvan Cojocaru
On 09/07/16 09:56, Julien Grall wrote: > Hi Ravzan, > > On 06/09/2016 20:16, Razvan Cojocaru wrote: >> On 09/06/16 22:06, Stefano Stabellini wrote: >>> On Thu, 28 Jul 2016, Julien Grall wrote: > The function p2m_set_mem_access can be re-implemented using the > generic > functions

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-09-07 Thread Julien Grall
Hi Ravzan, On 06/09/2016 20:16, Razvan Cojocaru wrote: On 09/06/16 22:06, Stefano Stabellini wrote: On Thu, 28 Jul 2016, Julien Grall wrote: The function p2m_set_mem_access can be re-implemented using the generic functions p2m_get_entry and __p2m_set_entry. Note that because of the

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-09-06 Thread Stefano Stabellini
On Tue, 6 Sep 2016, Razvan Cojocaru wrote: > On 09/06/16 22:06, Stefano Stabellini wrote: > > On Thu, 28 Jul 2016, Julien Grall wrote: > >> > The function p2m_set_mem_access can be re-implemented using the generic > >> > functions p2m_get_entry and __p2m_set_entry. > >> > > >> > Note that because

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-09-06 Thread Razvan Cojocaru
On 09/06/16 22:06, Stefano Stabellini wrote: > On Thu, 28 Jul 2016, Julien Grall wrote: >> > The function p2m_set_mem_access can be re-implemented using the generic >> > functions p2m_get_entry and __p2m_set_entry. >> > >> > Note that because of the implementation of p2m_get_entry, a TLB >> >

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-09-06 Thread Stefano Stabellini
On Thu, 28 Jul 2016, Julien Grall wrote: > The function p2m_set_mem_access can be re-implemented using the generic > functions p2m_get_entry and __p2m_set_entry. > > Note that because of the implementation of p2m_get_entry, a TLB > invalidation instruction will be issued for each 4KB page.

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-02 Thread Mark Rutland
On Tue, Aug 02, 2016 at 10:58:00AM +0100, Julien Grall wrote: > On 01/08/2016 19:22, Mark Rutland wrote: > >On Mon, Aug 01, 2016 at 06:26:54PM +0100, Mark Rutland wrote: > >>On Mon, Aug 01, 2016 at 05:57:50PM +0100, Julien Grall wrote: > >>>however we only need one TLBI instruction (assuming there

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-02 Thread Julien Grall
On 01/08/2016 19:22, Mark Rutland wrote: Hi, Hi Mark, I realised I made a confusing mistake in my last reply; clarification below. On Mon, Aug 01, 2016 at 06:26:54PM +0100, Mark Rutland wrote: On Mon, Aug 01, 2016 at 05:57:50PM +0100, Julien Grall wrote: however we only need one TLBI

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-02 Thread Razvan Cojocaru
On 08/01/16 19:27, Tamas K Lengyel wrote: > On Mon, Aug 1, 2016 at 10:15 AM, Julien Grall wrote: >> >> >> On 01/08/16 16:59, Tamas K Lengyel wrote: >>> >>> On Mon, Aug 1, 2016 at 9:40 AM, Julien Grall wrote: >>> IMHO we should just pause the domain

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Mark Rutland
Hi, I realised I made a confusing mistake in my last reply; clarification below. On Mon, Aug 01, 2016 at 06:26:54PM +0100, Mark Rutland wrote: > On Mon, Aug 01, 2016 at 05:57:50PM +0100, Julien Grall wrote: > > however we only need one TLBI instruction (assuming there is > > no superpage

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Mark Rutland
On Mon, Aug 01, 2016 at 05:57:50PM +0100, Julien Grall wrote: > On 01/08/16 17:34, Mark Rutland wrote: > >On Mon, Aug 01, 2016 at 04:40:50PM +0100, Julien Grall wrote: > >>After I read again multiple time the ARM ARM (D4-1732 in ARM DDI > >>0487A.i) and spoke with various ARM folks, changing the

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Julien Grall
On 01/08/16 17:34, Mark Rutland wrote: Hi Julien, Hi Mark, On Mon, Aug 01, 2016 at 04:40:50PM +0100, Julien Grall wrote: Hi Razvan, On 28/07/16 16:04, Razvan Cojocaru wrote: On 07/28/2016 05:51 PM, Julien Grall wrote: The function p2m_set_mem_access can be re-implemented using the

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Tamas K Lengyel
On Mon, Aug 1, 2016 at 10:33 AM, Julien Grall wrote: > > > On 01/08/16 17:27, Tamas K Lengyel wrote: >> >> On Mon, Aug 1, 2016 at 10:15 AM, Julien Grall >> wrote: >>> >>> >>> >>> On 01/08/16 16:59, Tamas K Lengyel wrote: On Mon, Aug 1,

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Mark Rutland
Hi Julien, On Mon, Aug 01, 2016 at 04:40:50PM +0100, Julien Grall wrote: > Hi Razvan, > > On 28/07/16 16:04, Razvan Cojocaru wrote: > >On 07/28/2016 05:51 PM, Julien Grall wrote: > >>The function p2m_set_mem_access can be re-implemented using the generic > >>functions p2m_get_entry and

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Julien Grall
On 01/08/16 17:27, Tamas K Lengyel wrote: On Mon, Aug 1, 2016 at 10:15 AM, Julien Grall wrote: On 01/08/16 16:59, Tamas K Lengyel wrote: On Mon, Aug 1, 2016 at 9:40 AM, Julien Grall wrote: IMHO we should just pause the domain while mem_access

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Tamas K Lengyel
On Mon, Aug 1, 2016 at 10:15 AM, Julien Grall wrote: > > > On 01/08/16 16:59, Tamas K Lengyel wrote: >> >> On Mon, Aug 1, 2016 at 9:40 AM, Julien Grall wrote: >> IMHO we should just pause the domain while mem_access permissions are >> being changed. On

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Julien Grall
On 01/08/16 16:59, Tamas K Lengyel wrote: On Mon, Aug 1, 2016 at 9:40 AM, Julien Grall wrote: IMHO we should just pause the domain while mem_access permissions are being changed. On x86 it is not necessary as the mem_access bookkeeping is kept in the ept pte entries but

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Tamas K Lengyel
On Mon, Aug 1, 2016 at 9:40 AM, Julien Grall wrote: > Hi Razvan, > > On 28/07/16 16:04, Razvan Cojocaru wrote: >> >> On 07/28/2016 05:51 PM, Julien Grall wrote: >>> >>> The function p2m_set_mem_access can be re-implemented using the generic >>> functions p2m_get_entry and

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-08-01 Thread Julien Grall
Hi Razvan, On 28/07/16 16:04, Razvan Cojocaru wrote: On 07/28/2016 05:51 PM, Julien Grall wrote: The function p2m_set_mem_access can be re-implemented using the generic functions p2m_get_entry and __p2m_set_entry. Note that because of the implementation of p2m_get_entry, a TLB invalidation

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-07-28 Thread Tamas K Lengyel
On Thu, Jul 28, 2016 at 8:51 AM, Julien Grall wrote: > The function p2m_set_mem_access can be re-implemented using the generic > functions p2m_get_entry and __p2m_set_entry. > > Note that because of the implementation of p2m_get_entry, a TLB > invalidation instruction will

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-07-28 Thread Julien Grall
On 28/07/16 16:04, Razvan Cojocaru wrote: On 07/28/2016 05:51 PM, Julien Grall wrote: The function p2m_set_mem_access can be re-implemented using the generic functions p2m_get_entry and __p2m_set_entry. Note that because of the implementation of p2m_get_entry, a TLB invalidation instruction

Re: [Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-07-28 Thread Razvan Cojocaru
On 07/28/2016 05:51 PM, Julien Grall wrote: > The function p2m_set_mem_access can be re-implemented using the generic > functions p2m_get_entry and __p2m_set_entry. > > Note that because of the implementation of p2m_get_entry, a TLB > invalidation instruction will be issued for each 4KB page.

[Xen-devel] [RFC 21/22] xen/arm: p2m: Re-implement p2m_set_mem_access using p2m_{set, get}_entry

2016-07-28 Thread Julien Grall
The function p2m_set_mem_access can be re-implemented using the generic functions p2m_get_entry and __p2m_set_entry. Note that because of the implementation of p2m_get_entry, a TLB invalidation instruction will be issued for each 4KB page. Therefore the performance of memaccess will be impacted,