From: james.morse@arm.com (James Morse)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 15/21] KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2.
Date: Mon, 23 Oct 2017 16:26:39 +0100 [thread overview]
Message-ID: <59EE0A2F.8050703@arm.com> (raw)
In-Reply-To: <CAMj-D2AMy1_SPrLGti9U=oz1JvBDHvRAMsBtw51B3JK0omLyXg@mail.gmail.com>
Hi gengdongjiu,
On 20/10/17 17:44, gengdongjiu wrote:
> 2017-10-19 22:58 GMT+08:00 James Morse <james.morse@arm.com>:
>> Prior to v8.2's RAS Extensions, the HCR_EL2.VSE 'virtual SError' feature
>> generated an SError with an implementation defined ESR_EL1.ISS, because we
>> had no mechanism to specify the ESR value.
>>
>> On Juno this generates an all-zero ESR, the most significant bit 'ISV'
>> is clear indicating the remainder of the ISS field is invalid.
>>
>> With the RAS Extensions we have a mechanism to specify this value, and the
>> most significant bit has a new meaning: 'IDS - Implementation Defined
>> Syndrome'. An all-zero SError ESR now means: 'RAS error: Uncategorized'
>> instead of 'no valid ISS'.
>
> consider again.
> I still consider that it is not better set "Implementation Defined
> Syndrome" here.
Do you agree KVM does this today?
ddb3d07cfe90 ("arm64: KVM: Inject a Virtual SError if it was pending")
All I've changed here is that you don't get a RAS error passed into the guest.
Its either deemed non-blocking and ignored, or we kick the guest with an impdef
SError.
To do any better we need kernel first support, or a firmware first notification.
> I know your meaning that An all-zero SError means Uncategorized
Uncategorized RAS error. RAS errors should be handled by the host, we should not
inject them into the guest on a path like this.
Which impdef ESR would you like to use, and why does it matter?
> From the beginning, our starting point is KVM is the architecture
> related and Qemu/kvmtool is platform related.
> Qemu/kvmtool is the role of host firmware.
> so we let Qemu to create APEI/GHES table and record CPER,
> and also injects SEA/SEI in the Qemu.
For RAS events it generated all by itself, or was notified by the kernel using
signals.
This is not one of those cases. But that's fine as we aren't injecting a RAS error.
> About the vsesr_el2 which is used to specify the guest ESR, also all
> set by Qemu/kvmtool are better.
> including the three cases even the ESR are all-zero(uncategorized).
> 1. IMPLEMENTATION DEFINED
> 2 categorized,
> 3 uncategorized,
I can't work out what you're saying here.
If you're suggesting Qemu should set a default 'unknown' ESR for use when KVM
doesn't know what to do, and SError is pretty much its only option:
Why would Qemu set anything other than impdef:all-zeros?
The only use would be to fake this back into a RAS error. Qemu isn't involved
here so this can't be used to emulate NOTIFY_SEI without the kernel support. We
don't have support for emulating the RAS ERR registers either, so this can't be
used to emulate kernel first.
If you're suggesting Qemu should specify a set of ESR values for the different
cases where KVM doesn't know what do: this would be an early shortcut that burns
us in the future, these things are going to be changed. This is too specific to
KVMs internals:
When we add NOTIFY_SEI support, we will call out of this KVM code and APEI
should 'claim' any SError that arrived with CPER records.
I expect this code to change dramatically if/when we add kernel first support.
The KVM patches on the end of this series are just the minimum needed to enable
IESB and keep the status quo for all other behaviour. And this is just so we can
tackle the other bits of support that depends on the cpufeature without
reposting all the same code.
James
> For this case, Qemu just set the ESR, nothing else, not passing
> RAS-error to userspace.
next prev parent reply other threads:[~2017-10-23 15:26 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 14:57 [PATCH v4 00/21] SError rework + RAS&IESB for firmware first support James Morse
2017-10-19 14:57 ` [PATCH v4 01/21] arm64: explicitly mask all exceptions James Morse
2017-10-19 14:57 ` [PATCH v4 02/21] arm64: introduce an order for exceptions James Morse
2017-10-19 14:57 ` [PATCH v4 03/21] arm64: Move the async/fiq helpers to explicitly set process context flags James Morse
2017-10-19 14:57 ` [PATCH v4 04/21] arm64: Mask all exceptions during kernel_exit James Morse
2017-10-19 14:57 ` [PATCH v4 05/21] arm64: entry.S: Remove disable_dbg James Morse
2017-10-19 14:57 ` [PATCH v4 06/21] arm64: entry.S: convert el1_sync James Morse
2017-10-19 14:57 ` [PATCH v4 07/21] arm64: entry.S convert el0_sync James Morse
2017-10-19 14:57 ` [PATCH v4 08/21] arm64: entry.S: convert elX_irq James Morse
2017-10-19 14:57 ` [PATCH v4 09/21] KVM: arm/arm64: mask/unmask daif around VHE guests James Morse
2017-10-30 7:40 ` Christoffer Dall
2017-11-02 12:14 ` James Morse
2017-11-03 12:45 ` Christoffer Dall
2017-11-03 17:19 ` James Morse
2017-11-06 12:42 ` Christoffer Dall
2017-10-19 14:57 ` [PATCH v4 10/21] arm64: entry.S: move SError handling into a C function for future expansion James Morse
2018-01-02 21:07 ` Adam Wallis
2018-01-03 16:00 ` James Morse
2017-10-19 14:57 ` [PATCH v4 11/21] arm64: cpufeature: Detect CPU RAS Extentions James Morse
2017-10-31 13:14 ` Will Deacon
2017-11-02 12:15 ` James Morse
2017-10-19 14:57 ` [PATCH v4 12/21] arm64: kernel: Survive corrected RAS errors notified by SError James Morse
2017-10-31 13:50 ` Will Deacon
2017-11-02 12:15 ` James Morse
2017-10-19 14:57 ` [PATCH v4 13/21] arm64: cpufeature: Enable IESB on exception entry/return for firmware-first James Morse
2017-10-31 13:56 ` Will Deacon
2017-10-19 14:58 ` [PATCH v4 14/21] arm64: kernel: Prepare for a DISR user James Morse
2017-10-19 14:58 ` [PATCH v4 15/21] KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2 James Morse
2017-10-20 16:44 ` gengdongjiu
2017-10-23 15:26 ` James Morse [this message]
2017-10-24 9:53 ` gengdongjiu
2017-10-30 7:59 ` Christoffer Dall
2017-10-30 10:51 ` Christoffer Dall
2017-10-30 15:44 ` James Morse
2017-10-31 5:48 ` Christoffer Dall
2017-10-31 6:34 ` Marc Zyngier
2017-10-19 14:58 ` [PATCH v4 16/21] KVM: arm64: Save/Restore guest DISR_EL1 James Morse
2017-10-31 4:27 ` Marc Zyngier
2017-10-31 5:27 ` Christoffer Dall
2017-10-19 14:58 ` [PATCH v4 17/21] KVM: arm64: Save ESR_EL2 on guest SError James Morse
2017-10-31 4:26 ` Marc Zyngier
2017-10-31 5:47 ` Marc Zyngier
2017-11-01 17:42 ` James Morse
2017-10-19 14:58 ` [PATCH v4 18/21] KVM: arm64: Handle RAS SErrors from EL1 on guest exit James Morse
2017-10-31 5:55 ` Marc Zyngier
2017-10-31 5:56 ` Christoffer Dall
2017-10-19 14:58 ` [PATCH v4 19/21] KVM: arm64: Handle RAS SErrors from EL2 " James Morse
2017-10-27 6:26 ` gengdongjiu
2017-10-27 17:38 ` James Morse
2017-10-31 6:13 ` Marc Zyngier
2017-10-31 6:13 ` Christoffer Dall
2017-10-19 14:58 ` [PATCH v4 20/21] KVM: arm64: Take any host SError before entering the guest James Morse
2017-10-31 6:23 ` Christoffer Dall
2017-10-31 11:43 ` James Morse
2017-11-01 4:55 ` Christoffer Dall
2017-11-02 12:18 ` James Morse
2017-11-03 12:49 ` Christoffer Dall
2017-11-03 16:14 ` James Morse
2017-11-06 12:45 ` Christoffer Dall
2017-10-19 14:58 ` [PATCH v4 21/21] KVM: arm64: Trap RAS error registers and set HCR_EL2's TERR & TEA James Morse
2017-10-31 6:32 ` Christoffer Dall
2017-10-31 6:32 ` Marc Zyngier
2017-10-31 6:35 ` [PATCH v4 00/21] SError rework + RAS&IESB for firmware first support Christoffer Dall
2017-10-31 10:08 ` Will Deacon
2017-11-01 15:23 ` James Morse
2017-11-02 8:14 ` Christoffer Dall
2017-11-09 18:14 ` James Morse
2017-11-10 12:03 ` gengdongjiu
2017-11-13 11:29 ` Christoffer Dall
2017-11-13 13:05 ` Peter Maydell
2017-11-20 8:53 ` Christoffer Dall
2017-11-13 16:14 ` Andrew Jones
2017-11-13 17:56 ` Peter Maydell
2017-11-14 16:11 ` James Morse
2017-11-15 9:59 ` gengdongjiu
2017-11-14 16:03 ` James Morse
2017-11-15 9:15 ` gengdongjiu
2017-11-15 18:25 ` James Morse
2017-11-21 11:31 ` gengdongjiu
2017-11-20 8:55 ` Christoffer Dall
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=59EE0A2F.8050703@arm.com \
--to=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).