[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/6] domctl: set XEN_DOMCTL_createdomain 'rover' if valid domid is specified
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@xxxxxxxxxx> --- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Julien Grall <julien@xxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Wei Liu <wl@xxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |