public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Morse <james.morse@arm.com>
To: Oliver Upton <oliver.upton@linux.dev>, Marc Zyngier <maz@kernel.org>
Cc: Ruidong Tian <tianruidong@linux.alibaba.com>,
	kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com,
	yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org
Subject: Re: [PATCH] KVM: arm64: Add missing ERX*_EL1 registers
Date: Mon, 15 Jan 2024 17:21:19 +0000	[thread overview]
Message-ID: <67b15918-e9d3-97ea-65ca-985b5ddb3f88@arm.com> (raw)
In-Reply-To: <ZaVFmtKbtCJtaAAu@linux.dev>

Hi Oliver,

On 15/01/2024 14:47, Oliver Upton wrote:
> On Wed, Jan 10, 2024 at 12:20:30PM +0000, Marc Zyngier wrote:
>> If my reading of the ARM ARM is correct, these registers only exist if
>> FEAT_RASv1p1 is implemented. Which means that we shouldn't handle
>> those as RAZ/WI unconditionally, but instead check for what we
>> advertise to the guest and handle it accordingly.
> 
> Can we go a step further and just stop advertising RAS to guests? I don't
> expect VMs to gain much from our RAZ/WI implementation.

These CPU registers would describe the error in a kernel-first setup, but firmware-first
has its own in-memory way of doing that.

The CPU features indicates the IESB feature and ESB-instruction exist to fence errors, and
that the CPU uses the ESR_ELx.{S,A}ET bits to describe the CPU state after an error. These
are all useful as part of the notification of an error, be that kernel-first or
firmware-first.

When its supported by the hardware, the VMM can inject an asynchronous external abort
using KVM_GET_VCPU_EVENTS - otherwise the ESR_ELx.ISS bits are all imp-def, meaning all
errors are catastrophic.

Doing this would skip save/restore of VDISR_EL2, is there any other reason to do it?


> Conditional
> RAZ/WI would still be helpful in this case for migrated VMs that have
> 'seen' the feature.


Thanks,

James

  reply	other threads:[~2024-01-15 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10  7:57 [PATCH] KVM: arm64: Add missing ERX*_EL1 registers Ruidong Tian
2024-01-10 12:20 ` Marc Zyngier
2024-01-15 14:47   ` Oliver Upton
2024-01-15 17:21     ` James Morse [this message]
2024-01-16 15:38       ` Oliver Upton

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=67b15918-e9d3-97ea-65ca-985b5ddb3f88@arm.com \
    --to=james.morse@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --cc=tianruidong@linux.alibaba.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox