On Thu, Nov 04, 2021 at 01:25:31PM +0100, Jan Beulich wrote: > On 04.11.2021 13:09, Ian Jackson wrote: > > Roger Pau Monne writes ("[PATCH for-4.16 v6] gnttab: allow setting max > > version per-domain"): > >> Introduce a new domain create field so that toolstack can specify the > >> maximum grant table version usable by the domain. This is plumbed into > >> xl and settable by the user as max_grant_version. > >> > >> Previously this was only settable on a per host basis using the > >> gnttab command line option. > >> > >> Note the version is specified using 4 bits, which leaves room to > >> specify up to grant table version 15. Given that we only have 2 grant > >> table versions right now, and a new version is unlikely in the near > >> future using 4 bits seems more than enough. > >> > >> xenstored stubdomains are limited to grant table v1 because the > >> current MiniOS code used to build them only has support for grants v1. > >> There are existing limits set for xenstored stubdomains at creation > >> time that already match the defaults in MiniOS. > > ... > >> This needs to be applied on top of Andrew's: > >> > >> xen: Report grant table v1/v2 capabilities to the toolstack > >> https://lore.kernel.org/xen-devel/20211029173813.23002-1-andrew.coop...@citrix.com/ > > > > Thanks. > > > > We have discussed this wrt 4.16. I am minded to grant a release ack > > for this. If anyone has a contrary opinion please speak now. > > > > (I think committing both of these would be subject to maintainer acks > > for "Report grant table v1/v2 capabilities", which I didn't see but > > perhaps I am missing.) > > Afaic that patch looks okay (albeit not really a scalable way to express > things, if we were to consider further versions to appear), but it wasn't > clear to me whether Roger's reply was meant as an objection, a direction > towards doing things differently, or merely a benign comment. Hence it > didn't feel appropriate to give an A-b just yet.
I think it's fine, let me reply there. Overall I think it's best to express supported grant versions independently, and we might wish to also allow to select a discrete set of grant versions that a domain supports. IMO it might be sensible in the future if a new grant version appears (v3), to select to expose grant v1 and v3 only to the domain, and avoid v2. This would require some changes here, but we can see about those when the time comes. Thanks, Roger.