]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM/MIPS32: MMU/TLB operations for the Guest.
authorSanjay Lal <sanjayl@kymasys.com>
Thu, 22 Nov 2012 02:34:05 +0000 (18:34 -0800)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 13 Mar 2013 18:46:20 +0000 (19:46 +0100)
commit5199643bf148cf5f9b2a4b77a1231695014a948b
treed87f002d24b3c4cbb2a12b016c9eedcf6d999ce0
parenta400a9ae30d134b37995c385c0952d3c927ce6f9
KVM/MIPS32: MMU/TLB operations for the Guest.

- Note that this file is statically linked with the rest of the host kernel (KSEG0). This is because kernel modules are
loaded into mapped space on MIPS and we want to make sure that we don't get any host kernel TLB faults while
manipulating TLBs.
- Virtual Guest TLBs are implemented as 64 entry array regardless of the number of host TLB entries.
- Shadow TLBs map Guest virtual addresses to Host physical addresses.

    - TLB miss handling details:
        Guest KSEG0 TLBMISS (0x40000000 – 0x60000000): Transparent to the Guest.
        Guest KSEG2/3 (0x60000000 – 0x80000000) & Guest UM TLBMISS (0x00000000 – 0x40000000)
            Lookup in Guest/Virtual TLB
            If an entry doesn’t match
                deliver appropriate TLBMISS LD/ST exception to the guest
            If entry does exist in the Guest TLB and is NOT Valid
                Deliver TLB invalid exception to the guest
            If entry does exist in the Guest TLB and is VALID
                Inject the TLB entry into the Shadow TLB

Signed-off-by: Sanjay Lal <sanjayl@kymasys.com>
Cc: kvm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kvm/kvm_tlb.c [new file with mode: 0644]