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

2019-11-28 Thread Adrian Pop
). > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Wei Liu > CC: Roger Pau Monné > CC: Razvan Cojocaru > CC: Tamas K Lengyel > CC: Alexandru Isaila > CC: Petre Pircalabu > CC: Adrian Pop > > Adrian: Do you recall what information you were a

[Xen-devel] [PATCH v6 0/3] Add hvmops for setting and getting the suppress #VE bit

2018-09-12 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 these patches introduce new hvmops for setting and getting this bit and thus Adrian Pop (2): x86/altp2m: Add a hvmop for setting the suppress #VE bit

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

2018-09-12 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 --- Changes in v6: - add a comment in the code to explain the meaning of the -1 magic value --- xen/arch/x86/mm/me

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

2018-09-12 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. Add a libxc wrapper for invoking this hvmop. Signed-off-by: Adrian Pop Acked-by: Wei Liu Acked-by: Tamas K Lengyel --- Changes in v5: - remove the "set_&

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

2018-09-12 Thread Adrian Pop
Signed-off-by: Adrian Pop Acked-by: Tamas K Lengyel --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 26 +++ xen/arch/x86/hvm/hvm.c | 19 ++ xen/arch/x86/mm/mem_access.c| 45 + xen/include

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

2018-09-11 Thread Adrian Pop
On Tue, Sep 11, 2018 at 12:08:42PM -0600, Tamas K Lengyel wrote: > On Mon, Sep 3, 2018 at 9:48 AM Adrian Pop wrote: > > > > From: Vlad Ioan Topan > > > > The default value for the "suppress #VE" bit set by set_mem_access() > > currently depends on wh

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

2018-09-11 Thread Adrian Pop
On Tue, Sep 11, 2018 at 12:02:39PM -0600, Tamas K Lengyel wrote: > On Mon, Sep 3, 2018 at 9:48 AM Adrian Pop wrote: > > > > Signed-off-by: Adrian Pop > > Acked-by: Tamas K Lengyel Thanks! ___ Xen-devel mailing list Xen-devel

[Xen-devel] [PATCH v2] x86/altp2m: Allow setting the #VE info page for an arbitrary VCPU

2018-09-03 Thread Adrian Pop
and notify the introspection engine about the modification; otherwise, it would resume normal instruction execution, thus avoiding a very costly VM exit. Signed-off-by: Adrian Pop --- Changes in v2: - remove the "__get_vcpu()" helper --- tools/libxc/xc_altp2m.c | 1 - xen/arch/x86/h

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

2018-09-03 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. Add a libxc wrapper for invoking this hvmop. Signed-off-by: Adrian Pop Acked-by: Wei Liu Acked-by: Tamas K Lengyel --- Changes in v5: - remove the "set_&

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

2018-09-03 Thread Adrian Pop
Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 26 +++ xen/arch/x86/hvm/hvm.c | 19 ++ xen/arch/x86/mm/mem_access.c| 45 + xen/include/public/hvm/hvm_op.h | 2

[Xen-devel] [PATCH v5 0/3] Add hvmops for setting and getting the suppress #VE bit

2018-09-03 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 these patches introduce new hvmops for setting and getting this bit and thus Adrian Pop (3): x86/altp2m: Add a hvmop for setting the suppress #VE bit

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

2018-09-03 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

[Xen-devel] [PATCH v4] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-09-03 Thread Adrian Pop
from xen_hvm_altp2m_set_mem_access. Signed-off-by: Adrian Pop --- Changes in v4: - don't break the stable interface Changes in v3: - remove the unrelated helper function - simplify the locking in p2m_get_mem_access Changes in v2: - use the _p2m_get_mem_access helper from p2m_get_mem_acce

