Re: [Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms

2018-06-28 Thread Wei Liu
On Thu, Jun 28, 2018 at 10:08:19AM +0300, Razvan Cojocaru wrote: > >> +{ > >> +unsigned int i; > >> + > >> +p2m_get_hostp2m(d)->access_required = access_required; > >> + > >> +if ( !altp2m_active(d) ) > >> +return; > >> + > >> +for ( i = 0; i < MAX_ALTP2M; i++ ) > >> +{

Re: [Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms

2018-06-28 Thread Razvan Cojocaru
On 06/27/2018 05:09 PM, Wei Liu wrote: > On Wed, Jun 13, 2018 at 11:52:18AM +0300, Razvan Cojocaru wrote: >> --- >> xen/arch/arm/mem_access.c| 5 + >> xen/arch/x86/mm/mem_access.c | 18 ++ >> xen/arch/x86/mm/p2m.c| 3 ++- >> xen/common/domctl.c | 4 ++--

Re: [Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms

2018-06-27 Thread Wei Liu
On Wed, Jun 13, 2018 at 11:52:18AM +0300, Razvan Cojocaru wrote: > --- > xen/arch/arm/mem_access.c| 5 + > xen/arch/x86/mm/mem_access.c | 18 ++ > xen/arch/x86/mm/p2m.c| 3 ++- > xen/common/domctl.c | 4 ++-- > xen/include/xen/domain.h | 2 ++ > 5 f

[Xen-devel] [PATCH V2 1/2] xen/altp2m: set access_required properly for all altp2ms

2018-06-13 Thread Razvan Cojocaru
For the hostp2m, access_required starts off as 0, then it can be set with xc_domain_set_access_required(). However, all the altp2ms set it to 1 on init, and ignore both the hostp2m and the hypercall. This patch sets access_required to the value from the hostp2m on altp2m init, and propagates the va