[Xen-devel] [PATCH v2] x86/hvm: Fix altp2m_vcpu_enable_notify error handling

2017-11-15 Thread Adrian Pop
have potentially enabled #VE for the current domain even if it had intended to enable it for another one (not a supported functionality). Signed-off-by: Adrian Pop Reviewed-by: Andrew Cooper --- changes in v2: - reword the commit message --- xen/arch/x86/hvm/hvm.c | 8 +++- 1 file chang

Re: [Xen-devel] [PATCH] x86/hvm: Fix rcu_unlock_domain call bypass

2017-11-14 Thread Adrian Pop
Hello, On Tue, Nov 14, 2017 at 08:25:57AM -0700, Jan Beulich wrote: > >>> On 14.11.17 at 16:11, wrote: > > rcu_lock_current_domain is called at the beginning of do_altp2m_op, but > > the altp2m_vcpu_enable_notify subop handler might skip calling > > rcu_unlock_domain, possibly hanging the domain

[Xen-devel] [PATCH] x86/hvm: Fix rcu_unlock_domain call bypass

2017-11-14 Thread Adrian Pop
rcu_lock_current_domain is called at the beginning of do_altp2m_op, but the altp2m_vcpu_enable_notify subop handler might skip calling rcu_unlock_domain, possibly hanging the domain altogether. Signed-off-by: Adrian Pop --- xen/arch/x86/hvm/hvm.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [Xen-devel] [PATCH v3 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-07-19 Thread Adrian Pop
On Tue, Jul 18, 2017 at 11:19:07AM -0600, Tamas K Lengyel wrote: > On Tue, Jul 18, 2017 at 9:25 AM, Adrian Pop wrote: > > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > > privileged domain to change the value of the #VE suppress bit for a > > page

Re: [Xen-devel] [PATCH v3 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-07-19 Thread Adrian Pop
Hello, On Tue, Jul 18, 2017 at 11:26:45AM -0600, Tamas K Lengyel wrote: > On Tue, Jul 18, 2017 at 9:25 AM, Adrian Pop wrote: > > From: Vlad Ioan Topan > > > > The default value for the "suppress #VE" bit set by set_mem_access() > > currently depends on w

[Xen-devel] [PATCH v3 0/2] Add a hvmop for setting the #VE suppress bit

2017-07-18 Thread Adrian Pop
done in Xen internally using ept_set_entry(). Following the discussion from https://lists.xen.org/archives/html/xen-devel/2017-03/msg01312.html this patch introduces a new hvmop to set this bit and thus have control over which pages generate #VE and which VM-Exit. Adrian Pop (1): x86/altp2m: Add a

[Xen-devel] [PATCH v3 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-07-18 Thread Adrian Pop
Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a privileged domain to change the value of the #VE suppress bit for a page. Add a libxc wrapper for invoking this hvmop. Signed-off-by: Adrian Pop Acked-by: Wei Liu --- changes in v3: - fix indentation (Wei Liu) - use return

[Xen-devel] [PATCH v3 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-07-18 Thread Adrian Pop
to inherit the old suppress #VE bit value if it is already set and to set it to 1 otherwise, which is safer and more reliable. Signed-off-by: Vlad Ioan Topan Signed-off-by: Adrian Pop --- xen/arch/x86/mm/mem_access.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/a

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 22, 2017 at 06:13:22AM -0600, Jan Beulich wrote: > >>> On 22.06.17 at 14:04, wrote: > > On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >> >>> On 15.06.17 at 21:01, wrote: > >> > On Fri, Jun 9, 2017 at 10:51 AM,

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 15, 2017 at 01:01:36PM -0600, Tamas K Lengyel wrote: > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > > diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c > > index d0b0767855..8c39db13e3 100644 > > --- a/xen/arch/x86/mm/mem_access.c &

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Thu, Jun 22, 2017 at 06:13:22AM -0600, Jan Beulich wrote: > >>> On 22.06.17 at 14:04, wrote: > > On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >> >>> On 15.06.17 at 21:01, wrote: > >> > On Fri, Jun 9, 2017 at 10:51 AM,

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-22 Thread Adrian Pop
On Fri, Jun 16, 2017 at 02:39:10AM -0600, Jan Beulich wrote: > >>> On 15.06.17 at 21:01, wrote: > > On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > >> --- a/xen/arch/x86/mm/mem_access.c > >> +++ b/xen/arch/x86/mm/mem_access.c > >> @@ -466,6 +466,

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-20 Thread Adrian Pop
On Mon, Jun 12, 2017 at 04:51:48PM +0100, Wei Liu wrote: > On Fri, Jun 09, 2017 at 07:51:54PM +0300, Adrian Pop wrote: > > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > > privileged domain to change the value of the #VE suppress bit for a > > page.

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-20 Thread Adrian Pop
> Add a libxc wrapper for invoking this hvmop. > > > > Signed-off-by: Adrian Pop > > --- > > Please properly version your patch submissions, and please put > here a brief summary of what changed from the previous version. OK. I've mistakenly sent the mail wi

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-12 Thread Adrian Pop
On Mon, Jun 12, 2017 at 04:51:48PM +0100, Wei Liu wrote: > On Fri, Jun 09, 2017 at 07:51:54PM +0300, Adrian Pop wrote: > > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > > privileged domain to change the value of the #VE suppress bit for a > > page.

Re: [Xen-devel] [PATCH v2 0/2] x86: Add a hvmop for setting the #VE suppress bit

2017-06-12 Thread Adrian Pop
I've just noticed I had forgotten to update the version of the patch in the email subject. Sorry! ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

[Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-09 Thread Adrian Pop
Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a privileged domain to change the value of the #VE suppress bit for a page. Add a libxc wrapper for invoking this hvmop. Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 24

[Xen-devel] [PATCH 0/2] x86: Add a hvmop for setting the #VE suppress bit

2017-06-09 Thread Adrian Pop
) - allow only privileged domains to use this hvmop - merge patch #2 and patch #3 (Jan Beulich) Adrian Pop (1): x86/altp2m: Add a hvmop for setting the suppress #VE bit Vlad Ioan Topan (1): x86/mm: Change default value for suppress #VE in set_mem_access() tools/libxc/include/xenctrl.h

[Xen-devel] [PATCH 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-06-09 Thread Adrian Pop
to inherit the old suppress #VE bit value if it is already set and to set it to 1 otherwise, which is safer and more reliable. Signed-off-by: Vlad Ioan Topan Signed-off-by: Adrian Pop --- xen/arch/x86/mm/mem_access.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/a

Re: [Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-09 Thread Adrian Pop
On Thu, Jun 08, 2017 at 08:08:56AM -0600, Jan Beulich wrote: > >>> On 08.06.17 at 15:49, wrote: > > On Tue, Jun 06, 2017 at 07:08:43AM -0600, Jan Beulich wrote: > >> >>> On 06.06.17 at 15:00, wrote: > >> > On Mon, May 29, 2017 at 08:38:33AM -0600, Jan Beulich wrote: > >> >> >>> On 18.05.17 at 17:

Re: [Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-08 Thread Adrian Pop
On Tue, Jun 06, 2017 at 07:08:43AM -0600, Jan Beulich wrote: > >>> On 06.06.17 at 15:00, wrote: > > On Mon, May 29, 2017 at 08:38:33AM -0600, Jan Beulich wrote: > >> >>> On 18.05.17 at 17:07, wrote: > >> > + > >> > +if ( !cpu_has_vmx ) > >> > +return -EOPNOTSUPP; > >> > >> Is this en

Re: [Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-06 Thread Adrian Pop
Hello, On Mon, May 29, 2017 at 08:38:33AM -0600, Jan Beulich wrote: > >>> On 18.05.17 at 17:07, wrote: > > --- a/xen/arch/x86/mm/mem_access.c > > +++ b/xen/arch/x86/mm/mem_access.c > > @@ -466,6 +466,54 @@ int p2m_get_mem_access(struct domain *d, gfn_t gfn, > > xenmem_access_t *access) > > } >

Re: [Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-05-23 Thread Adrian Pop
On Thu, May 18, 2017 at 11:27:44AM -0600, Tamas K Lengyel wrote: > On Thu, May 18, 2017 at 9:07 AM, Adrian Pop wrote: > > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > > domain to change the value of the #VE suppress bit for a page. > > > >

[Xen-devel] [PATCH 3/3] libxc: Add support for the altp2m suppress #VE hvmop

2017-05-18 Thread Adrian Pop
This adds a wrapper for issuing HVMOP_altp2m_set_suppress_ve from a domain. Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 24 2 files changed, 26 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools

[Xen-devel] [PATCH 0/3] x86: Add a hvmop for setting the #VE suppress bit

2017-05-18 Thread Adrian Pop
;s best to define p2m_set_suppress_ve() in mem_access.c since this file contains common functions for x86 (vmx & svm) and the function is Intel-specific. Adrian Pop (2): x86/altp2m: Add a hvmop for setting the suppress #VE bit libxc: Add support for the altp2m suppress #VE hvmop Vlad Ioan To

[Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-05-18 Thread Adrian Pop
Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a domain to change the value of the #VE suppress bit for a page. Signed-off-by: Adrian Pop --- xen/arch/x86/hvm/hvm.c | 14 xen/arch/x86/mm/mem_access.c| 48 + xen

[Xen-devel] [PATCH 1/3] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-05-18 Thread Adrian Pop
to inherit the old suppress #VE bit value if it is already set and to set it to 1 otherwise, which is safer and more reliable. Signed-off-by: Vlad Ioan Topan Signed-off-by: Adrian Pop --- xen/arch/x86/mm/mem_access.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/a

Re: [Xen-devel] [PATCH v3] x86/monitor: add support for descriptor access events

2017-04-07 Thread Adrian Pop
On Fri, Apr 07, 2017 at 07:18:26AM -0600, Jan Beulich wrote: > >>> On 07.04.17 at 12:17, wrote: > > --- a/xen/arch/x86/hvm/hvm.c > > +++ b/xen/arch/x86/hvm/hvm.c > > @@ -3589,6 +3589,41 @@ gp_fault: > > return X86EMUL_EXCEPTION; > > } > > > > +int hvm_descriptor_access_intercept(uint64_t e

[Xen-devel] [PATCH v3] x86/monitor: add support for descriptor access events

2017-04-07 Thread Adrian Pop
Adds monitor support for descriptor access events (reads & writes of IDTR/GDTR/LDTR/TR) for the x86 architecture (VMX and SVM). Signed-off-by: Adrian Pop Acked-by: Wei Liu Acked-by: Razvan Cojocaru Reviewed-by: Boris Ostrovsky Reviewed-by: Kevin Tian --- changes in v3: - remove

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-07 Thread Adrian Pop
On Thu, Apr 06, 2017 at 08:09:23AM -0600, Jan Beulich wrote: > >>> On 06.04.17 at 11:37, wrote: > > On Thu, Apr 06, 2017 at 03:20:21AM -0600, Jan Beulich wrote: > >> >>> On 06.04.17 at 10:59, wrote: > >> > On Wed, Apr 05, 2017 at 08:26:27AM -0600, Jan Beulich wrote: > >> >> >>> On 04.04.17 at 11:

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-06 Thread Adrian Pop
On Thu, Apr 06, 2017 at 03:20:21AM -0600, Jan Beulich wrote: > >>> On 06.04.17 at 10:59, wrote: > > On Wed, Apr 05, 2017 at 08:26:27AM -0600, Jan Beulich wrote: > >> >>> On 04.04.17 at 11:57, wrote: > >> > --- a/xen/arch/x86/hvm/hvm.c > >> > +++ b/xen/arch/x86/hvm/hvm.c > >> > @@ -3572,6 +3572,43

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-06 Thread Adrian Pop
Hello, On Wed, Apr 05, 2017 at 08:26:27AM -0600, Jan Beulich wrote: > >>> On 04.04.17 at 11:57, wrote: > > --- a/xen/arch/x86/hvm/hvm.c > > +++ b/xen/arch/x86/hvm/hvm.c > > @@ -3572,6 +3572,43 @@ gp_fault: > > return X86EMUL_EXCEPTION; > > } > > > > +int hvm_descriptor_access_intercept(ui

[Xen-devel] [RFC 1/3] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-04-05 Thread Adrian Pop
From: Vlad Ioan Topan The default value for the "suppress #VE" bit set by set_mem_access() currently depends on whether the call is made from the same domain (the bit is set when called from another domain and cleared if called from the same domain). This patch changes that behavior to inherit th

[Xen-devel] [RFC 3/3] libxc: Add support for the altp2m suppress #VE hvmop

2017-04-05 Thread Adrian Pop
This adds a wrapper for issuing HVMOP_altp2m_set_suppress_ve from a domain. Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 24 2 files changed, 26 insertions(+) diff --git a/tools/libxc/include/xenctrl.h b/tools

[Xen-devel] [RFC 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-04-05 Thread Adrian Pop
Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a domain to change the value of the #VE suppress bit for a page. Signed-off-by: Adrian Pop --- xen/arch/x86/hvm/hvm.c | 14 xen/arch/x86/mm/mem_access.c| 48 + xen

[Xen-devel] [RFC 0/3] x86: Add a hvmop for setting the #VE suppress bit

2017-04-05 Thread Adrian Pop
tains common functions for x86 (vmx & svm), while this function is Intel-specific. Adrian Pop (2): x86/altp2m: Add a hvmop for setting the suppress #VE bit libxc: Add support for the altp2m suppress #VE hvmop Vlad Ioan Topan (1): x86/mm: Change default value for suppress #VE in set_m

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-04 Thread Adrian Pop
On Tue, Apr 04, 2017 at 04:26:24PM +0100, Andrew Cooper wrote: > On 04/04/17 10:57, Adrian Pop wrote: > > diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c > > index f5cd245771..d60e4afd0c 100644 > > --- a/xen/arch/x86/hvm/monitor.c > > +++ b

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-04 Thread Adrian Pop
On Tue, Apr 04, 2017 at 09:23:28AM -0400, Boris Ostrovsky wrote: > On 04/04/2017 05:57 AM, Adrian Pop wrote: > > Adds monitor support for descriptor access events (reads & writes of > > IDTR/GDTR/LDTR/TR) for the x86 architecture (VMX and SVM). > > > > Signed-off-

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-04 Thread Adrian Pop
On Tue, Apr 04, 2017 at 01:52:24PM +0300, Razvan Cojocaru wrote: > You've forgotten Wei Liu's ack for the first version of the patch. > > For the vm_event bits: > > Acked-by: Razvan Cojocaru Okay, will include them next time. Thanks! ___ Xen-devel m

[Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events

2017-04-04 Thread Adrian Pop
Adds monitor support for descriptor access events (reads & writes of IDTR/GDTR/LDTR/TR) for the x86 architecture (VMX and SVM). Signed-off-by: Adrian Pop --- changes in v2: - use two sub-structs (vmx/svm) for vm_event_desc_access (Tamas K Lengyel) - more compact version of the descripto