[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 09/13] ppc/spapr: Don't kill the guest if a recovered FWN
From: |
Nicholas Piggin |
Subject: |
Re: [RFC PATCH 09/13] ppc/spapr: Don't kill the guest if a recovered FWNMI machine check delivery fails |
Date: |
Thu, 05 Mar 2020 13:52:56 +1000 |
User-agent: |
astroid/0.15.0 (https://github.com/astroidmail/astroid) |
David Gibson's on March 4, 2020 4:06 pm:
> On Wed, Mar 04, 2020 at 03:28:46PM +1000, Nicholas Piggin wrote:
>> Try to be tolerant of errors if the machine check had been recovered
>> by the host.
>>
>> Signed-off-by: Nicholas Piggin <address@hidden>
>> ---
>> hw/ppc/spapr_events.c | 25 ++++++++++++++++++-------
>> 1 file changed, 18 insertions(+), 7 deletions(-)
>>
>> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
>> index 89ee036dd1..33f77005c2 100644
>> --- a/hw/ppc/spapr_events.c
>> +++ b/hw/ppc/spapr_events.c
>> @@ -807,13 +807,20 @@ static void spapr_mce_dispatch_elog(PowerPCCPU *cpu,
>> bool recovered)
>> /* get rtas addr from fdt */
>> rtas_addr = spapr_get_rtas_addr();
>> if (!rtas_addr) {
>> - warn_report("FWNMI: Unable to deliver machine check to guest: "
>> - "rtas_addr not found.");
>> - qemu_system_guest_panicked(NULL);
>> + if (!recovered) {
>> + warn_report("FWNMI: Unable to deliver machine check to guest: "
>> + "rtas_addr not found.");
>> + qemu_system_guest_panicked(NULL);
>> + } else {
>> + warn_report("FWNMI: Unable to deliver machine check to guest: "
>> + "rtas_addr not found. Machine check recovered.");
>> + }
>> g_free(ext_elog);
>> return;
>> }
>>
>> + spapr->fwnmi_machine_check_interlock = cpu->vcpu_id;
>> +
>
> The movement of this line doesn't appear to be relevant to the other
> changes in this patch.
That's because if we recover without delivering the NMI, we can't hold
the interlock because the guest isn't going to call "ibm,nmi-interlock".
Thanks,
Nick
- [RFC PATCH 04/13] ppc/spapr: Disable FWNMI capability if KVM does not support it, (continued)
[RFC PATCH 05/13] ppc/spapr: Fix FWNMI machine check interrupt delivery, Nicholas Piggin, 2020/03/04
[RFC PATCH 06/13] ppc/spapr: Fix FWNMI machine check failure handling, Nicholas Piggin, 2020/03/04
[RFC PATCH 09/13] ppc/spapr: Don't kill the guest if a recovered FWNMI machine check delivery fails, Nicholas Piggin, 2020/03/04
[RFC PATCH 07/13] ppc/spapr: Improve FWNMI machine check delivery corner case comments, Nicholas Piggin, 2020/03/04
[RFC PATCH 08/13] ppc/spapr: Add FWNMI machine check delivery warnings, Nicholas Piggin, 2020/03/04
[RFC PATCH 10/13] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector, Nicholas Piggin, 2020/03/04
[RFC PATCH 12/13] ppc/spapr: Allow FWNMI on TCG, Nicholas Piggin, 2020/03/04
[RFC PATCH 11/13] ppc/spapr: Implement FWNMI System Reset delivery, Nicholas Piggin, 2020/03/04
[RFC PATCH 13/13] ppc/spapr: KVM should not enable FWNMI until the guest requests it, Nicholas Piggin, 2020/03/04