]> xenbits.xensource.com Git - xen.git/commit
xen/arm: Allow to set grant table related limits for dom0less domUs
authorMichal Orzel <michal.orzel@amd.com>
Mon, 19 Dec 2022 08:59:08 +0000 (09:59 +0100)
committerStefano Stabellini <stefano.stabellini@amd.com>
Thu, 22 Dec 2022 01:20:43 +0000 (17:20 -0800)
commit9c57a297378932249c3edefa5065c838f47cb3fb
tree1750bead93eea0703eb0eeedc62c50a7088f9fd9
parentdc380df12acfe53ccdcbeecaaee3510a3b0e374e
xen/arm: Allow to set grant table related limits for dom0less domUs

At the moment, for dom0less domUs, we do not have a way to specify
per domain grant table related limits (unlike when using xl), namely
max version, max number of grant frames, max number of maptrack frames.
This means that such domains always use the values specified by the Xen
command line parameters or their default values if unspecified.

In order to have more control over dom0less domUs, introduce the
following device-tree properties that can be set under domUs nodes:
 - max_grant_version to set the maximum grant table version the domain
   is allowed to use,
 - max_grant_frames to set the maximum number of grant frames the domain
   is allowed to have,
 - max_maptrack_frames to set the maximum number of grant maptrack frames
   the domain is allowed to have.

Update documentation accordingly.

Note that the values obtained from device tree are of type uint32_t,
whereas the d_cfg.max_{grant_frames,maptrack_frames} are of type int32_t.
Call panic in case of overflow. Other sanity checks are already there in
grant_table_init() resulting in panic in case of errors, therefore no
need to repeat them in create_domUs().

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
docs/misc/arm/device-tree/booting.txt
xen/arch/arm/domain_build.c