• Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Make sure we don't re-enter guest without XIVE loaded · 43ff3f65
    Paul Mackerras authored
    This fixes a bug where it is possible to enter a guest on a POWER9
    system without having the XIVE (interrupt controller) context loaded.
    This can happen because we unload the XIVE context from the CPU
    before doing the real-mode handling for machine checks.  After the
    real-mode handler runs, it is possible that we re-enter the guest
    via a fast path which does not load the XIVE context.
    
    To fix this, we move the unloading of the XIVE context to come after
    the real-mode machine check handler is called.
    
    Fixes: 5af50993 ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller")
    Cc: stable@vger.kernel.org # v4.11+
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    43ff3f65
book3s_hv_rmhandlers.S 81.7 KB