Patch 1 introduces new domid_{alloc,free} calls.
Patch 2 introduces some basic testing for domain ID allocator.
Patch 3 adjusts create_dom0() messages (use %pd).
Link to v11: https://lore.kernel.org/xen-devel/20250728183427.1013975-1-dmukhin@ford.com/
Link to CI: https://gitlab.com/xen-project/people/dmukhin/xen/-/pipelines/1955867124
Denis Mukhin (3):
xen/domain: unify domain ID allocation
tools/tests: introduce unit tests for domain ID allocator
xen/domain: update create_dom0() messages
tools/tests/Makefile | 2 +-
tools/tests/domid/.gitignore | 2 +
tools/tests/domid/Makefile | 51 +++++++++
tools/tests/domid/include/xen/domain.h | 135 ++++++++++++++++++++++++
tools/tests/domid/test-domid.c | 78 ++++++++++++++
xen/arch/arm/domain_build.c | 13 ++-
xen/arch/x86/setup.c | 11 +-
xen/common/Makefile | 1 +
xen/common/device-tree/dom0less-build.c | 15 +--
xen/common/domain.c | 2 +
xen/common/domctl.c | 42 +-------
xen/common/domid.c | 94 +++++++++++++++++
xen/include/xen/domain.h | 3 +
13 files changed, 396 insertions(+), 53 deletions(-)
create mode 100644 tools/tests/domid/.gitignore
create mode 100644 tools/tests/domid/Makefile
create mode 100644 tools/tests/domid/include/xen/domain.h
create mode 100644 tools/tests/domid/test-domid.c
create mode 100644 xen/common/domid.c
--
2.34.1