All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Stefan ISAILA <aisaila@bitdefender.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>
Cc: "George.Dunlap@eu.citrix.com" <George.Dunlap@eu.citrix.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"tamas@tklengyel.com" <tamas@tklengyel.com>,
	"rcojocaru@bitdefender.com" <rcojocaru@bitdefender.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] x86/mm: Add mem access rights to NPT
Date: Thu, 28 Jun 2018 14:53:04 +0000	[thread overview]
Message-ID: <1530197609.8880.14.camel@bitdefender.com> (raw)
In-Reply-To: <5B34F36C02000078001CEEA0@prv1-mh.provo.novell.com>

On Jo, 2018-06-28 at 08:40 -0600, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 28.06.18 at 16:10, <aisaila@bitdefender.com> wrote:
> > On Vi, 2018-06-22 at 09:51 -0600, Jan Beulich wrote:
> > >
> > > >
> > > > >
> > > > > >
> > > > > > On 18.06.18 at 17:17, <aisaila@bitdefender.com> wrote:
> > > > From: Isaila Alexandru <aisaila@bitdefender.com>
> > > >
> > > > 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?
> > The average is around 1478890 for a machine with 4GB of ram.
> Is this with ...
>
> >
> > >
> > > >
> > > > +static void p2m_set_access(struct p2m_domain *p2m, unsigned
> > > > long
> > > > gfn,
> > > > +                                      p2m_access_t a)
> > > > +{
> > > > +    int rc;
> > > > +
> > > > +    if ( p2m_access_rwx == a )
> > > > +        radix_tree_delete(&p2m->mem_access_settings, gfn);
> > > > +
> > > > +    rc = radix_tree_insert(&p2m->mem_access_settings, gfn,
> > > > +                           radix_tree_int_to_ptr(a));
> > > Is there an "else" missing above here? Otherwise why would you
> > > delete the node first?
> > Yes it needs a else or a return. We plan not to have the rwx in the
> > tree so we ca save up some space.
> ... this corrected? Otherwise I'm tempted to say that the creation of
> this radix tree needs to be avoided by all means, as long as it's not
> really needed.

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.

Alex

________________________
This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-06-28 14:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 15:17 [PATCH v2] x86/mm: Add mem access rights to NPT Alexandru Isaila
2018-06-18 15:39 ` Tamas K Lengyel
2018-06-19  8:14   ` Alexandru Stefan ISAILA
2018-06-19 14:22     ` Tamas K Lengyel
2018-06-22 15:51 ` Jan Beulich
2018-06-28 14:10   ` Alexandru Stefan ISAILA
2018-06-28 14:40     ` Jan Beulich
2018-06-28 14:53       ` Alexandru Stefan ISAILA [this message]
2018-06-28 14:58         ` Razvan Cojocaru
2018-06-29  6:17           ` Jan Beulich
2018-06-29  6:13         ` Jan Beulich
2018-06-29  8:42           ` Alexandru Stefan ISAILA
2018-06-29  9:38             ` Jan Beulich
2018-06-29 16:42               ` Tamas K Lengyel
2018-07-02  6:37                 ` Jan Beulich
2018-07-02  8:01                   ` Alexandru Stefan ISAILA
2018-07-02  8:20                     ` Jan Beulich
2018-06-28 16:29       ` Tamas K Lengyel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1530197609.8880.14.camel@bitdefender.com \
    --to=aisaila@bitdefender.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.