• Thomas Huth's avatar
    KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register · 50b5e30e
    Thomas Huth authored
    commit fa73c3b2 upstream.
    
    The MMCR2 register is available twice, one time with number 785
    (privileged access), and one time with number 769 (unprivileged,
    but it can be disabled completely). In former times, the Linux
    kernel was using the unprivileged register 769 only, but since
    commit 8dd75ccb ("powerpc: Use privileged SPR number
    for MMCR2"), it uses the privileged register 785 instead.
    The KVM-PR code then of course also switched to use the SPR 785,
    but this is causing older guest kernels to crash, since these
    kernels still access 769 instead. So to support older kernels
    with KVM-PR again, we have to support register 769 in KVM-PR, too.
    
    Fixes: 8dd75ccbSigned-off-by: default avatarThomas Huth <thuth@redhat.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    50b5e30e
reg.h 51.4 KB