Re: [PATCH] x86/monitor: don't open-code hvm_has_set_descriptor_access_exiting()

2021-12-09 Thread Alexandru Stefan ISAILA
> On 30 Nov 2021, at 18:11, Jan Beulich wrote: > > CAUTION: This email originated from outside of our organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > Signed-off-by: Jan Beulich Reviewed by: Alexandru Isaila > >

Re: [PATCH V1] Fix for Coverity ID: 1461759

2020-04-15 Thread Alexandru Stefan ISAILA
From: Xen-devel on behalf of Wei Liu Sent: Wednesday, April 15, 2020 4:59 PM To: Alexandru Stefan ISAILA Cc: xen-devel@lists.xenproject.org ; Roger Pau Monné ; Wei Liu ; Jan Beulich ; Andrew Cooper Subject: Re: [PATCH V1] Fix for Coverity ID: 1461759

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

2020-03-04 Thread Alexandru Stefan ISAILA
Hi, Any thoughts on this patch are appreciated. Thanks, Alex On 03.03.2020 14:23, 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_se

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

2020-03-04 Thread Alexandru Stefan ISAILA
On 04.03.2020 16:07, Jan Beulich wrote: > On 04.03.2020 14:57, Alexandru Stefan ISAILA wrote: >> Hi George, >> >> This is a kind reminder if you can take a look at this patch when you >> have the time. > > Are you perhaps not aware of the recent maintainer chang

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

2020-03-04 Thread Alexandru Stefan ISAILA
Hi George, This is a kind reminder if you can take a look at this patch when you have the time. Thanks, Alex On 03.03.2020 14:23, 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 unwante

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

2020-03-03 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

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

2020-03-03 Thread Alexandru Stefan ISAILA
On 03.03.2020 11:48, Jan Beulich wrote: > On 03.03.2020 10:43, Alexandru Stefan ISAILA wrote: >> >> >> On 03.03.2020 11:30, Jan Beulich wrote: >>> On 26.02.2020 14:18, Alexandru Stefan ISAILA wrote: >>>> @@ -4840,6 +4841,19 @@ stat

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

