[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/6] gnttab: allow setting max version per-domain
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 20 Oct 2021 10:04:26 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zyOT0Pr+szytsUQEfzSP45LbnH/3LUj0vec8V00ENuM=; b=ZaV+fnNF0aoLYRGXK0qgsHYePV2bShuHZ8eD1fTgKUojWEPJidMkqZ0trqLfwh9YZ8lU8lVqAYh9L7knCNp741Cx8Jyrq3FmfHPQV4c1hJWOdyDraN+JdhNsogm6GTCVwBxGJ719rjsURMxx763PFYfpDyyM6Mkm0dMhG6j8oyCfc26U16zVbXA/6V+Q4x0XLfVUNYfi16ywlFy8NR1+lNm5uR4dHdUlyIvuSixekmNRLXwaEbvKilbSm1XNr/NffSHNbdmNmA1QUhCGUw4aSQL5mU+YkjOIFziWJDRBNT/ctzHu5A+WnvsmTCDkFcCThyA63nIem4sj8qpDjWhOqg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nI/t32u9cO+HOm5Tq9bv+HVs7pFltMCS6DwGKgPBcqNFaqFQpbhV6eVy9LSft28e80OyuloyD69nsiDifDDcblObscPQmnK9TLzjvEQjnmeMTnS5haLYmlWW0qpDSI00VMXg6zPLtbtqmygcqXauHrWCyD8P8aGYI9ocr/GXu4jlSvTxT8fTa9aYVTfPBpiijFsdZpYMiWrafL7CaajybFMrzT8fdY/z7FLBh/Uh903cvUNrOUakL48F7YOUT/8+PFcsbBguJv4eQKPHZ+QfNdFjAOLhoQKGNfpdFToqrcMYfgF3W4cKnBbvTyd0N0zG6bOW5ju2RNARee0kOK59WA==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Anthony PERARD" <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 20 Oct 2021 08:05:41 +0000
- Ironport-data: A9a23:r9XlHK9xocUl41NCqqhNDrUD3XiTJUtcMsCJ2f8bNWPcYEJGY0x3n 2cbXT+GM/aNMTT1fo9ybdmy8x8Pv5PXmtEwTAA+/yo8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si9AttENlFEkvU2ybuOU5NXsZ2YhGmeIdA970Ug6wrZj2tYx6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhIy 4RPvIGpVjtqJ7SXmr0NVAZWHiZXaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguw5K8bmJsUHs2xIxjDFF/c2B5vERs0m4PcFgm9o2ZARQ54yY eI9aHlIMQTk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kJVUJkIDhqQTKvA6bmv3riDjj+oZC2 au2aYuR/p2LIyApKFrpK2x08Bk4X51/6NcVZ8M13SguyQ5cfCOARh7GUOp1H+vxHxMdbRDgBUK sKHxavnbOj01lpj0kUd864Xi
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Oct 15, 2021 at 11:48:33AM +0200, Jan Beulich wrote:
> On 15.10.2021 11:39, Jan Beulich wrote:
> > On 22.09.2021 10:21, Roger Pau Monne wrote:
> >> --- a/xen/include/public/domctl.h
> >> +++ b/xen/include/public/domctl.h
> >> @@ -87,14 +87,22 @@ struct xen_domctl_createdomain {
> >> /*
> >> * Various domain limits, which impact the quantity of resources
> >> * (global mapping space, xenheap, etc) a guest may consume. For
> >> - * max_grant_frames and max_maptrack_frames, < 0 means "use the
> >> - * default maximum value in the hypervisor".
> >> + * max_grant_frames, max_maptrack_frames and max_gnttab_version < 0
> >> + * means "use the default maximum value in the hypervisor".
> >> */
> >> uint32_t max_vcpus;
> >> uint32_t max_evtchn_port;
> >> int32_t max_grant_frames;
> >> int32_t max_maptrack_frames;
> >>
> >> +/* Grant version, use low 4 bits. */
> >> +#define XEN_DOMCTL_GRANT_version_mask 0xf
> >> +#define XEN_DOMCTL_GRANT_version_default 0xf
> >> +
> >> +#define XEN_DOMCTLGRANT_MAX XEN_DOMCTL_GRANT_version_mask
> >> +
> >> + uint32_t grant_opts;
> >
> > As it now seems unlikely that this will make 4.16, please don't forget
> > to bump the interface version for 4.17. With that and preferably with
> > the nit above addressed, hypervisor parts:
> > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Actually no, I'm afraid there is an issue with migration: If the tool
> stack remembers the "use default" setting and hands this to the new
> host, that host's default may be different from the source host's. It
> is the effective max-version that needs passing on in this case, which
> in turn requires a means to obtain the value.
Hm, my thinking was that the admin (or a higer level orchestration
tool) would already have performed the necessary adjustments to assert
the environments are compatible.
This problem already exist today where you can migrate a VM from a
host having the max default grant version to one having
gnttab=max-ver:1 without complains.
Note that adding such a check would then effectively prevent us from
lowering the default max grant version, as any incoming migration from
a previous hypervisor using the default parameters would be rejected.
Thanks, Roger.
|