All of lore.kernel.org
 help / color / mirror / Atom feed
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 4/6] domctl: set XEN_DOMCTL_createdomain 'rover' if valid domid is specified
Date: Tue, 24 Dec 2019 13:04:14 +0000	[thread overview]
Message-ID: <20191224130416.3570-5-pdurrant@amazon.com> (raw)
In-Reply-To: <20191224130416.3570-1-pdurrant@amazon.com>

The value of 'rover' is the value at which Xen will start searching for an
unused domid if none is specified. Currently it is only updated when a
domid is automatically chosen, rather than specified by the caller, which
makes it very hard to describe Xen's rationale in choosing domids in an
environment where some domain creations have specified domids and some
don't.
This patch always updates 'rover' after a successful creation, even in the
case that domid is specified by the caller. This ensures that, if Xen
automatically chooses a domid for a subsequent domain creation it will
always be the next available value after the domid of the most recently
created domain.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@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>
---
 xen/common/domctl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 650310e874..5268f3967b 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -521,8 +521,6 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
             ret = -ENOMEM;
             if ( dom == rover )
                 break;
-
-            rover = dom;
         }
 
         d = domain_create(dom, &op->u.createdomain, false);
@@ -534,7 +532,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
         }
 
         ret = 0;
-        op->domain = d->domain_id;
+        rover = op->domain = d->domain_id;
         copyback = 1;
         d = NULL;
         break;
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-12-24 13:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24 13:04 [Xen-devel] [PATCH 0/6] xl/libxl: allow creation of domains with a specified domid Paul Durrant
2019-12-24 13:04 ` [Xen-devel] [PATCH 1/6] libxl: add definition of INVALID_DOMID to the API Paul Durrant
2020-01-02 17:18   ` Ian Jackson
2019-12-24 13:04 ` [Xen-devel] [PATCH 2/6] libxl_create: make 'soft reset' explicit Paul Durrant
2020-01-02 17:22   ` Ian Jackson
2019-12-24 13:04 ` [Xen-devel] [PATCH 3/6] domctl: return EEXIST from XEN_DOMCTL_createdomain Paul Durrant
2020-01-02 17:22   ` Ian Jackson
2019-12-24 13:04 ` Paul Durrant [this message]
2020-01-02 17:25   ` [Xen-devel] [PATCH 4/6] domctl: set XEN_DOMCTL_createdomain 'rover' if valid domid is specified Ian Jackson
2020-01-03  9:11     ` Durrant, Paul
2020-01-02 17:30   ` Andrew Cooper
2019-12-24 13:04 ` [Xen-devel] [PATCH 5/6] libxl: allow creation of domains with specified or random domid Paul Durrant
2020-01-02 17:27   ` Ian Jackson
2020-01-03  9:19     ` Durrant, Paul
2020-01-03 19:24   ` Jason Andryuk
2019-12-24 13:04 ` [Xen-devel] [PATCH 6/6] xl: allow specified domain id to be used for create, restore and migrate Paul Durrant
2020-01-02 17:29   ` Ian Jackson
2020-01-03  9:23     ` 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=20191224130416.3570-5-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.