Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2019-09-02 Thread Jan Beulich
On 02.09.2019 13:23, Alexandru Stefan ISAILA wrote: > On 29.08.2019 18:04, Jan Beulich wrote: >> On 22.08.2019 16:02, Alexandru Stefan ISAILA wrote: >>> This patch adds access control for NPT mode. >>> >>> The access rights are stored in the NPT p2m table 56:53. >> >> Why starting from bit 53? I

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2019-09-02 Thread Alexandru Stefan ISAILA
On 29.08.2019 18:04, Jan Beulich wrote: > On 22.08.2019 16:02, Alexandru Stefan ISAILA wrote: >> This patch adds access control for NPT mode. >> >> The access rights are stored in the NPT p2m table 56:53. > > Why starting from bit 53? I can't seem to find any use of bit 52. There is a comment

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2019-08-29 Thread Jan Beulich
On 22.08.2019 16:02, Alexandru Stefan ISAILA wrote: > This patch adds access control for NPT mode. > > The access rights are stored in the NPT p2m table 56:53. Why starting from bit 53? I can't seem to find any use of bit 52. > The bits are free after clearing the IOMMU flags [1]. > > Modify

[Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2019-08-22 Thread Alexandru Stefan ISAILA
This patch adds access control for NPT mode. The access rights are stored in the NPT p2m table 56:53. The bits are free after clearing the IOMMU flags [1]. Modify p2m_type_to_flags() to accept and interpret an access value, parallel to the ept code. Add a set_default_access() method to the

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-07-02 Thread Jan Beulich
>>> On 02.07.18 at 10:01, wrote: > On Lu, 2018-07-02 at 00:37 -0600, Jan Beulich wrote: >> > >> > > >> > > > >> > > > On 29.06.18 at 18:42, wrote: >> > On Fri, Jun 29, 2018 at 3:38 AM Jan Beulich >> > wrote: >> > > >> > > >> > > > >> > > > > >> > > > > > >> > > > > > On 29.06.18 at 10:42,

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-07-02 Thread Alexandru Stefan ISAILA
On Lu, 2018-07-02 at 00:37 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 29.06.18 at 18:42, wrote: > > On Fri, Jun 29, 2018 at 3:38 AM Jan Beulich > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > On 29.06.18 at 10:42, wrote: > > > > I've started a win 7 machine with no

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-29 Thread Tamas K Lengyel
On Fri, Jun 29, 2018 at 3:38 AM Jan Beulich wrote: > > >>> On 29.06.18 at 10:42, wrote: > > I've started a win 7 machine with no introspection or xen-access. After > > 30 min of uptime there were 0 inserts into the tree. I guess the > > overhead is down to a minimum with no user modified access

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-29 Thread Jan Beulich
>>> On 29.06.18 at 10:42, wrote: > I've started a win 7 machine with no introspection or xen-access. After > 30 min of uptime there were 0 inserts into the tree. I guess the > overhead is down to a minimum with no user modified access rights. Thanks, this is helpful to know. In that case though,

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-29 Thread Alexandru Stefan ISAILA
On Vi, 2018-06-29 at 00:13 -0600, Jan Beulich wrote: > > > > > > > > > > > > > Alexandru Stefan ISAILA 06/28/18 4:53 > > > > PM >>> > > On Jo, 2018-06-28 at 08:40 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > > > > > > On 28.06.18 at 16:10, wrote: > > > > On Vi, 2018-06-22 at

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-29 Thread Jan Beulich
>>> Razvan Cojocaru 06/28/18 4:58 PM >>> >On 06/28/2018 05:53 PM, Alexandru Stefan ISAILA wrote: >> The number was with this patch so no correction. This was done with >> xen-access write and I don't think it will make a difference if you >> change the access to all the mem pages. > >Right, so

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-29 Thread Jan Beulich
>>> Alexandru Stefan ISAILA 06/28/18 4:53 PM >>> >On Jo, 2018-06-28 at 08:40 -0600, Jan Beulich wrote: >> > > > On 28.06.18 at 16:10, wrote: >> > On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: >> > > > > > On 18.06.18 at 17:17, wrote: >> > > > From: Isaila Alexandru >> > > > >> > > >

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-28 Thread Tamas K Lengyel
On Thu, Jun 28, 2018 at 8:40 AM Jan Beulich wrote: > > >>> On 28.06.18 at 16:10, wrote: > > On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: > >> > > > On 18.06.18 at 17:17, wrote: > >> > From: Isaila Alexandru > >> > > >> > This patch adds access rights for the NPT pages. The access

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-28 Thread Razvan Cojocaru
On 06/28/2018 05:53 PM, Alexandru Stefan ISAILA wrote: > On Jo, 2018-06-28 at 08:40 -0600, Jan Beulich wrote: >>> > > On 28.06.18 at 16:10, wrote: >>> On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: > >> >>> >>> On 18.06.18 at 17:17, wrote: > From:

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-28 Thread Alexandru Stefan ISAILA
On Jo, 2018-06-28 at 08:40 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 28.06.18 at 16:10, wrote: > > On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: > > > > > > > > > > > > > > > > > > > > > > > > On 18.06.18 at 17:17, wrote: > > > > From: Isaila Alexandru > > > > > > > > This

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-28 Thread Jan Beulich
>>> On 28.06.18 at 16:10, wrote: > On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: >> > > > On 18.06.18 at 17:17, wrote: >> > From: Isaila Alexandru >> > >> > This patch adds access rights for the NPT pages. The access rights >> > are >> > saved in a radix tree with the root saved in

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-28 Thread Alexandru Stefan ISAILA
On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 18.06.18 at 17:17, wrote: > > From: Isaila Alexandru > > > > This patch adds access rights for the NPT pages. The access rights > > are > > saved in a radix tree with the root saved in p2m_domain. > Sounds resource

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-22 Thread Jan Beulich
>>> On 18.06.18 at 17:17, wrote: > From: Isaila Alexandru > > This patch adds access rights for the NPT pages. The access rights are > saved in a radix tree with the root saved in p2m_domain. Sounds resource intensive. How many nodes would such a radix tree have on average? > ---

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-19 Thread Tamas K Lengyel
On Tue, Jun 19, 2018 at 2:14 AM Alexandru Stefan ISAILA wrote: > > On Lu, 2018-06-18 at 09:39 -0600, Tamas K Lengyel wrote: > > On Mon, Jun 18, 2018 at 9:19 AM Alexandru Isaila > > wrote: > > > > > > > > > +static p2m_access_t p2m_get_access(struct p2m_domain *p2m, > > > unsigned long gfn) > > >

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-19 Thread Alexandru Stefan ISAILA
On Lu, 2018-06-18 at 09:39 -0600, Tamas K Lengyel wrote: > On Mon, Jun 18, 2018 at 9:19 AM Alexandru Isaila > wrote: > > > > > > +static p2m_access_t p2m_get_access(struct p2m_domain *p2m, > > unsigned long gfn) > > +{ > > +void *ptr; > > + > > +ptr =

Re: [Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-18 Thread Tamas K Lengyel
On Mon, Jun 18, 2018 at 9:19 AM Alexandru Isaila wrote: > > From: Isaila Alexandru > > This patch adds access rights for the NPT pages. The access rights are > saved in a radix tree with the root saved in p2m_domain. The rights are > manipulated through p2m_set_access() > and p2m_get_access()

[Xen-devel] [PATCH v2] x86/mm: Add mem access rights to NPT

2018-06-18 Thread Alexandru Isaila
From: Isaila Alexandru This patch adds access rights for the NPT pages. The access rights are saved in a radix tree with the root saved in p2m_domain. The rights are manipulated through p2m_set_access() and p2m_get_access() functions. The patch follows the ept logic. Note: It was tested with