diff --git a/CHANGELOG.md b/CHANGELOG.md index 25f5a192ed..1db3efc486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [4.22.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD ### Changed + - Users of XEN_DOMCTL_createdomain/xc_domain_create() must now pass DOMID_ANY + to obtain an automatically allocated domid. The prior sentinel values (0 + since the start of Xen, and DOMID_INVALID since Xen 4.21) now no longer + represent a wildcard input. - On x86: - Enable pf-fixup option by default for PVH dom0. diff --git a/tools/helpers/init-xenstore-domain.c b/tools/helpers/init-xenstore-domain.c index 01ca667d25..2be5831a57 100644 --- a/tools/helpers/init-xenstore-domain.c +++ b/tools/helpers/init-xenstore-domain.c @@ -21,7 +21,7 @@ #define LAPIC_BASE_ADDRESS 0xfee00000UL -static uint32_t domid = ~0; +static uint32_t domid = DOMID_ANY; static char *kernel; static char *ramdisk; static char *flask; diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index 97108b9d86..147afa62c2 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -208,7 +208,9 @@ let with_intf f = external domain_create_stub: handle -> domid -> domctl_create_config -> domid = "stub_xc_domain_create" -let domain_create handle ?(domid=0) config = +let domid_any = 0x7ff5 (* DOMID_ANY from public/xen.h *) + +let domain_create handle ?(domid=domid_any) config = domain_create_stub handle domid config external domain_sethandle: handle -> domid -> string -> unit diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 9feb12ae2b..a94f01d40b 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -118,7 +118,7 @@ static PyObject *pyxc_domain_create(XcObject *self, PyObject *args, PyObject *kwds) { - uint32_t dom = 0, target = 0, max_grant_version = 2; + uint32_t dom = DOMID_ANY, target = 0, max_grant_version = 2; int ret; size_t i; PyObject *pyhandle = NULL;