• Diana Craciun's avatar
    powerpc: Replaced tlbilx with tlbwe in the initialization code · ed2ddc56
    Diana Craciun authored
    On Freescale e6500 cores EPCR[DGTMI] controls whether guest supervisor
    state can execute TLB management instructions. If EPCR[DGTMI]=0
    tlbwe and tlbilx are allowed to execute normally in the guest state.
    
    A hypervisor may choose to virtualize TLB1 and for this purpose it
    may use IPROT to protect the entries for being invalidated by the
    guest. However, because tlbwe and tlbilx execution in the guest state
    are sharing the same bit, it is not possible to have a scenario where
    tlbwe is allowed to be executed in guest state and tlbilx traps. When
    guest TLB management instructions are allowed to be executed in guest
    state the guest cannot use tlbilx to invalidate TLB1 guest entries.
    
    Linux is using tlbilx in the boot code to invalidate the temporary
    entries it creates when initializing the MMU. The patch is replacing
    the usage of tlbilx in initialization code with tlbwe with VALID bit
    cleared.
    
    Linux is also using tlbilx in other contexts (like huge pages or
    indirect entries) but removing the tlbilx from the initialization code
    offers the possibility to have scenarios under hypervisor which are
    not using huge pages or indirect entries.
    Signed-off-by: default avatarDiana Craciun <Diana.Craciun@freescale.com>
    Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
    ed2ddc56
exceptions-64e.S 40.2 KB