Re: [Xen-devel] [PATCH v3] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-08-27 Thread Adrian Pop
On Mon, Aug 27, 2018 at 03:59:16AM -0600, Jan Beulich wrote: > >>> On 27.08.18 at 11:38, wrote: > > On Tue, Jul 31, 2018 at 05:37:30AM -0600, Jan Beulich wrote: > >> >>> On 25.07.18 at 13:16, wrote: > >> > --- a/xen/include/public/hvm/hvm_op.h > >> > +++ b/xen/include/public/hvm/hvm_op.h > >> > @

Re: [Xen-devel] [PATCH] x86/altp2m: Allow setting the #VE info page for an arbitrary VCPU

2018-08-27 Thread Adrian Pop
On Tue, Jul 31, 2018 at 05:53:00AM -0600, Jan Beulich wrote: > > +struct vcpu *v; > > + > > +dom = rcu_lock_domain_by_id(domain_id); > > + > > +for_each_vcpu( dom, v ) > > +{ > > +if ( vcpu_id == v->vcpu_id ) > > +{ > > +rcu_unlock_domain(dom); > > +

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

2018-08-27 Thread Adrian Pop
On Tue, Jul 31, 2018 at 05:44:03AM -0600, Jan Beulich wrote: > >>> On 25.07.18 at 13:18, wrote: > > --- a/xen/include/public/hvm/hvm_op.h > > +++ b/xen/include/public/hvm/hvm_op.h > > @@ -38,7 +38,7 @@ struct xen_hvm_param { > > typedef struct xen_hvm_param xen_hvm_param_t; > > DEFINE_XEN_GUEST_

Re: [Xen-devel] [PATCH v3] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-08-27 Thread Adrian Pop
On Tue, Jul 31, 2018 at 05:37:30AM -0600, Jan Beulich wrote: > >>> On 25.07.18 at 13:16, wrote: > > --- a/xen/include/public/hvm/hvm_op.h > > +++ b/xen/include/public/hvm/hvm_op.h > > @@ -234,7 +234,7 @@ struct xen_hvm_altp2m_view { > > typedef struct xen_hvm_altp2m_view xen_hvm_altp2m_view_t; >

[Xen-devel] [PATCH] x86/altp2m: Allow setting the #VE info page for an arbitrary VCPU

2018-07-25 Thread Adrian Pop
The intended use-case of this patch is to allow either Dom0 or a control domain to activate #VE for an introspected guest, and not having to do this necessarily from an in-guest agent. Signed-off-by: Adrian Pop --- tools/libxc/xc_altp2m.c | 1 - xen/arch/x86/hvm/hvm.c | 47

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

2018-07-25 Thread Adrian Pop
Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 32 --- xen/arch/x86/hvm/hvm.c | 23 +++-- xen/arch/x86/mm/mem_access.c| 45 + xen/include/public/hvm/hvm_op.h

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

2018-07-25 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

[Xen-devel] [PATCH v4 0/3] Add hvmops for setting and getting the suppress #VE bit

2018-07-25 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 these patches introduce new hvmops for setting and getting this bit and thus having control over which pages generate #VE and which VM-Exit. Adrian Pop (2

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

2018-07-25 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. Add a libxc wrapper for invoking this hvmop. Signed-off-by: Adrian Pop Acked-by: Wei Liu Acked-by: Tamas K Lengyel --- Changes in v4: - fix a deadlock: If

[Xen-devel] [PATCH v3] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-07-25 Thread Adrian Pop
from xen_hvm_altp2m_set_mem_access. Signed-off-by: Adrian Pop --- Changes in v3: - remove the unrelated helper function - simplify the locking in p2m_get_mem_access Changes in v2: - use the _p2m_get_mem_access helper from p2m_get_mem_access - minor Arm adjustments - move out the addition

Re: [Xen-devel] [PATCH v2 2/2] x86/altp2m: Add a subop for obtaining the memaccess of a page

2018-07-18 Thread Adrian Pop
from xen_hvm_altp2m_set_mem_access. > > > > Signed-off-by: Adrian Pop > > Looking through this patch - what's the point of patch 1? There's no > further user being introduced here. It's not entirely necessary. It just cleans up _p2m_get_mem_access() slightly, which would

Re: [Xen-devel] [PATCH v2 1/2] x86/mem_access: Add a helper function for memaccess conversion

2018-07-05 Thread Adrian Pop
On Thu, Jul 05, 2018 at 10:53:22AM -0600, Tamas K Lengyel wrote: > On Thu, Jul 5, 2018 at 4:44 AM Adrian Pop wrote: > > @@ -72,11 +83,7 @@ static int _p2m_get_mem_access(struct p2m_domain *p2m, > > gfn_t gfn, > > if ( mfn_eq(mfn, INVALID_MFN) ) > > ret

[Xen-devel] [PATCH v2 1/2] x86/mem_access: Add a helper function for memaccess conversion

2018-07-05 Thread Adrian Pop
The p2m_access_to_xenmem_access() converts a p2m_access_t to a xenmem_access_t. It is complementary to xenmem_access_to_p2m_access(). It is currently only used by _p2m_get_mem_access(). Signed-off-by: Adrian Pop --- xen/arch/x86/mm/mem_access.c | 41 +--- 1 file

[Xen-devel] [PATCH v2 0/2] Add an altp2m subop for obtaining the page mem access

2018-07-05 Thread Adrian Pop
helper function to a separate patch in the attempts of making the diff clearer Adrian Pop (2): x86/mem_access: Add a helper function for memaccess conversion x86/altp2m: Add a subop for obtaining the mem access of a page tools/libxc/include/xenctrl.h | 3 ++ tools/libxc/xc_altp2m.c

[Xen-devel] [PATCH v2 2/2] x86/altp2m: Add a subop for obtaining the memaccess of a page

2018-07-05 Thread Adrian Pop
Both altp2m get/set memaccess functions use the struct xen_hvm_altp2m_mem_access which has now dropped the `set' part and has been renamed from xen_hvm_altp2m_set_mem_access. Signed-off-by: Adrian Pop --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_altp2m.c

Re: [Xen-devel] [PATCH] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-07-04 Thread Adrian Pop
On Wed, Jul 04, 2018 at 03:20:45PM +0300, Adrian POP wrote: > On Fri, Jun 29, 2018 at 09:38:58AM -0600, Jan Beulich wrote: > > > --- a/xen/arch/x86/mm/mem_access.c > > > +++ b/xen/arch/x86/mm/mem_access.c > > > @@ -32,17 +32,10 @@ >

Re: [Xen-devel] [PATCH] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-07-04 Thread Adrian Pop
Hello, On Mon, Jul 02, 2018 at 12:01:01PM +0100, Julien Grall wrote: > Hi, > > On 06/28/2018 02:00 PM, Adrian Pop wrote: > > diff --git a/xen/arch/arm/mem_access.c b/xen/arch/arm/mem_access.c > > index ae2686ffa2..ba9e50e7f6 100644 > > --- a/xen/arch/arm/mem_acce

Re: [Xen-devel] [PATCH] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-07-04 Thread Adrian Pop
On Fri, Jun 29, 2018 at 09:38:58AM -0600, Jan Beulich wrote: > >>> On 28.06.18 at 15:00, wrote: > > @@ -4666,6 +4667,23 @@ static int do_altp2m_op( > > } > > break; > > > > +case HVMOP_altp2m_get_mem_access: > > +if ( a.u.mem_access.pad ) > > +rc = -EINV

[Xen-devel] [PATCH] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-06-28 Thread Adrian Pop
A new function, p2m_access_to_xenmem_access(), has been added to avoid code duplication. The existing _p2m_get_mem_access() now uses this function as does p2m_get_mem_access(). --- tools/libxc/include/xenctrl.h | 3 ++ tools/libxc/xc_altp2m.c | 33 -- xen/arch/arm/mem_acces