All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edwin Torok <edvin.torok@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Christian Lindig <christian.lindig@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Ian Jackson" <iwj@xenproject.org>, Wei Liu <wl@xen.org>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	George Dunlap <George.Dunlap@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	Juergen Gross <jgross@suse.com>, David Scott <dave@recoil.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH 0/6] gnttab: add per-domain controls
Date: Mon, 20 Sep 2021 08:24:45 +0000	[thread overview]
Message-ID: <BA298B54-07C6-45AE-AFE7-A9BF89C06D01@citrix.com> (raw)
In-Reply-To: <YUg3pc9A5C4GTTeR@MacBook-Air-de-Roger.local>



> On 20 Sep 2021, at 08:26, Roger Pau Monne <roger.pau@citrix.com> wrote:
> 
> On Fri, Sep 17, 2021 at 06:06:42PM +0200, Christian Lindig wrote:
>> 
>> 
>>> On 17 Sep 2021, at 16:46, Roger Pau Monne <roger.pau@citrix.com> wrote:
>>> 
>>> Hello,
>>> 
>>> The first two patches of this series allows setting the preisoutly host
>>> wide command line `gnttab` option on a per domain basis. That means
>>> selecting the max allowed grant table version and whether transitive
>>> grants are allowed.
>>> 
>>> The last 4 patches attempt to implement support for creating guests
>>> without grant table support at all. This requires some changes to
>>> xenstore in order to map shared ring using foreign memory instead of
>>> grant table.
>>> 
>>> Note that patch 5 will break the save format for xenstore records, and
>>> should not be applied.
>> 
>> Has this relevance for the format used by oxenstored?
> 
> I'm no expert on oxenstored, but I think it has always mapped the
> shared ring as foreign memory, and hence no changes are needed there.
> AFAICT it also stores the mfn on the save format, so I think this is
> all fine.
> 
> Should have mentioned it on the cover letter.
>  


There is a patch series from last year to make oxenstored use gnttab instead of map_foreign_range.
https://patchwork.kernel.org/project/xen-devel/cover/cover.1598548832.git.edvin.torok@citrix.com/
This got lost/forgotten amid all the oxenstored XSA work.

Later on I discovered and fixed some bugs in it, and is part of this refreshed patch series (part of which got committed, part of which didn't):
https://patchwork.kernel.org/project/xen-devel/list/?series=480623
https://github.com/edwintorok/xen/pull/2

I think the current status is:
* there was an objection that the commit vendoring the external dependencies for the unit tests was too big, and should be replaced by just an opam and lockfile telling 'opam' or 'opam monorepo' where to download it from
* I've discovered some bugs while testing this code together with other code, and need to retest with just this code alone to check that the bug was not in this code


As for the save format, that is part of this patch series too, and we don't store the mfn anymore. Do we need to go back to storing the mfn?

What do I need to change here? The reason to move away from foreign memory was that we could avoid relying on xenctrl for that function (and thus having one less unstable interface to link to). If we need to conditionally use foreign memory mapping then we're back to using unstable interfaces, unless there is a stable interface equivalent to mapping foreign pages?
I see there is a libs/foreignmemory (it has no OCaml bindings though). If we wrote OCaml bindings would the API/ABI of libs/foreignmemory be stable?
In which case we should probably replace the commit introducing the use of gnttab with the one using foreignmemory and always use foreignmemory instead of gnttab libs.

What do you think?

Best regards,
--Edwin





      reply	other threads:[~2021-09-20  8:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 15:46 [PATCH 0/6] gnttab: add per-domain controls Roger Pau Monne
2021-09-17 15:46 ` [PATCH 1/6] gnttab: allow setting max version per-domain Roger Pau Monne
2021-09-17 15:46 ` [PATCH 2/6] gnttab: allow per-domain control over transitive grants Roger Pau Monne
2021-09-20  9:32   ` Andrew Cooper
2021-09-20 11:45     ` Roger Pau Monné
2021-09-17 15:46 ` [PATCH 3/6] tools/console: use xenforeigmemory to map console ring Roger Pau Monne
2021-09-20 10:32   ` Ian Jackson
2021-09-17 15:46 ` [PATCH 4/6] tools/xenstored: use atexit to close interfaces Roger Pau Monne
2021-09-20  7:17   ` Roger Pau Monné
2021-09-20  9:22   ` Juergen Gross
2021-09-20 10:53     ` Roger Pau Monné
2021-09-20 10:57       ` Ian Jackson
2021-09-20 11:02         ` Juergen Gross
2021-09-20 12:21           ` Ian Jackson
2021-09-20 10:34   ` Ian Jackson
2021-09-20 10:39     ` Juergen Gross
2021-09-17 15:46 ` [PATCH DNA 5/6] tools/xenstored: restore support for mapping ring as foreign memory Roger Pau Monne
2021-09-20  8:24   ` Juergen Gross
2021-09-20 10:42     ` Roger Pau Monné
2021-09-20 10:51       ` Juergen Gross
2021-09-20 10:35   ` Ian Jackson
2021-09-17 15:46 ` [PATCH 6/6] gnttab: allow disabling grant table per-domain Roger Pau Monne
2021-09-17 16:06 ` [PATCH 0/6] gnttab: add per-domain controls Christian Lindig
2021-09-20  7:26   ` Roger Pau Monné
2021-09-20  8:24     ` Edwin Torok [this message]

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=BA298B54-07C6-45AE-AFE7-A9BF89C06D01@citrix.com \
    --to=edvin.torok@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=anthony.perard@citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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.