All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zenghui Yu <zenghui.yu@linux.dev>
To: Mohamed Mediouni <mohamed@unpredictable.fr>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org, agraf@csgraf.de
Subject: Re: [PATCH rfc] hvf: arm: Inject SEA when executing insn in invalid memory range
Date: Sun, 22 Mar 2026 01:39:57 +0800	[thread overview]
Message-ID: <52bfd375-8d11-4f8e-9d2c-5e3b3da0e8f6@linux.dev> (raw)
In-Reply-To: <8D0BCB24-BB1B-40EF-A361-0F79D65600AE@unpredictable.fr>

On 3/22/26 1:26 AM, Mohamed Mediouni wrote:
> 
> > On 21. Mar 2026, at 18:09, Zenghui Yu <zenghui.yu@linux.dev> wrote:
> >
> > After hacking KUT to let the guest map a VA to IPA 0x1000000000 (an IPA
> > right after 64GB) and execute an insn on that VA, the guest receives an
> > insn abort with IFSC equals to 0x03 (Hello, AddressSize fault!). We can
> > _infer_ from that that the AddressSize fault is injected internally by
> > hvf.
> 
> Hello,
> 
> As far as I tell:
> 
> If the translation fails at stage-1, the fault is routed by hardware 
> to the guest directly instead of going to the hypervisor.

Oops,, you're right. Sorry for the noise on the AddressSize fault part.

Thanks,
Zenghui

> In the case where it’s not a valid IPA in the first place - instead
> of an unmapped one - the hardware triggers a fault to the guest instead
> of going to the hypervisor.
> 
> If the stage-1 translation is successful but the IPA is valid and not
> mapped, _then_ it gets trapped to the hypervisor, and gets routed to 
> user-space for VMM handling.
> 
> The EC_DATAABORT case happens on MMIO faults but the EC_INSNABORT 
> case is… more speculative for QEMU today.
> 
> I can see cases for doing it for on-demand page mappings in user-space
> though… where you’d map the page and then resume from the same PC.
> 
> With the current model QEMU uses I’d expect not handling EC_INSNABORT
> at all to not result in a functionality gap. 


      reply	other threads:[~2026-03-21 17:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-15 16:38 [PATCH rfc] hvf: arm: Inject SEA when executing insn in invalid memory range Zenghui Yu
2026-03-16  9:40 ` Alex Bennée
2026-03-16 10:05   ` Mohamed Mediouni
2026-03-16 10:54   ` Zenghui Yu
2026-03-20 10:52 ` Peter Maydell
2026-03-21 17:09   ` Zenghui Yu
2026-03-21 17:26     ` Mohamed Mediouni
2026-03-21 17:39       ` Zenghui Yu [this message]

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=52bfd375-8d11-4f8e-9d2c-5e3b3da0e8f6@linux.dev \
    --to=zenghui.yu@linux.dev \
    --cc=agraf@csgraf.de \
    --cc=mohamed@unpredictable.fr \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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.