Skip to content

Move parts of Arm's Dom0less to common code

Oleksii Kurochko xen-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 6 repliesIn review
  2. v38 patches 21 repliesSuperseded
  3. v28 patches 15 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v19 patches10 repliesSuperseded

Changes in v4 from the cover letter

- Drop item 3 from the cover letter message as it was decided to rename dom0less to predefined domains separately.
- Update the link with results of CI testing.
- All other changes please look in the specific patch.
---

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8xen/arm: drop declaration of handle_device_interrupts()xen/arch/arm/include/asm/domain_build.h+0 -110 replies
2/8xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS commonxen/arch/arm/Kconfig xen/arch/arm/dom0less-build.c xen/arch/arm/include/asm/Makefile +5 more+415 -3571 reply
3/8asm-generic: move parts of Arm's asm/kernel.h to common codexen/arch/arm/acpi/domain_build.c xen/arch/arm/dom0less-build.c xen/arch/arm/domain_build.c +10 more+198 -1531 reply
4/8arm/static-shmem.h: drop inclusion of asm/setup.hxen/arch/arm/dom0less-build.c xen/arch/arm/include/asm/static-shmem.h xen/common/device-tree/dt-overlay.c+3 -11 reply
5/8asm-generic: move some parts of Arm's domain_build.h to commonxen/arch/arm/acpi/domain_build.c xen/arch/arm/dom0less-build.c xen/arch/arm/domain_build.c +4 more+41 -101 reply
6/8xen/common: dom0less: introduce common kernel.cxen/arch/arm/Kconfig xen/arch/arm/kernel.c xen/common/Kconfig +3 more+267 -2160 replies
7/8xen/common: dom0less: introduce common domain-build.cxen/arch/arm/domain_build.c xen/arch/arm/include/asm/domain_build.h xen/common/device-tree/Makefile +2 more+438 -4051 reply
8/8xen/common: dom0less: introduce common dom0less-build.cxen/arch/arm/dom0less-build.c xen/common/device-tree/dom0less-build.c xen/include/asm-generic/dom0less-build.h+760 -6801 reply

Reviews trailers per patch

6 of 8 patches have a Reviewed-by or Acked-by.

PatchStefano StabelliniMichal Orzel
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8
7/8R-b
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/8] Move parts of Arm's Dom0less to common code

Some parts of Arm's Dom0less solution could be moved to common code as they are not truly Arm-specific.

Most of the code is moved as is, with only minor changes introduced to provide abstractions that hide Arm-specific details, while maintaining functional equivalence with original Arm's code.

There are several open questions:
1. The u64 and u32 types are widely used in the code where device tree functionality is implemented because these types are used in device tree function arguments.
Should this be reworked to use uint32_t and uint64_t instead? If so, will it also be necessary to change the type of variables passed to dt-related functions, or should the argument types of device tree functions be updated too? For example:

   ```
    u64 mem;
    ...
    rc = dt_property_read_u64(node, "memory", &mem);
   ```
   where dt_property_read_u64 is declared as:
     bool dt_property_read_u64(... , u64 *out_value);
2. Instead of providing init_intc_phandle() (see the patch: [1]), perhaps it
   would be better to add a for loop in domain_handle_dtb_bootmodule()?
   Something like:
   ```
    bool is_intc_phandle_inited = false;
    for ( unsigned int i = 0; i < ARRAY_SIZE(intc_names_array); i++ )
    {
        if ( dt_node_cmp(name, intc_names_array[i]) == 0 )
        {
            uint32_t phandle_intc = fdt_get_phandle(pfdt, node_next);

            if ( phandle_intc != 0 )
                kinfo->phandle_intc = phandle_intc;

            is_intc_phandle_inited = true;
            break;
        }
    }

    if ( is_intc_phandle_inited ) continue;
  ```

CI's test for the current patch series:
https://gitlab.com/xen-project/people/olkur/xen/-/pipelines/1801183107

---
Changes in v4:
- Drop item 3 from the cover letter message as it was decided to rename dom0less to predefined domains separately.
- Update the link with results of CI testing.
- All other changes please look in the specific patch.
---
Changes in v3:
- Rebase on top of current staging and fixing merge conflicts.
- Ingrate changes done in the commit:
"xen/arm: dom0less delay xenstore initialization"
- All other changes please look in the specific patch.
- Update cover letter message.
---
Changes in v2:
- Update cover letter message.
- Rebase on top of the current staging.
- Drop patches:
- asm-generic: move Arm's static-memory.h to asm-generic
- asm-generic: move Arm's static-shmem.h to asm-generic
as in the nearest future there is no real users of STATIC_MEMORY and STATIC_SHMEM.
- Add new cleanup patch:
[PATCH v2 1/8] xen/arm: drop declaration of handle_device_interrupts()
- All other changes are patch specific. Please check them seprately for each patch
---

Oleksii Kurochko (8):
xen/arm: drop declaration of handle_device_interrupts() xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS common
asm-generic: move parts of Arm's asm/kernel.h to common code arm/static-shmem.h: drop inclusion of asm/setup.h
asm-generic: move some parts of Arm's domain_build.h to common xen/common: dom0less: introduce common kernel.c xen/common: dom0less: introduce common domain-build.c xen/common: dom0less: introduce common dom0less-build.c

 xen/arch/arm/Kconfig                      |   10 +-
 xen/arch/arm/acpi/domain_build.c          |    3 +-
 xen/arch/arm/dom0less-build.c             | 1078 ++-------------------
 xen/arch/arm/domain_build.c               |  410 +-------
 xen/arch/arm/include/asm/Makefile         |    1 +
 xen/arch/arm/include/asm/dom0less-build.h |   34 -
 xen/arch/arm/include/asm/domain_build.h   |   32 +-
 xen/arch/arm/include/asm/kernel.h         |  123 +--
 xen/arch/arm/include/asm/static-memory.h  |    2 +-
 xen/arch/arm/include/asm/static-shmem.h   |    3 +-
 xen/arch/arm/kernel.c                     |  235 +----
 xen/arch/arm/static-memory.c              |    1 +
 xen/arch/arm/static-shmem.c               |    2 +
 xen/common/Kconfig                        |   15 +
 xen/common/device-tree/Makefile           |    3 +
 xen/common/device-tree/dom0less-build.c   | 1002 +++++++++++++++++++
 xen/common/device-tree/domain-build.c     |  395 ++++++++
 xen/common/device-tree/dt-overlay.c       |    4 +-
 xen/common/device-tree/kernel.c           |  242 +++++
 xen/include/asm-generic/dom0less-build.h  |   84 ++
 xen/include/xen/fdt-domain-build.h        |   75 ++
 xen/include/xen/fdt-kernel.h              |  145 +++
 22 files changed, 2094 insertions(+), 1805 deletions(-)
 delete mode 100644 xen/arch/arm/include/asm/dom0less-build.h
 create mode 100644 xen/common/device-tree/dom0less-build.c
 create mode 100644 xen/common/device-tree/domain-build.c
 create mode 100644 xen/common/device-tree/kernel.c
 create mode 100644 xen/include/asm-generic/dom0less-build.h
 create mode 100644 xen/include/xen/fdt-domain-build.h
 create mode 100644 xen/include/xen/fdt-kernel.h
Signature · 1 line
2.49.0