From: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
david@gibson.dropbear.id.au, aik@ozlabs.ru,
mahesh@linux.vnet.ibm.com, benh@au1.ibm.com, paulus@samba.org
Subject: Re: [Qemu-devel] [PATCH v3 0/5] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests
Date: Mon, 21 Aug 2017 14:40:17 +0530 [thread overview]
Message-ID: <7f67f71b-1661-09cb-1b6f-c8edeaa54144@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170817033554.ip36jmv6kwf7bpbp@tungsten.ozlabs.ibm.com>
On Thursday 17 August 2017 09:05 AM, Sam Bobroff wrote:
> On Wed, Aug 16, 2017 at 02:41:59PM +0530, Aravinda Prasad wrote:
>> This series of patches adds support for FWNMI in PowerKVM guests.
>>
>> Memory error such as bit flips that cannot be corrected
>> by hardware is passed on to the kernel for handling
>> by raising machine check exception (an NMI). Upon such
>> machine check exception, if the address in error belongs
>> to guest then KVM causes a guest exit with KVM_EXIT_NMI
>> exit reason.
>>
>> This patch series adds functionality to pass on such
>> machine check exception to the guest kernel by suitably
>> handling KVM_EXIT_NMI exit and building the error log.
>>
>> The KVM changes are now part of the upstream kernel
>> (commit e20bbd3d). This series contain QEMU changes.
>
> [snip]
>
> Hi,
>
> I'm concerned that this implementation may introduce a problem with
> kexec. If a VM registers an NMI handler, then kexecs to a new kernel
> and an NMI is received before the new kernel has registered it's
> handler, won't QEMU cause the guest to jump to the old, now invalid,
> handler address? Is this worth worrying about?
I think there is a small time window till the kexec kernel registers a
new handler during which NMI can branch to the old invalid address.
Two points of interest. First, I did not find any "ibm,nmi-unregister"
call. Hence, once the VM registers for NMI it cannot unregister it.
Second, if kexec is triggered due to VM crash, then the guest will not
get the opportunity to unregister NMI even in case something similar to
"ibm,nmi-unregister" is available.
Not sure if this is worth handling as machine check NMIs are rare, and
getting a machine check NMI during that small time window is very rare.
Regards,
Aravinda
>
> Cheers,
> Sam.
>
--
Regards,
Aravinda
next prev parent reply other threads:[~2017-08-21 9:10 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 9:11 [Qemu-devel] [PATCH v3 0/5] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests Aravinda Prasad
2017-08-16 9:12 ` [Qemu-devel] [PATCH v3 1/5] ppc: spapr: Register and handle HCALL to receive updated RTAS region Aravinda Prasad
2017-08-17 1:34 ` David Gibson
2017-08-17 10:27 ` Nikunj A Dadhania
2017-08-21 9:42 ` Aravinda Prasad
2017-08-22 3:33 ` David Gibson
2017-08-22 7:16 ` Aravinda Prasad
2017-08-16 9:12 ` [Qemu-devel] [PATCH v3 2/5] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls Aravinda Prasad
2017-08-17 1:39 ` David Gibson
2017-08-21 12:35 ` Aravinda Prasad
2017-08-22 2:08 ` David Gibson
2017-08-22 7:12 ` Aravinda Prasad
2017-09-21 9:09 ` Aravinda Prasad
2017-09-27 7:15 ` David Gibson
2017-09-27 11:53 ` Aravinda Prasad
2017-09-28 3:58 ` David Gibson
2017-08-16 9:12 ` [Qemu-devel] [PATCH v3 3/5] Wrapper function to wait on condition for the main loop mutex Aravinda Prasad
2017-08-16 9:12 ` [Qemu-devel] [PATCH v3 4/5] target/ppc: Handle NMI guest exit Aravinda Prasad
2017-08-17 1:57 ` David Gibson
2017-08-21 12:30 ` Aravinda Prasad
2017-08-23 8:39 ` David Gibson
2017-09-08 8:09 ` [Qemu-devel] [Qemu-ppc] " Aravinda Prasad
2017-09-10 3:22 ` David Gibson
2017-08-16 9:12 ` [Qemu-devel] [PATCH v3 5/5] ppc: spapr: Enable FWNMI capability Aravinda Prasad
2017-08-17 1:59 ` David Gibson
2017-08-21 10:50 ` Aravinda Prasad
2017-08-16 9:29 ` [Qemu-devel] [PATCH v3 0/5] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests no-reply
2017-08-16 9:40 ` no-reply
2017-08-17 3:35 ` Sam Bobroff
2017-08-21 9:10 ` Aravinda Prasad [this message]
2017-08-23 0:43 ` David Gibson
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=7f67f71b-1661-09cb-1b6f-c8edeaa54144@linux.vnet.ibm.com \
--to=aravinda@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=benh@au1.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=mahesh@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sam.bobroff@au1.ibm.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;
as well as URLs for NNTP newsgroup(s).