All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Jan Beulich" <JBeulich@suse.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>, "Julien Grall" <julien@xen.org>,
	"Christian Lindig" <christian.lindig@citrix.com>,
	"Edwin Török" <edvin.torok@citrix.com>
Subject: Re: [PATCH for-4.16 2/2] xen: Report grant table v1/v2 capabilities to the toolstack
Date: Tue, 2 Nov 2021 14:14:22 +0000	[thread overview]
Message-ID: <3eff50a7-bf2b-3e2c-e97d-228e353c00b0@citrix.com> (raw)
In-Reply-To: <YX0qmTXBD3jSXjBI@Air-de-Roger>

On 30/10/2021 12:20, Roger Pau Monné wrote:
> On Fri, Oct 29, 2021 at 06:38:13PM +0100, Andrew Cooper wrote:
>> In order to let the toolstack be able to set the gnttab version on a
>> per-domain basis, it needs to know which ABIs Xen supports.  Introduce
>> XEN_SYSCTL_PHYSCAP_gnttab_v{1,2} for the purpose, and plumb in down into
>> userspace.
> I did consider exposing the versions supported together with
> max_{grant,maptrack}_frames using a new grant-table dedicated sysctl,
> but maybe it's fine to expose the version as a physcap and fetch the
> other two separately?

The naming is already rather wonky.  xl calls it virt_caps which is how
most humans interact with the content, while the comments call it
"platform capabilities".

> I certainly didn't look much into this, maybe it's pointless to expose
> max_{grant,maptrack}_frames. I think the toolstack will need to be
> able to fetch grant related limits on a per-domain basis like we plan
> to do with the grant version in order to assert the destination host
> supports the current limit applied to the domain.

All capabilities, settings and limits ought to be available to an admin
in dom0.  `xl dmesg | grep $FOO` is inadequate.

In an ideal world, yes, we would have max_*_frames available too so `xl`
can give a more coherent error message than "domaincreate returned
-EINVAL", but for now at least those are checks suitably.

On x86, the correct way for this all to have worked would be to have a
gnttab leaf in Xen's CPUID leaves, but that is firmly in ABI-v2
territory now.

~Andrew



  parent reply	other threads:[~2021-11-02 14:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  7:59 [PATCH for-4.16 v4] gnttab: allow setting max version per-domain Roger Pau Monne
2021-10-29  8:58 ` Julien Grall
2021-10-29  9:41   ` Roger Pau Monné
2021-10-29 10:01     ` Julien Grall
2021-10-29 11:04       ` Roger Pau Monné
2021-10-29 13:25         ` Julien Grall
2021-10-29 14:16           ` Roger Pau Monné
2021-10-29 16:39 ` Andrew Cooper
2021-10-29 17:37   ` [PATCH for-4.16 1/2] tools/golang: Regenerate bindings Andrew Cooper
2021-11-01 10:42     ` Ian Jackson
2021-10-29 17:38   ` [PATCH for-4.16 2/2] xen: Report grant table v1/v2 capabilities to the toolstack Andrew Cooper
2021-10-30 11:20     ` Roger Pau Monné
2021-11-02 12:12       ` Jan Beulich
2021-11-02 14:14       ` Andrew Cooper [this message]
2021-11-01 10:01     ` Christian Lindig
2021-11-04 12:07     ` Ian Jackson
2021-11-04 14:02     ` Roger Pau Monné
2021-10-30  7:53   ` [PATCH for-4.16 v4] gnttab: allow setting max version per-domain Roger Pau Monné
2021-11-01 10:45     ` [PATCH for-4.16 v4] gnttab: allow setting max version per-domain [and 1 more messages] Ian Jackson
2021-11-02 14:34     ` [PATCH for-4.16 v4] gnttab: allow setting max version per-domain Andrew Cooper
2021-11-02 15:00       ` Julien Grall
2021-11-02 15:54         ` Andrew Cooper
2021-11-02 15:42       ` Roger Pau Monné
2021-11-02 12:19 ` Jan Beulich

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=3eff50a7-bf2b-3e2c-e97d-228e353c00b0@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=christian.lindig@citrix.com \
    --cc=edvin.torok@citrix.com \
    --cc=iwj@xenproject.org \
    --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.