2020-03-03 Thread Alexandru Stefan ISAILA
On 03.03.2020 11:30, Jan Beulich wrote: > On 26.02.2020 14:18, Alexandru Stefan ISAILA wrote: >> @@ -4840,6 +4841,19 @@ static int do_altp2m_op( >> break; >> } >> >> +case HVMOP_altp2m_set_visibility: >> +{ >> +

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

2020-02-26 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

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

2020-02-26 Thread Alexandru Stefan ISAILA
On 24.02.2020 11:06, Alexandru Stefan ISAILA wrote: > > > On 21.02.2020 18:39, Jan Beulich wrote: >> On 21.02.2020 09:30, Alexandru Stefan ISAILA wrote: >>> @@ -4835,6 +4836,26 @@ static int do_altp2m_op( >>>break; >>>} >>

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

2020-02-24 Thread Alexandru Stefan ISAILA
On 21.02.2020 18:39, Jan Beulich wrote: > On 21.02.2020 09:30, Alexandru Stefan ISAILA wrote: >> @@ -4835,6 +4836,26 @@ static int do_altp2m_op( >> break; >> } >> >> +case HVMOP_altp2m_set_visibility: >> +{ >> +

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

2020-02-21 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

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

2020-02-20 Thread Alexandru Stefan ISAILA
On 20.02.2020 14:21, George Dunlap wrote: > On 2/19/20 9:18 AM, 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_visibil

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

2020-02-20 Thread Alexandru Stefan ISAILA
On 19.02.2020 19:00, Jan Beulich wrote: > On 19.02.2020 10:18, Alexandru Stefan ISAILA wrote: >> @@ -4835,6 +4836,23 @@ static int do_altp2m_op( >> break; >> } >> >> +case HVMOP_altp2m_set_visibility: >>

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

2020-02-20 Thread Alexandru Stefan ISAILA
On 19.02.2020 18:37, Tamas K Lengyel wrote: > On Wed, Feb 19, 2020 at 2:19 AM 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. >> >&

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

2020-02-19 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

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: >>

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

2020-02-17 Thread Alexandru Stefan ISAILA
Hi all, Any ideas on this patch appreciated. Regards, 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_visibil

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_visibil

Re: [Xen-devel] [PATCH v4 1/7] SVM: drop asm/hvm/emulate.h inclusion from vmcb.h

2020-02-03 Thread Alexandru Stefan ISAILA
On 31.01.2020 18:42, Jan Beulich wrote: > It's not needed there and introduces a needless, almost global > dependency. Include the file (or in some cases just xen/err.h) where > actually needed, or - in one case - simply forward-declare a struct. In > microcode*.c take the opportunity and also

[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

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

2020-01-27 Thread Alexandru Stefan ISAILA
Sorry for the double "view" in the title, I will correct that asap Alex On 27.01.2020 15:23, 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 swit

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

2020-01-27 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

Re: [Xen-devel] [PATCH V8 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-21 Thread Alexandru Stefan ISAILA
Hi George, This is a kind reminder, when you have the time, can you take a look at this series? Regards, Alex On 17.01.2020 15:31, Alexandru Stefan ISAILA wrote: > By default the sve bits are not set. > This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), > to set a ran

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-21 Thread Alexandru Stefan ISAILA
On 21.01.2020 11:49, Wei Xu wrote: > Add __acpi_unmap_table function for ARM and invoke it at acpi_os_unmap_memory > to make sure the related fixmap has been cleared before using it for a > different mapping. > > Signed-off-by: Wei Xu > --- > xen/arch/arm/acpi/lib.c | 25

[Xen-devel] [PATCH V8 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2020-01-17 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila Acked-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC:

[Xen-devel] [PATCH V8 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-17 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not break in case of a error and it is doing a best effort for setting the bits in the given range. A check for

[Xen-devel] [PATCH V8 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-17 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Acked-by: Tamas K Lengyel --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan

[Xen-devel] [PATCH V8 3/4] x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c

2020-01-17 Thread Alexandru Stefan ISAILA
No functional changes. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 --

Re: [Xen-devel] [PATCH V7 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-17 Thread Alexandru Stefan ISAILA
On 10.01.2020 18:12, Jan Beulich wrote: > On 08.01.2020 15:08, Alexandru Stefan ISAILA wrote: >> Changes since V6: >> - Remove stray spaces >> - Use ARRAY_SIZE(d->arch.altp2m_p2m) insead of MAX_ALTP2M. > > I'm not utterly confused: > >> --- a/xe

Re: [Xen-devel] [PATCH V7 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-13 Thread Alexandru Stefan ISAILA
On 13.01.2020 14:53, Jan Beulich wrote: > On 13.01.2020 11:32, Alexandru Stefan ISAILA wrote: >> On 10.01.2020 18:20, Jan Beulich wrote: >>> On 08.01.2020 15:08, Alexandru Stefan ISAILA wrote: >>>> +if ( !(rc = p2m_set_suppress_ve_multi(d, )) &&a

Re: [Xen-devel] [PATCH V7 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-13 Thread Alexandru Stefan ISAILA
On 10.01.2020 18:20, Jan Beulich wrote: > On 08.01.2020 15:08, Alexandru Stefan ISAILA wrote: >> By default the sve bits are not set. >> This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), >> to set a range of sve bits. >> The core function, p2m_se

[Xen-devel] [PATCH V7 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2020-01-08 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" CC:

[Xen-devel] [PATCH V7 3/4] x86/mm: Pull vendor-independent altp2m code out of p2m-ept.c and into p2m.c

2020-01-08 Thread Alexandru Stefan ISAILA
No functional changes. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 --

[Xen-devel] [PATCH V7 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-08 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Acked-by: Tamas K Lengyel --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan

[Xen-devel] [PATCH V7 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-08 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not break in case of a error and it is doing a best effort for setting the bits in the given range. A check for

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Alexandru Stefan ISAILA
On 07.01.2020 15:55, Jan Beulich wrote: > On 07.01.2020 14:25, Alexandru Stefan ISAILA wrote: >> On 27.12.2019 10:01, Jan Beulich wrote: >>> On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: >>>> --- a/xen/arch/x86/mm/mem_access.c >>>> +++ b/xen/arch/x

Re: [Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2020-01-07 Thread Alexandru Stefan ISAILA
On 27.12.2019 10:01, Jan Beulich wrote: > (re-sending, as I still don't see the mail having appeared on the list) > > On 23.12.2019 15:04, Alexandru Stefan ISAILA wrote: >> Changes since V5: >> - Add black lines > > Luckily no color comes through in plain tex

Re: [Xen-devel] [PATCH V6 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

2020-01-06 Thread Alexandru Stefan ISAILA
On 24.12.2019 12:15, George Dunlap wrote: > On 12/24/19 10:08 AM, Alexandru Stefan ISAILA wrote: >> >> >> On 24.12.2019 10:01, George Dunlap wrote: >>> On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: >>> >>> Why? >>> >>

Re: [Xen-devel] [PATCH V6 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2020-01-06 Thread Alexandru Stefan ISAILA
On 23.12.2019 18:31, Tamas K Lengyel wrote: >> diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c >> index 4fc919a9c5..de832dcc6d 100644 >> --- a/xen/arch/x86/mm/p2m.c >> +++ b/xen/arch/x86/mm/p2m.c >> @@ -3070,6 +3070,70 @@ out: >> return rc; >> } >> >> +/* >> + * Set/clear the

Re: [Xen-devel] [PATCH V6 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-24 Thread Alexandru Stefan ISAILA
On 24.12.2019 10:48, George Dunlap wrote: > On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: >> At this moment the default_access param from xc_altp2m_create_view is >> not used. >> >> This patch assigns default_access to p2m->default_access at the time of >

Re: [Xen-devel] [PATCH V6 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

2019-12-24 Thread Alexandru Stefan ISAILA
On 24.12.2019 10:01, George Dunlap wrote: > On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: > > Why? > This was a request from Jan. Alex ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/

Re: [Xen-devel] [PATCH V6 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-24 Thread Alexandru Stefan ISAILA
+/* + * Set/clear the #VE suppress bit for multiple pages. Only available on VMX. + */ +int p2m_set_suppress_ve_multi(struct domain *d, + struct xen_hvm_altp2m_suppress_ve_multi *sve) +{ +struct p2m_domain *host_p2m =

Re: [Xen-devel] [PATCH V6 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-24 Thread Alexandru Stefan ISAILA
On 24.12.2019 10:30, George Dunlap wrote: > On 12/23/19 2:04 PM, Alexandru Stefan ISAILA wrote: >> By default the sve bits are not set. >> This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), >> to set a range of sve bits. >> The core function, p2m_se

[Xen-devel] [PATCH V6 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-23 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

[Xen-devel] [PATCH V6 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

2019-12-23 Thread Alexandru Stefan ISAILA
Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 -- xen/arch/x86/mm/p2m.c | 6 ++ 2

[Xen-devel] [PATCH V6 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-23 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" CC:

[Xen-devel] [PATCH V6 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-23 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper

Re: [Xen-devel] [PATCH V5 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-20 Thread Alexandru Stefan ISAILA
On 20.12.2019 11:39, Jan Beulich wrote: > On 20.12.2019 10:09, Alexandru Stefan ISAILA wrote: >> >> >> On 19.12.2019 12:43, Jan Beulich wrote: >>> On 19.12.2019 10:42, Alexandru Stefan ISAILA wrote: >>>> This patch aims to sanitize indexes, potentially g

Re: [Xen-devel] [PATCH V5 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-20 Thread Alexandru Stefan ISAILA
On 19.12.2019 12:43, Jan Beulich wrote: > On 19.12.2019 10:42, Alexandru Stefan ISAILA wrote: >> This patch aims to sanitize indexes, potentially guest provided >> values, for altp2m_eptp[] and altp2m_p2m[] arrays. >> >> Requested-by: Jan Beulich >> Signed-off-b

[Xen-devel] [PATCH V5 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-19 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" CC:

[Xen-devel] [PATCH V5 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

2019-12-19 Thread Alexandru Stefan ISAILA
Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila Reviewed-by: Jan Beulich --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 -- xen/arch/x86/mm/p2m.c | 6 ++ 2

[Xen-devel] [PATCH V5 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-19 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

[Xen-devel] [PATCH V5 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-19 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Requested-by: Jan Beulich Signed-off-by: Alexandru Isaila --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper

Re: [Xen-devel] [PATCH v2 18/20] xen/mem_access: Use __get_gfn_type_access in set_mem_access

2019-12-19 Thread Alexandru Stefan ISAILA
On 18.12.2019 21:40, Tamas K Lengyel wrote: > Use __get_gfn_type_access instead of p2m->get_entry to trigger page-forking > when the mem_access permission is being set on a page that has not yet been > copied over from the parent. > > Signed-off-by: Tamas K Lengyel Isaila > --- >

Re: [Xen-devel] [PATCH V4 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-18 Thread Alexandru Stefan ISAILA
On 18.12.2019 12:45, Jan Beulich wrote: > On 17.12.2019 16:12, Alexandru Stefan ISAILA wrote: >> --- a/xen/arch/x86/mm/mem_access.c >> +++ b/xen/arch/x86/mm/mem_access.c >> @@ -314,9 +314,9 @@ static int set_mem_access(struct domain *d, struct >> p2m_doma

Re: [Xen-devel] [PATCH V4 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-18 Thread Alexandru Stefan ISAILA
On 18.12.2019 12:18, Jan Beulich wrote: > On 18.12.2019 09:45, Alexandru Stefan ISAILA wrote: >> >> >> On 18.12.2019 10:13, Alexandru Stefan ISAILA wrote: >>> >>>>> +/* >>>>> + * Set/clear the #VE suppress bit for multiple

Re: [Xen-devel] [PATCH V4 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-18 Thread Alexandru Stefan ISAILA
On 18.12.2019 12:06, Jan Beulich wrote: > On 18.12.2019 10:57, Alexandru Stefan ISAILA wrote: >> On 18.12.2019 10:06, Alexandru Stefan ISAILA wrote: >>> On 17.12.2019 18:50, Jan Beulich wrote: >>>> On 17.12.2019 16:12, Alexandru Stefan ISAILA wrote: >>

Re: [Xen-devel] [PATCH V4 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-18 Thread Alexandru Stefan ISAILA
On 18.12.2019 10:06, Alexandru Stefan ISAILA wrote: > > > On 17.12.2019 18:50, Jan Beulich wrote: >> On 17.12.2019 16:12, Alexandru Stefan ISAILA wrote: >>> --- a/xen/arch/x86/mm/mem_access.c >>> +++ b/xen/arch/x86/mm/mem_access.c >>> @@ -367,10 +367,1

Re: [Xen-devel] [PATCH V4 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-18 Thread Alexandru Stefan ISAILA
On 18.12.2019 10:13, Alexandru Stefan ISAILA wrote: > >>> +/* >>> + * Set/clear the #VE suppress bit for multiple pages. Only available on >>> VMX. >>> + */ >>> +int p2m_set_suppress_ve_multi(struct domain *d, >>> +

Re: [Xen-devel] [PATCH V4 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-18 Thread Alexandru Stefan ISAILA
>> +/* >> + * Set/clear the #VE suppress bit for multiple pages. Only available on >> VMX. >> + */ >> +int p2m_set_suppress_ve_multi(struct domain *d, >> + struct xen_hvm_altp2m_suppress_ve_multi *sve) >> +{ >> +struct p2m_domain *host_p2m = p2m_get_hostp2m(d);

Re: [Xen-devel] [PATCH V4 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-18 Thread Alexandru Stefan ISAILA
On 17.12.2019 18:50, Jan Beulich wrote: > On 17.12.2019 16:12, Alexandru Stefan ISAILA wrote: >> --- a/xen/arch/x86/mm/mem_access.c >> +++ b/xen/arch/x86/mm/mem_access.c >> @@ -367,10 +367,11 @@ long p2m_set_mem_access(struct domain *d, gfn_t gfn, >> uint32_t n

[Xen-devel] [PATCH V4 4/4] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-17 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" CC:

[Xen-devel] [PATCH V4 3/4] x86/mm: Pull out the p2m specifics from p2m_init_altp2m_ept

2019-12-17 Thread Alexandru Stefan ISAILA
Signed-off-by: Alexandru Isaila --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- xen/arch/x86/mm/p2m-ept.c | 6 -- xen/arch/x86/mm/p2m.c | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff

[Xen-devel] [PATCH V4 2/4] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-17 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

[Xen-devel] [PATCH V4 1/4] x86/mm: Add array_index_nospec to guest provided index values

2019-12-17 Thread Alexandru Stefan ISAILA
This patch aims to sanitize indexes, potentially guest provided values, for altp2m_eptp[] and altp2m_p2m[] arrays. Signed-off-by: Alexandru Isaila --- CC: Razvan Cojocaru CC: Tamas K Lengyel CC: Petre Pircalabu CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau

Re: [Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-13 Thread Alexandru Stefan ISAILA
On 03.12.2019 10:14, Jan Beulich wrote: > On 02.12.2019 15:40, Alexandru Stefan ISAILA wrote: >> On 29.11.2019 13:31, Jan Beulich wrote: >>> On 21.11.2019 16:02, Alexandru Stefan ISAILA wrote: >>>> @@ -4711,6 +4712,18 @@ static int do_altp2m_op( >>&

Re: [Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-13 Thread Alexandru Stefan ISAILA
On 03.12.2019 10:14, Jan Beulich wrote: > On 02.12.2019 15:40, Alexandru Stefan ISAILA wrote: >> On 29.11.2019 13:31, Jan Beulich wrote: >>> On 21.11.2019 16:02, Alexandru Stefan ISAILA wrote: >>>> @@ -4711,6 +4712,18 @@ static int do_altp2m_op( >>&

Re: [Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-12 Thread Alexandru Stefan ISAILA
On 12.12.2019 13:26, George Dunlap wrote: > On 12/12/19 9:37 AM, Alexandru Stefan ISAILA wrote: >> >> >> On 06.12.2019 17:29, George Dunlap wrote: >>> On 11/21/19 3:02 PM, Alexandru Stefan ISAILA wrote: >>>> By default the sve bits are not

Re: [Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-12 Thread Alexandru Stefan ISAILA
On 06.12.2019 17:29, George Dunlap wrote: > On 11/21/19 3:02 PM, Alexandru Stefan ISAILA wrote: >> By default the sve bits are not set. >> This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), >> to set a range of sve bits. >> The core function, p2m_se

Re: [Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-12-02 Thread Alexandru Stefan ISAILA
On 29.11.2019 13:31, Jan Beulich wrote: > On 21.11.2019 16:02, Alexandru Stefan ISAILA wrote: >> Changes since V2: >> - Add a new structure "xen_hvm_altp2m_suppress_ve_multi" >> - Copy the gfn of the first error to the caller >> - Revert xen

Re: [Xen-devel] [PATCH V3 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-12-02 Thread Alexandru Stefan ISAILA
On 29.11.2019 13:41, Jan Beulich wrote: > On 21.11.2019 16:02, Alexandru Stefan ISAILA wrote: >> Changes since V2: >> - Drop static from xenmem_access_to_p2m_access() and declare it >> in mem_access.h >> - Use xenmem_access_to_p2m_access() in p2m_init_next_

Re: [Xen-devel] [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses

2019-11-28 Thread Alexandru Stefan ISAILA
On 28.11.2019 13:44, Andrew Cooper wrote: > c/s d0a699a389f1 "x86/monitor: add support for descriptor access events" > introduced logic looking for what appeared to be exitinfo (not that this > exists in SVM - exitinfo1 or 2 do), but actually passed the exit IDT vectoring > information. There

Re: [Xen-devel] [PATCH v2 2/3] x86/svm: Always intercept ICEBP

2019-11-26 Thread Alexandru Stefan ISAILA
On 26.11.2019 14:03, Andrew Cooper wrote: > ICEBP isn't handled well by SVM. > > The VMexit state for a #DB-vectored TASK_SWITCH has %rip pointing to the > appropriate instruction boundary (fault or trap, as appropriate), except for > an ICEBP-induced #DB TASK_SWITCH, where %rip points at the

[Xen-devel] [PATCH V3 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-11-21 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" CC:

[Xen-devel] [PATCH V3 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-21 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-20 Thread Alexandru Stefan ISAILA
On 20.11.2019 10:41, Jan Beulich wrote: > On 20.11.2019 09:29, Alexandru Stefan ISAILA wrote: >> On 19.11.2019 11:23, Jan Beulich wrote: >>> On 19.11.2019 10:05, Alexandru Stefan ISAILA wrote: >>>> On 18.11.2019 16:09, Jan Beulich wrote: >>>>> On 18

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-20 Thread Alexandru Stefan ISAILA
On 19.11.2019 11:23, Jan Beulich wrote: > On 19.11.2019 10:05, Alexandru Stefan ISAILA wrote: >> On 18.11.2019 16:09, Jan Beulich wrote: >>> On 18.11.2019 14:39, Alexandru Stefan ISAILA wrote: >>>> For this HVMOP_ALTP2M_INTERFACE_VERSION shout be increased. I will le

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-18 Thread Alexandru Stefan ISAILA
On 12.11.2019 13:54, Jan Beulich wrote: > On 06.11.2019 16:35, Alexandru Stefan ISAILA wrote: >> @@ -4681,7 +4682,7 @@ static int do_altp2m_op( >> break; >> >> case HVMOP_altp2m_set_suppress_ve: >> -if ( a.u.suppres

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-18 Thread Alexandru Stefan ISAILA
On 12.11.2019 13:54, Jan Beulich wrote: > On 06.11.2019 16:35, Alexandru Stefan ISAILA wrote: >> @@ -4681,7 +4682,7 @@ static int do_altp2m_op( >> break; >> >> case HVMOP_altp2m_set_suppress_ve: >> -if ( a.u.suppres

Re: [Xen-devel] [PATCH V2 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-11-18 Thread Alexandru Stefan ISAILA
On 12.11.2019 14:02, Jan Beulich wrote: > On 06.11.2019 16:35, Alexandru Stefan ISAILA wrote: >> --- a/xen/arch/x86/mm/p2m-ept.c >> +++ b/xen/arch/x86/mm/p2m-ept.c >> @@ -1345,13 +1345,14 @@ void setup_ept_dump(void) >> register_keyhandler('D', ept_dump_p2m_t

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-08 Thread Alexandru Stefan ISAILA
Hi George, Sorry for the early reminder but v1 you said "Everything else looks OK to me." and you did not give a specific ACK. Can you take a look at the changes when you have the time? Thanks, Alex On 06.11.2019 17:35, Alexandru Stefan ISAILA wrote: > By default the sve bit

Re: [Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-06 Thread Alexandru Stefan ISAILA
On 06.11.2019 23:06, Tamas K Lengyel wrote: > On Wed, Nov 6, 2019 at 7:35 AM Alexandru Stefan ISAILA > wrote: >> >> By default the sve bits are not set. >> This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), >> to set a range of

[Xen-devel] [PATCH V2 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-11-06 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila Reviewed-by: Tamas K Lengyel Acked-by: George Dunlap ---

[Xen-devel] [PATCH V2 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-06 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

Re: [Xen-devel] [PATCH V1 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-11-05 Thread Alexandru Stefan ISAILA
On 05.11.2019 17:38, George Dunlap wrote: > On 11/5/19 12:43 PM, Alexandru Stefan ISAILA wrote: >> At this moment the default_access param from xc_altp2m_create_view is >> not used. > > Weird! Indeed, it was bugging me every time I passed throughout that code. Alex

Re: [Xen-devel] [PATCH V1 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-05 Thread Alexandru Stefan ISAILA
>> >> +/* >> + * Set/clear the #VE suppress bit for multiple pages. Only available on >> VMX. >> + */ >> +long p2m_set_suppress_ve_multi(struct domain *d, uint32_t start, uint32_t >> nr, >> + bool suppress_ve, unsigned int altp2m_idx) >> +{ >> +struct

Re: [Xen-devel] [PATCH V1 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-05 Thread Alexandru Stefan ISAILA
On 05.11.2019 17:18, Tamas K Lengyel wrote: > On Tue, Nov 5, 2019 at 5:43 AM Alexandru Stefan ISAILA > wrote: >> >> By default the sve bits are not set. >> This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), >> to set a range of

[Xen-devel] [PATCH V1 1/2] x86/altp2m: Add hypercall to set a range of sve bits

2019-11-05 Thread Alexandru Stefan ISAILA
By default the sve bits are not set. This patch adds a new hypercall, xc_altp2m_set_supress_ve_multi(), to set a range of sve bits. The core function, p2m_set_suppress_ve_multi(), does not brake in case of a error and it is doing a best effort for setting the bits in the given range. A check for

[Xen-devel] [PATCH V1 2/2] x86/mm: Make use of the default access param from xc_altp2m_create_view

2019-11-05 Thread Alexandru Stefan ISAILA
At this moment the default_access param from xc_altp2m_create_view is not used. This patch assigns default_access to p2m->default_access at the time of initializing a new altp2m view. Signed-off-by: Alexandru Isaila --- xen/arch/x86/hvm/hvm.c| 3 ++- xen/arch/x86/mm/p2m-ept.c

[Xen-devel] [PATCH v1] x86/hvm: Update code in HVMOP_altp2m_set_suppress_ve

2019-10-30 Thread Alexandru Stefan ISAILA
Originally the gfn and altp2m_idx are assigned from the a.u.mem_access union. This works because it's the same memory used. This patch addresses this issue by changing the mem_access union with the suppress_ve union for consistency. Signed-off-by: Alexandru Isaila --- xen/arch/x86/hvm/hvm.c | 4

Re: [Xen-devel] [PATCH v1] x86/altp2m: Add hypercall to create a new view and set sve bits

2019-10-25 Thread Alexandru Stefan ISAILA
On 25.10.2019 17:36, Alexandru Stefan ISAILA wrote: > > > On 23.10.2019 14:58, Roger Pau Monné wrote: >> On Wed, Oct 23, 2019 at 09:11:54AM +0000, Alexandru Stefan ISAILA wrote: >>> >>> >>> On 03.09.2019 20:24, Tamas K Lengyel wrote: >>>

Re: [Xen-devel] [PATCH v1] x86/altp2m: Add hypercall to create a new view and set sve bits

2019-10-25 Thread Alexandru Stefan ISAILA
On 23.10.2019 14:58, Roger Pau Monné wrote: > On Wed, Oct 23, 2019 at 09:11:54AM +0000, Alexandru Stefan ISAILA wrote: >> >> >> On 03.09.2019 20:24, Tamas K Lengyel wrote: >>> On Tue, Sep 3, 2019 at 9:53 AM Jan Beulich wrote: >>>> >>>&

Re: [Xen-devel] [PATCH v1] x86/altp2m: Add hypercall to create a new view and set sve bits

2019-10-23 Thread Alexandru Stefan ISAILA
On 03.09.2019 20:24, Tamas K Lengyel wrote: > On Tue, Sep 3, 2019 at 9:53 AM Jan Beulich wrote: >> >> On 02.09.2019 10:11, Alexandru Stefan ISAILA wrote: >>> @@ -1355,6 +1355,23 @@ void p2m_init_altp2m_ept(struct domain *d, unsigned >>> int i) >>

Re: [Xen-devel] [PATCH v13] x86/emulate: Send vm_event from emulate

2019-09-23 Thread Alexandru Stefan ISAILA
On 23.09.2019 16:05, Paul Durrant wrote: >> -Original Message- >> From: Alexandru Stefan ISAILA >> Sent: 23 September 2019 13:06 >> To: xen-devel@lists.xenproject.org >> Cc: Paul Durrant ; jbeul...@suse.com; Andrew Cooper >> ; w...@xen.org; Roger Pau

Re: [Xen-devel] [PATCH v13] x86/emulate: Send vm_event from emulate

2019-09-23 Thread Alexandru Stefan ISAILA
On 23.09.2019 16:43, Jan Beulich wrote: > On 23.09.2019 14:05, Alexandru Stefan ISAILA wrote: >> @@ -599,8 +600,15 @@ static void *hvmemul_map_linear_addr( >> err = NULL; >> goto out; >> >> -case HVMTRANS_gfn_paged_out: >

[Xen-devel] [PATCH v13] x86/emulate: Send vm_event from emulate

2019-09-23 Thread Alexandru Stefan ISAILA
A/D bit writes (on page walks) can be considered benign by an introspection agent, so receiving vm_events for them is a pessimization. We try here to optimize by filtering these events out. Currently, we are fully emulating the instruction at RIP when the hardware sees an EPT fault with npfec.kind

Re: [Xen-devel] [PATCH v12] x86/emulate: Send vm_event from emulate

2019-09-23 Thread Alexandru Stefan ISAILA
On 20.09.2019 18:20, Jan Beulich wrote: > On 20.09.2019 16:59, Alexandru Stefan ISAILA wrote: >> >> >> On 20.09.2019 17:22, Jan Beulich wrote: >>> On 20.09.2019 14:16, Alexandru Stefan ISAILA wrote: >>>> In order to have __hvm_cop

Re: [Xen-devel] [PATCH v12] x86/emulate: Send vm_event from emulate

2019-09-20 Thread Alexandru Stefan ISAILA
On 20.09.2019 17:22, Jan Beulich wrote: > On 20.09.2019 14:16, Alexandru Stefan ISAILA wrote: >> In order to have __hvm_copy() issue ~X86EMUL_RETRY a new return type, >> HVMTRANS_need_retry, was added and all the places that consume HVMTRANS* >> and needed adjustment wher

  1   2   3   >