[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] gnttab: allow per-domain control over transitive grants
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 20 Sep 2021 10:32:24 +0100
- 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; bh=nHjxeA3dzMdrSXROFM0Iq38LOnMVMcK3+TJ654bNhG0=; b=A/fq6vpPyJC/i8cBDpJRvtdtQvT1fitHyI9uWj47OJ6zuWXHcDXxRPDOzGvgPmSrR41JfEKd6A/WvsiVsL9lr2umlnGQ0Oxj/S4mxKawnwd+IDmRP0Vse3QPgEOfudmH8nYGUAIJZ3WgCjrC2oD96K8uJmeq8orOcWaU5pd1aAFu0Yl0mAAgHmp+7WSMhPNvcjMtP/7+m1tfHIimlCB2QUtxkC1CLWAOkoNqxFRUshN7kNTtg4k6kPdnyFHUVVueUKqes1gVnM5tN2iX5tIncB4Rlddq0AIggkmGa86ho7eVPUcjC/WFiGkZrKq551aMZG63eb9QhB7Cf+HyAzqmYg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m4Was3vY7KLasnAynXbzxpffCvstLd+voixBI2/55FZONnGQ5SQq0GOKWShoA2rjwvmJSZSdoMQn3xtEatHHU5uhiysJZvKGhrZeWLQdFreEky3W/Rs3ndi4YHL4xw/3UuK8mXFu1iIKzUdLWQHv3/HGHLaSdMp3UQMvX2p20GbbY2lZzgxq2vZmqbik3pkUs/OEE7+UBdc80iexpp921lXwAMFYzNhfYhToSOX7xMYhf7hzJARGQ4UrQZh+7yIvRofCnutj6H0hexXTo+GENZ5S0O1qoAUGlu9Lm8izgANfqsJO7umH+i4/EHYX7Jq35ZKZYXSk2Tcc5v0KmbyWFw==
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, 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>
- Delivery-date: Mon, 20 Sep 2021 09:32:52 +0000
- Ironport-data: A9a23:92j7XqnN9l3/x0hd/uSg+Dfo5gwqIURdPkR7XQ2eYbSJt1+Wr1Gzt xIeUWqOOfncYjTyeN4iPYiz9koO7JaByoc3QFFl/yxnRiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA185IMsdoUg7wbdh09Qw2YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NFqupHvRB5wArbvh8EaVh9DSC45PIQTrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBODtMJkSpTdLyjbBAOx9aZvCX7/L9ZlT2zJYasVmQKqON pZCN2oHgBLoMyxuCgcYKaoCgL2Lq37AcgEFqm+ouv9ii4TU5FMoi+W8WDbPQfSVQe1Fk0Deo XjJl0z7CBwHMN2U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vRNzJOR pvn+r+L6WyeNFMzbkLMiAMn3
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 17/09/2021 16:46, Roger Pau Monne wrote:
> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> index 7f8456c50e..fe2201fca1 100644
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -96,6 +96,14 @@ struct xen_domctl_createdomain {
> int32_t max_maptrack_frames;
> int32_t max_grant_version;
>
> +/* Allow transitive grants. */
> +#define _XEN_DOMCTL_GRANT_transitive 0
> +#define XEN_DOMCTL_GRANT_transitive (1U << _XEN_DOMCTL_GRANT_transitive)
There's no need for bit position variables.
> +
> +#define XEN_DOMCTL_GRANT_MAX XEN_DOMCTL_GRANT_transitive
> +
> + uint32_t grant_opts;
So far, we've got 3 bits of information, v1, v2 and transitive, and
we're tight on space in the structure with loads more to fit in.
I was thinking grant_flags or equiv to contain these 3 settings, and any
further which might appear.
One thing which is missing however is the enumeration of which settings
are available, and rejection of bad settings. If v2 is disabled
globally, trying to create a VM with v2 needs to fail.
~Andrew
|