All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 0/3] Add handling of extended regions (safe ranges) on Arm (Was "xen/memory: Introduce a hypercall to provide unallocated space")
@ 2021-09-29 22:52 Oleksandr Tyshchenko
  2021-09-29 22:52 ` [PATCH V4 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo Oleksandr Tyshchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Oleksandr Tyshchenko @ 2021-09-29 22:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Oleksandr Tyshchenko, Ian Jackson, Wei Liu, Anthony PERARD,
	Andrew Cooper, George Dunlap, Jan Beulich, Julien Grall,
	Stefano Stabellini, Juergen Gross, Volodymyr Babchuk,
	Roger Pau Monné,
	Henry Wang, Bertrand Marquis, Wei Chen

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

You can find an initial discussion at [1]-[4].

The extended region (safe range) is a region of guest physical address space
which is unused and could be safely used to create grant/foreign mappings instead
of wasting real RAM pages from the domain memory for establishing these mappings.

The extended regions are chosen at the domain creation time and advertised
to it via "reg" property under hypervisor node in the guest device-tree
(the indexes for extended regions are 1...N).
No device tree bindings update is needed, guest infers the presense of extended
regions from the number of regions in "reg" property.
New compatible/property will be needed (but only after this patch [5] or alternative
goes in) to indicate that "region 0 is safe to use". Until this patch is merged it is
not safe to use extended regions for the grant table space.

The extended regions are calculated differently for direct mapped Dom0 (with and without
IOMMU) and non-direct mapped DomUs.

Please note the following limitations:
- The extended region feature is only supported for 64-bit domain currently.
- The ACPI case is not covered.

Xen patch series is also available at [6]. The corresponding Linux patch series is at [7]
for now (last 4 patches).

Tested on Renesas Salvator-X board + H3 ES3.0 SoC (Arm64) with updated virtio-disk backend [8]
running in Dom0 (256MB RAM) and DomD (2GB RAM). In both cases the backend pre-maps DomU memory
which is 3GB. All foreign memory gets mapped into extended regions (so the amount of RAM in
the backend domain is not reduced). No issues were observed.

[1] https://lore.kernel.org/xen-devel/1627489110-25633-1-git-send-email-olekstysh@gmail.com/
[2] https://lore.kernel.org/xen-devel/1631034578-12598-1-git-send-email-olekstysh@gmail.com/
[3] https://lore.kernel.org/xen-devel/1631297924-8658-1-git-send-email-olekstysh@gmail.com/
[4] https://lore.kernel.org/xen-devel/1632437334-12015-1-git-send-email-olekstysh@gmail.com/
[5] https://lore.kernel.org/xen-devel/1632425551-18910-1-git-send-email-olekstysh@gmail.com/
[6] https://github.com/otyshchenko1/xen/commits/map_opt_ml5
[7] https://github.com/otyshchenko1/linux/commits/map_opt_ml4
[8] https://github.com/otyshchenko1/virtio-disk/commits/map_opt_next

Oleksandr Tyshchenko (3):
  xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo
  xen/arm: Add handling of extended regions for Dom0
  libxl/arm: Add handling of extended regions for DomU

 docs/misc/xen-command-line.pandoc |  11 ++
 tools/include/libxl.h             |   7 +
 tools/libs/light/libxl.c          |   2 +
 tools/libs/light/libxl_arm.c      |  70 +++++++++-
 tools/libs/light/libxl_types.idl  |   2 +
 tools/xl/xl_info.c                |   2 +
 xen/arch/arm/domain_build.c       | 286 +++++++++++++++++++++++++++++++++++++-
 xen/arch/arm/sysctl.c             |   2 +
 xen/arch/x86/sysctl.c             |   2 +
 xen/include/public/arch-arm.h     |   3 +
 xen/include/public/sysctl.h       |   4 +-
 11 files changed, 382 insertions(+), 9 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-10-06 18:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 22:52 [PATCH V4 0/3] Add handling of extended regions (safe ranges) on Arm (Was "xen/memory: Introduce a hypercall to provide unallocated space") Oleksandr Tyshchenko
2021-09-29 22:52 ` [PATCH V4 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo Oleksandr Tyshchenko
2021-09-30 23:00   ` Stefano Stabellini
2021-10-01  7:50     ` Jan Beulich
2021-10-01  8:19       ` Oleksandr
2021-10-01 23:24         ` Stefano Stabellini
2021-10-02  7:35           ` Julien Grall
2021-10-02 14:08             ` Oleksandr
2021-10-04 21:11               ` Stefano Stabellini
2021-10-05 19:49                 ` Oleksandr
2021-09-29 22:52 ` [PATCH V4 2/3] xen/arm: Add handling of extended regions for Dom0 Oleksandr Tyshchenko
2021-09-30 15:36   ` Luca Fancellu
2021-09-30 22:53   ` Stefano Stabellini
2021-10-02  0:33   ` Stefano Stabellini
2021-10-02 12:40     ` Oleksandr
2021-10-04  6:41     ` Julien Grall
2021-10-04  6:59   ` Julien Grall
2021-10-04 12:08     ` Oleksandr
2021-10-06 18:11       ` Julien Grall
2021-10-06 18:15         ` Oleksandr Tyshchenko
2021-10-06 18:35           ` Julien Grall
2021-09-29 22:52 ` [PATCH V4 3/3] libxl/arm: Add handling of extended regions for DomU Oleksandr Tyshchenko
2021-10-05 19:42   ` Oleksandr
2021-10-05 21:36     ` Stefano Stabellini
2021-10-06 10:11       ` Oleksandr

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.