From: Paul Durrant <pdurrant@amazon.com>
To: <xen-devel@lists.xenproject.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Paul Durrant <pdurrant@amazon.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [Xen-devel] [PATCH v7 3/6] public/xen.h: add a definition for a 'valid domid' mask
Date: Fri, 21 Feb 2020 11:20:46 +0000 [thread overview]
Message-ID: <20200221112049.3077-4-pdurrant@amazon.com> (raw)
In-Reply-To: <20200221112049.3077-1-pdurrant@amazon.com>
A subsequent patch will modify libxl to allow selection of a random domid
value when creating domains. Valid values are limited to a width of 15 bits,
so add an appropriate mask definition to the public header.
NOTE: It is reasonable for this mask definition to be in a Xen public header
rather than in, say, a libxenctrl header since it relates to the
validity of a value passed to XEN_DOMCTL_createdomain. This new
definition is placed in xen.h rather than domctl.h only to co-locate
it with other domid-related defitions.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Wei Liu <wl@xen.org>
v6:
- New in v6 (split out from another patch)
---
xen/include/public/xen.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index d2198dffad..75b1619d0d 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -614,6 +614,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
/* Idle domain. */
#define DOMID_IDLE xen_mk_uint(0x7FFF)
+/* Mask for valid domain id values */
+#define DOMID_MASK xen_mk_uint(0x7FFF)
+
#ifndef __ASSEMBLY__
typedef uint16_t domid_t;
--
2.20.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-21 11:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 11:20 [Xen-devel] [PATCH v7 0/6] xl/libxl: domid allocation/preservation changes Paul Durrant
2020-02-21 11:20 ` [Xen-devel] [PATCH v7 1/6] libxl: add infrastructure to track and query 'recent' domids Paul Durrant
2020-02-24 15:52 ` Ian Jackson
2020-02-21 11:20 ` [Xen-devel] [PATCH v7 2/6] libxl: modify libxl__logv() to only log valid domid values Paul Durrant
2020-02-21 12:07 ` Wei Liu
2020-02-21 11:20 ` Paul Durrant [this message]
2020-02-21 20:47 ` [Xen-devel] [PATCH v7 3/6] public/xen.h: add a definition for a 'valid domid' mask Julien Grall
2020-02-21 11:20 ` [Xen-devel] [PATCH v7 4/6] libxl: allow creation of domains with a specified or random domid Paul Durrant
2020-02-21 11:20 ` [Xen-devel] [PATCH v7 5/6] xl.conf: introduce 'domid_policy' Paul Durrant
2020-02-21 11:20 ` [Xen-devel] [PATCH v7 6/6] xl: allow domid to be preserved on save/restore or migrate Paul Durrant
2020-02-24 15:54 ` [Xen-devel] [PATCH v7 0/6] xl/libxl: domid allocation/preservation changes Ian Jackson
2020-02-24 16:32 ` Durrant, Paul
2020-02-24 17:22 ` Durrant, Paul
2020-02-24 17:56 ` Ian Jackson
2020-02-25 8:26 ` Durrant, Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200221112049.3077-4-pdurrant@amazon.com \
--to=pdurrant@amazon.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.