From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel@lists.xenproject.org, julien@xen.org,
bertrand.marquis@arm.com, michal.orzel@amd.com,
Volodymyr_Babchuk@epam.com, edgar.iglesias@amd.com
Subject: Re: [PATCH v1 2/3] xen/arm: dom0less: Add trap-unmapped-mmio-disabled
Date: Thu, 29 May 2025 17:30:58 +0200 [thread overview]
Message-ID: <aDh9svFAad5xjuTr@zapote> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2505281736340.135336@ubuntu-linux-20-04-desktop>
On Wed, May 28, 2025 at 05:41:34PM -0700, Stefano Stabellini wrote:
> On Tue, 27 May 2025, Edgar E. Iglesias wrote:
> > From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
> >
> > Add the trap-unmapped-mmio-disabled per-domain fdt property.
> >
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
> > ---
> > docs/misc/arm/device-tree/booting.txt | 7 +++++++
> > xen/arch/arm/dom0less-build.c | 3 ++-
> > 2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt
> > index 59fa96a82e..75fbb245d1 100644
> > --- a/docs/misc/arm/device-tree/booting.txt
> > +++ b/docs/misc/arm/device-tree/booting.txt
> > @@ -225,6 +225,13 @@ with the following properties:
> > option is provided with a non zero value, but the platform doesn't support
> > SVE.
> >
> > +- trap-unmapped-mmio-disabled
> > +
> > + Optional. A boolean property that configures handling of accesses to
> > + unmapped MMIO ranges.
> > + If set, guest accesses will read 0xFFFFFFFF and writes ignored.
> > + If not set, guest accesses will trap.
>
> I would prefer that we are consistent with the name of the parameter we
> use in libxl and elsewhere so I would stick with trap-unmapped-mmio
> without -disabled.
>
> We can still default the property to "enabled" when absent. Although
> this is not a common pattern for device tree, it happens and for
> instance the property "status" works that way as it is implied to be
> "enabled" when absent.
Sounds good Stefano,
Boolean DT props have no values so we can't have a default of true since
there wouldn't be a way of setting it to false.
But we can make trap-unmapped-acceses an integer. E.g:
trap-unmapped-acceses = <0>; // Disabled
trap-unmapped-acceses = <1>; // Enabled
// trap-unmapped-acceses not present defaults to Enabled.
I've done this latter for v2, avoiding the -disable suffix.
Cheers,
Edgar
>
>
> > - xen,enhanced
> >
> > A string property. Possible property values are:
> > diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c
> > index e5e13e07d0..cd1ef05d89 100644
> > --- a/xen/arch/arm/dom0less-build.c
> > +++ b/xen/arch/arm/dom0less-build.c
> > @@ -344,8 +344,9 @@ void __init arch_create_domUs(struct dt_device_node *node,
> > #endif
> > }
> >
> > - /* Trap accesses to unmapped MMIO. */
> > d_cfg->arch.flags = XEN_ARM_TRAP_UNMAPPED_MMIO;
> > + if ( dt_property_read_bool(node, "trap-unmapped-mmio-disabled") )
> > + d_cfg->arch.flags &= ~XEN_ARM_TRAP_UNMAPPED_MMIO;
> > }
> >
> > int __init init_intc_phandle(struct kernel_info *kinfo, const char *name,
> > --
> > 2.43.0
> >
next prev parent reply other threads:[~2025-05-29 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 19:56 [PATCH v1 0/3] xen/arm: Add option to optionally disable trapping on unmapped mmio Edgar E. Iglesias
2025-05-27 19:56 ` [PATCH v1 1/3] xen/arm: Add a way to disable traps on unmapped MMIO Edgar E. Iglesias
2025-05-29 0:34 ` Stefano Stabellini
2025-05-27 19:56 ` [PATCH v1 2/3] xen/arm: dom0less: Add trap-unmapped-mmio-disabled Edgar E. Iglesias
2025-05-29 0:41 ` Stefano Stabellini
2025-05-29 15:30 ` Edgar E. Iglesias [this message]
2025-05-27 19:56 ` [PATCH v1 3/3] tools/arm: Add the trap_unmapped_mmio xl config option Edgar E. Iglesias
2025-05-27 20:03 ` [PATCH v1 0/3] xen/arm: Add option to optionally disable trapping on unmapped mmio Andrew Cooper
2025-05-28 20:38 ` Edgar E. Iglesias
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aDh9svFAad5xjuTr@zapote \
--to=edgar.iglesias@gmail.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=edgar.iglesias@amd.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.