• Simon Guo's avatar
    KVM: PPC: Book3S PR: Fix failure status setting in tabort. emulation · f61e0d3c
    Simon Guo authored
    tabort. will perform transaction failure recording and the recording
    depends on TEXASR FS bit. Currently the TEXASR FS bit is retrieved
    after tabort., when the TEXASR FS bit is already been updated by
    tabort. itself.
    
    This patch corrects this behavior by retrieving TEXASR val before
    tabort.
    
    tabort. will not immediately leads to transaction failure handling
    in suspend state. So this patch also remove the mtspr on TEXASR/TFIAR
    registers to avoid TM bad thing exception.
    
    Fixes: 26798f88 ("KVM: PPC: Book3S PR: Add emulation for tabort. in privileged state")
    Signed-off-by: default avatarSimon Guo <wei.guo.simon@gmail.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    f61e0d3c
book3s_emulate.c 24.8 KB