This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TLB Conflict abort

Hi All,

I want to check TLB Conflict abort.

How can I create an address which matches multiple entries in the TLB as ARMv8 spec mentioned.

ARMv8 spec:

"An address can hit multiple entries in the TLB if the TLB has been invalidated inappropriately, for example if TLB
invalidation required by the architecture has not been performed."

Thanks,

Parents
  • It's quite hard to come up with a sequence which definitely generates the exception, as you don't have precise control of the MMU.  But try something like this:

    • Map a 4KB page (address X)
    • Touch that page, in order to get the translation cached in the TLB
    • Modify the translation tables, replacing the mapping for address X with a 2MB mapping - DO NOT INVALIDATE the TLB
    • Touch "X + 4KB".  This will/should miss in the TLB, causing a new walk returning the 2MB mapping
    • Touch X.  Assuming they've not been evicted, you'll hit both on the 4KB and 2MB mapping - as both cover address X.
Reply
  • It's quite hard to come up with a sequence which definitely generates the exception, as you don't have precise control of the MMU.  But try something like this:

    • Map a 4KB page (address X)
    • Touch that page, in order to get the translation cached in the TLB
    • Modify the translation tables, replacing the mapping for address X with a 2MB mapping - DO NOT INVALIDATE the TLB
    • Touch "X + 4KB".  This will/should miss in the TLB, causing a new walk returning the 2MB mapping
    • Touch X.  Assuming they've not been evicted, you'll hit both on the 4KB and 2MB mapping - as both cover address X.
Children