[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/5] arm: Implement ARM DEN 0057A PV time interface


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Koichiro Den <den@xxxxxxxxxxxxx>
  • Date: Sat, 5 Jul 2025 23:26:58 +0900
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=valinux.co.jp; dmarc=pass action=none header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qjzgNzrHi1pxQta0EvVAzeSeCUlBw1BKDpQC2d4HQVk=; b=HyTZ5MWSV3U7prjEIYFpizuSQoL8Cx9t11QvMUSAUY/6MAs14o+St4dJvQXocS8VOfpmLEluMdVmzM6n/KWRBp4f+EHYlA3QqDd1S6Ba2LvR2dk/3wjWvEIeZ8tHoFRNx1Qchw+ZzXjUX5iqxAry7MnDQMCDnFdToFoH2AHAa/3a+vyPU+/9ZkBZVt/cNu22IBHT59dwTt10h4cag3ovB7nPFlo57HB/0KMwr0+wGt+Aw0PNtP6ur9qM+dIEd9DaD4WU/zFZ4QpynpjrmpkioTlQH+rcOVVn9/GWCdbk6V4n66jsioJkKHXuZUVCKxoRNwx9MpY0FdTqQ9XFLHZQwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kjSP+nTV3MeNWXrvz9UT4tYKh+eUAhhGDIja2VYAotsaRbIpx3JyLzs0L6I1OXqrMZojYeDaQvbZMKelRiSuceINd3XlgDu2Hv2RUg7uOtph/pLAWyJLFvWZ8WqksHg431hLJot4MuMzUrspoYVR1OkwaOAEDXSHvYaUJAk/NcDJToijkbqB6yuH8RvGoTQpDmXDdeu4N6WWeF4rxRVHfEHhWLk7aMezX2Soupez+oBVE8mVX/SVHCh5b2SvMOC6Y1dvYKMe54u8sN0E/IAZCzM/uJMj+FbtPIsbRFJ61wOgh4yzI5hPwqfjgw83OnPJLBnKYtvz2TDmmkVUyTDUPg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=valinux.co.jp;
  • Cc: Koichiro Den <den@xxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Sat, 05 Jul 2025 14:27:44 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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-den@xxxxxxxxxxxxx/


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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.