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 <[email protected]>
Jan