[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/3] xen/arm: dom0less: Add trap-unmapped-accesses
Hi Edgar, On 29/05/2025 16:50, Edgar E. Iglesias wrote: From: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxx> Add the trap-unmapped-accesses per-domain fdt property. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xxxxxxx> --- docs/misc/arm/device-tree/booting.txt | 9 +++++++++ xen/arch/arm/dom0less-build.c | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt index 59fa96a82e..8a5c40ddf3 100644 --- a/docs/misc/arm/device-tree/booting.txt +++ b/docs/misc/arm/device-tree/booting.txt @@ -225,6 +225,15 @@ with the following properties: option is provided with a non zero value, but the platform doesn't support SVE.+- trap-unmapped-accesses+ + Optional. An integer that configures handling of accesses to unmapped + address ranges. + If set to 0, guest accesses will read 0xFFFFFFFF and writes will be ignored. Looking at the code, if I am not mistaken, it will only return this value for 32-bit. For 64-bit there will be a few Fs more and for less there will be less. So I think this needs to be reworded. The rest looks good to me. + + This option is only implemented for ARM where the default is 1. + - xen,enhancedA string property. Possible property values are:diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index a4e0a33632..69324aa597 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -344,8 +344,15 @@ void __init arch_create_domUs(struct dt_device_node *node, #endif }- /* Trap accesses to unmapped areas. */+ /* Trap unmapped accesses by default. */ d_cfg->flags |= XEN_DOMCTL_CDF_trap_unmapped_accesses; + if ( dt_property_read_u32(node, "trap-unmapped-accesses", &val) ) + { + if ( val > 1 ) + panic("trap-unmapped-accesses: supported values are 0 or 1"); + if ( !val ) + d_cfg->flags &= ~XEN_DOMCTL_CDF_trap_unmapped_accesses; + } }int __init init_intc_phandle(struct kernel_info *kinfo, const char *name, Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |