Skip to content
  • Leandro Lupori's avatar
    4ddc1046
    target/ppc: Fix tlbie · 4ddc1046
    Leandro Lupori authored
    
    
    Commit 74c4912f changed check_tlb_flush() to use
    tlb_flush_all_cpus_synced() instead of calling tlb_flush() on each
    CPU. However, as side effect of this, a CPU executing a ptesync
    after a tlbie will have its TLB flushed only after exiting its
    current Translation Block (TB).
    
    This causes memory accesses to invalid pages to succeed, if they
    happen to be on the same TB as the ptesync.
    
    To fix this, use tlb_flush_all_cpus() instead, that immediately
    flushes the TLB of the CPU executing the ptesync instruction.
    
    Fixes: 74c4912f ("target/ppc: Fix synchronization of mttcg with broadcast TLB flushes")
    Signed-off-by: default avatarLeandro Lupori <leandro.lupori@eldorado.org.br>
    Reviewed-by: default avatarFabiano Rosas <farosas@linux.ibm.com>
    Message-Id: <20220503163904.22575-1-leandro.lupori@eldorado.org.br>
    Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
    4ddc1046
    target/ppc: Fix tlbie
    Leandro Lupori authored
    
    
    Commit 74c4912f changed check_tlb_flush() to use
    tlb_flush_all_cpus_synced() instead of calling tlb_flush() on each
    CPU. However, as side effect of this, a CPU executing a ptesync
    after a tlbie will have its TLB flushed only after exiting its
    current Translation Block (TB).
    
    This causes memory accesses to invalid pages to succeed, if they
    happen to be on the same TB as the ptesync.
    
    To fix this, use tlb_flush_all_cpus() instead, that immediately
    flushes the TLB of the CPU executing the ptesync instruction.
    
    Fixes: 74c4912f ("target/ppc: Fix synchronization of mttcg with broadcast TLB flushes")
    Signed-off-by: default avatarLeandro Lupori <leandro.lupori@eldorado.org.br>
    Reviewed-by: default avatarFabiano Rosas <farosas@linux.ibm.com>
    Message-Id: <20220503163904.22575-1-leandro.lupori@eldorado.org.br>
    Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
Loading