diff options
author | Roger Pau Monné <roger.pau@citrix.com> | 2021-11-17 08:12:00 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-11-17 08:12:00 +0100 |
commit | 2abeaf319c59d3446e03264e25987200eb4217ca (patch) | |
tree | c08bdcfa102d7298711ffab5638aee99ad9d5090 /xen/include | |
parent | 2d72d2784eb71d8532bfbd6462d261739c9e82e4 (diff) |
domctl: introduce a macro to set the grant table max version
Such macro just clamps the passed version to fit in the designated
bits of the domctl field. The main purpose is to make it clearer in
the code when max grant version is being set in the grant_opts field.
Existing users that where setting the version in the grant_opts field
are switched to use the macro.
No functional change intended.
Requested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Diffstat (limited to 'xen/include')
-rw-r--r-- | xen/include/public/domctl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 1c21d4dc75..b85e6170b0 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -99,6 +99,7 @@ struct xen_domctl_createdomain { /* Grant version, use low 4 bits. */ #define XEN_DOMCTL_GRANT_version_mask 0xf +#define XEN_DOMCTL_GRANT_version(v) ((v) & XEN_DOMCTL_GRANT_version_mask) uint32_t grant_opts; |