From: Oliver Upton <oliver.upton@linux.dev>
To: Marc Zyngier <maz@kernel.org>
Cc: kvmarm@lists.linux.dev, Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Jiaqi Yan <jiaqiyan@google.com>
Subject: Re: [PATCH 1/3] KVM: arm64: Only read HPFAR_EL2 when value is architecturally valid
Date: Wed, 2 Apr 2025 09:39:42 -0700 [thread overview]
Message-ID: <Z-1oTgrx4V-BT3Ik@linux.dev> (raw)
In-Reply-To: <87h636ztpm.wl-maz@kernel.org>
On Wed, Apr 02, 2025 at 12:30:29PM +0100, Marc Zyngier wrote:
> On Wed, 02 Apr 2025 12:15:52 +0100,
> Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Tue, 01 Apr 2025 23:42:32 +0100,
> > Oliver Upton <oliver.upton@linux.dev> wrote:
> > >
> > > KVM's logic for deciding when HPFAR_EL2 is UNKNOWN doesn't align with
> > > the architecture. Most notably, KVM assumes HPFAR_EL2 contains the
> > > faulting IPA even in the case of an SEA.
> > >
> > > Align the logic with the architecture rather than attempting to
> > > paraphrase it. Additionally, take the opportunity to improve the
> > > language around ARM erratum #834220 such that it actually describes the
> > > bug.
> > >
> > > Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> > > ---
> > > arch/arm64/include/asm/esr.h | 1 +
> > > arch/arm64/kvm/hyp/include/hyp/fault.h | 46 ++++++++++++++++----------
> > > 2 files changed, 29 insertions(+), 18 deletions(-)
> > >
> > > diff --git a/arch/arm64/include/asm/esr.h b/arch/arm64/include/asm/esr.h
> > > index d1b1a33f9a8b..7b096ed87360 100644
> > > --- a/arch/arm64/include/asm/esr.h
> > > +++ b/arch/arm64/include/asm/esr.h
> > > @@ -121,6 +121,7 @@
> > > #define ESR_ELx_FSC_SEA_TTW(n) (0x14 + (n))
> > > #define ESR_ELx_FSC_SECC (0x18)
> > > #define ESR_ELx_FSC_SECC_TTW(n) (0x1c + (n))
> > > +#define ESR_ELx_FSC_ADDRESS (0x00)
> >
> > I think this should probably read "ADDRESS_SIZE", rather than just
> > "ADDRESS".
>
> Actually, we have
>
> #define ESR_ELx_FSC_ADDRSZ (0x00)
>
> since
>
> 61e30b9eef7f ("KVM: arm64: nv: Implement nested Stage-2 page table walk logic")
>
> It just isn't at the expected spot.
Durrrrr :)
Thanks,
Oliver
next prev parent reply other threads:[~2025-04-02 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 22:42 [PATCH 0/3] KVM: arm64: Fixes for resolving the fault IPA Oliver Upton
2025-04-01 22:42 ` [PATCH 1/3] KVM: arm64: Only read HPFAR_EL2 when value is architecturally valid Oliver Upton
2025-04-02 11:15 ` Marc Zyngier
2025-04-02 11:30 ` Marc Zyngier
2025-04-02 16:39 ` Oliver Upton [this message]
2025-04-01 22:42 ` [PATCH 2/3] arm64: Convert HPFAR_EL2 to sysreg table Oliver Upton
2025-04-01 22:42 ` [PATCH 3/3] KVM: arm64: Don't translate FAR if invalid/unsafe Oliver Upton
2025-04-02 12:19 ` Marc Zyngier
2025-04-02 16:37 ` Oliver Upton
2025-04-02 17:01 ` Marc Zyngier
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=Z-1oTgrx4V-BT3Ik@linux.dev \
--to=oliver.upton@linux.dev \
--cc=jiaqiyan@google.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=suzuki.poulose@arm.com \
/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.