• Mahesh Salgaonkar's avatar
    KVM: PPC: Book3S HV: Deliver machine check with MSR(RI=0) to guest as MCE · 966d713e
    Mahesh Salgaonkar authored
    For the machine check interrupt that happens while we are in the guest,
    kvm layer attempts the recovery, and then delivers the machine check interrupt
    directly to the guest if recovery fails. On successful recovery we go back to
    normal functioning of the guest. But there can be cases where a machine check
    interrupt can happen with MSR(RI=0) while we are in the guest. This means
    MC interrupt is unrecoverable and we have to deliver a machine check to the
    guest since the machine check interrupt might have trashed valid values in
    SRR0/1. The current implementation do not handle this case, causing guest
    to crash with Bad kernel stack pointer instead of machine check oops message.
    
    [26281.490060] Bad kernel stack pointer 3fff9ccce5b0 at c00000000000490c
    [26281.490434] Oops: Bad kernel stack pointer, sig: 6 [#1]
    [26281.490472] SMP NR_CPUS=2048 NUMA pSeries
    
    This patch fixes this issue by checking MSR(RI=0) in KVM layer and forwarding
    unrecoverable interrupt to guest which then panics with proper machine check
    Oops message.
    Signed-off-by: default avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Acked-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    966d713e
book3s_hv_rmhandlers.S 63.3 KB