[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: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 15 Oct 2021 11:39:52 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=oIAWWs9j41bH0x/Er5tH9xUdRz2opxoNRR4Bc7MFB28=; b=Qvp6nB1M4DNfPBeh2sQ4to1JJ0crhiabpWyInN+hmgicaW8FkB8Xz/n11U1ZZ+QbokOcrWjHvF75koIn4HD53x7lbUB0/QJFSH11f2/JJWP7ZMdWVltRHAu6thVn21e5RG31x9Q/pucV5IrmvRZkiTbsiXQU+63tT0v2Kz0sHtBwZTO6S+gNG5UCutG8vrA3dBIVOPcAzOA5088nImWSEDiIRRyTJh2Js1RcKZcKeQIET3raft27QlJwcCIjoUCiS+TQ1tV43ATaz0hRQdnSInztNbHHM39fTs15PySwOz+oTFtDcdwIJy4Lhjg2jPStQ7mV8CLNi7SpWiKx2k6omw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JM6jmeUGQBsAc3IFlQf0xnjoyX43uBSq3aquXCFP6Ie+VdqNf+E2K9JA4Br+nH4Fhmi9Htg+SSD/GN7lthiN2jDN3hy0S7LOhfqhhHTLRTRyAcebaIxf/vqq+Z17xce/aFnjZ7J4dIOcHWVc6j8SndDwvkZa8GGjTRDjrEOUz4PAohjGbOlwfnTQ55W/uNefem4KYFqar14it31CmCbP6Yhz/w65Tgj4cHxGUkabLqPxUs/dX8eytY7l6B4Z2bcoOzkwCBuhtdj9+e04D0CjIVGzathDm3caK7VSy+uN6q2qFqZwBiRdsnSbd2ZEA2a+IWkpH7B4dftP0nAF7OFyTA==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.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: Fri, 15 Oct 2021 09:40:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 22.09.2021 10:21, Roger Pau Monne wrote:
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -53,6 +53,7 @@ struct grant_table {
> percpu_rwlock_t lock;
> /* Lock protecting the maptrack limit */
> spinlock_t maptrack_lock;
> + unsigned int max_grant_version;
Nit: I realize the version field also has "gt" in its name, but just
like I consider that superfluous, I don't think "grant" needs to be
in the field name here.
> --- 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>
Jan
|