Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-18 Thread Jan Beulich
On 18.02.2020 15:42, Alexandru Stefan ISAILA wrote: > --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -488,8 +488,17 @@ int hap_enable(struct domain *d, u32 mode) goto out; } +if (

Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-18 Thread Alexandru Stefan ISAILA
>>> --- a/xen/arch/x86/mm/hap/hap.c >>> +++ b/xen/arch/x86/mm/hap/hap.c >>> @@ -488,8 +488,17 @@ int hap_enable(struct domain *d, u32 mode) >>>goto out; >>>} >>> >>> +if ( (d->arch.altp2m_working_eptp = alloc_xenheap_page()) == NULL ) >>> +{ >>> +

Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-18 Thread Alexandru Stefan ISAILA
On 17.02.2020 16:14, Jan Beulich wrote: > On 30.01.2020 14:07, Alexandru Stefan ISAILA wrote: >> @@ -4814,6 +4815,30 @@ static int do_altp2m_op( >> break; >> } >> >> +case HVMOP_altp2m_set_visibility: >> +{ >> +uint16_t altp2m_idx =

Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-17 Thread Jan Beulich
On 30.01.2020 14:07, Alexandru Stefan ISAILA wrote: > @@ -4814,6 +4815,30 @@ static int do_altp2m_op( > break; > } > > +case HVMOP_altp2m_set_visibility: > +{ > +uint16_t altp2m_idx = a.u.set_visibility.altp2m_idx; > + > +if ( a.u.set_visibility.pad ||

Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-07 Thread Alexandru Stefan ISAILA
Any thoughts on this are appreciated. Thanks, Alex On 30.01.2020 15:07, Alexandru Stefan ISAILA wrote: > At this moment a guest can call vmfunc to change the altp2m view. This > should be limited in order to avoid any unwanted view switch. > > The new xc_altp2m_set_visibility() solves this by

[Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

2020-01-30 Thread Alexandru Stefan ISAILA
At this moment a guest can call vmfunc to change the altp2m view. This should be limited in order to avoid any unwanted view switch. The new xc_altp2m_set_visibility() solves this by making views invisible to vmfunc. This is done by having a separate arch.altp2m_working_eptp that is populated and