This series proposes the standard PV time implementation as per ARM DEN 0057A.
The first three commits are preparatory work, where no functional changes are
intended.

The motivation:

  The VCPUOP_register_runstate_memory_area hypercall is still actively
  used, e.g., in the Linux arm64. When KPTI is enabled, the area was not
  registered from the beginning due to the VA not always being valid. In
  such cases, Linux could fall back to using the standard PV time interface
  (ARM DEN 0057A), but this interface has not been implemented in Xen for
  arm64.

  Meanwhile, the VCPUOP_register_runstate_phys_area was introduced, though
  it's unclear whether this would be used in Linux arm64, nor when it will
  be prevalent amongst every possible downstream domain Linux variant even
  if so. And of course Linux is not an only option for the Xen arm64.

  Therefore, implementing the standard way of sharing PV time may be
  generically beneficial, reducing reliance on specially crafted
  hypercalls, the usage of which by guest VMs is not always guaranteed.
  Note that the PV_TIME_ST interface communicates with IPA (GPA), not GVA.


Changes in v2:
- incorporated review feedback (some no longer apply after code changes)
- add support for domains created via the toolstack ([PATCH v2 5/5])
- miscellaneous fixes and refinements.

RFC (v1): 
https://lore.kernel.org/xen-devel/20250621151201.896719-1-...@valinux.co.jp/


Koichiro Den (5):
  xen/arm: Generalize memory hole finding at the final stage
  xen/arm: Reorder hypervisor node creation
  xen/arm: Move make_resv_memory_node()
  xen/arm: Implement standard PV time interface as per ARM DEN 0057A
  xen/arm: Support ARM standard PV time for domains created via
    toolstack

 tools/libs/light/libxl_arm.c          | 185 +++++++++++---
 xen/arch/arm/domain.c                 |  68 ++++++
 xen/arch/arm/domain_build.c           | 334 +++++++++++++++++++++++---
 xen/arch/arm/include/asm/domain.h     |  23 ++
 xen/arch/arm/include/asm/kernel.h     |   2 +
 xen/arch/arm/include/asm/p2m.h        |   3 +
 xen/arch/arm/include/asm/smccc.h      |  12 +
 xen/arch/arm/mm.c                     |  14 ++
 xen/arch/arm/p2m.c                    |   6 +-
 xen/arch/arm/vsmc.c                   |  35 +++
 xen/common/device-tree/static-shmem.c |  40 ---
 xen/include/public/memory.h           |   1 +
 xen/include/xen/fdt-domain-build.h    |   2 +
 xen/include/xen/macros.h              |   1 +
 xen/include/xen/static-shmem.h        |  15 +-
 15 files changed, 619 insertions(+), 122 deletions(-)

-- 
2.48.1


Reply via email to