This patchset is based on v4.6-rc4 and adds support for the optional extended ASIDs present since revision 3.5 of the MIPS32/MIPS64 architecture, which extends the TLB ASIDs from 8 bits to 10 bits. These are known to be implemented in XLP and I6400 cores. Along the way a few cleanups are made, particularly for KVM which manipulates ASIDs from assembly code. Patch 6 lays most of the groundwork by abstracting asid masks so they can be variable, and patch 7 adds the actual support for extended ASIDs. Patches 1-5 do some preliminary clean up around ASID handling, and in KVM's locore.S to allow patch 7 to support extended ASIDs. The use of extended ASIDs can be observed by using the 'x' sysrq to dump TLB values, e.g. by repeatedly running this command: $(echo x > /proc/sysrq-trigger); dmesg -c | grep asid James Hogan (4): MIPS: KVM/locore.S: Don't preserve host ASID around vcpu_run MIPS: Add & use CP0_EntryHi ASID definitions MIPS: KVM/locore.S: Only preserve callee saved registers MIPS: KVM/locore.S: Relax noat Paul Burton (3): MIPS: KVM: Abstract guest ASID mask MIPS: Retrieve ASID masks using function accepting struct cpuinfo_mips MIPS: Support extended ASIDs arch/mips/Kconfig | 17 +++++++ arch/mips/include/asm/cpu-info.h | 24 ++++++++++ arch/mips/include/asm/kvm_host.h | 5 +- arch/mips/include/asm/mipsregs.h | 2 + arch/mips/include/asm/mmu_context.h | 41 +++++++--------- arch/mips/kernel/asm-offsets.c | 10 ++++ arch/mips/kernel/cpu-probe.c | 13 +++++ arch/mips/kernel/genex.S | 2 +- arch/mips/kernel/traps.c | 2 +- arch/mips/kvm/emulate.c | 25 +++++----- arch/mips/kvm/locore.S | 94 +++++++++---------------------------- arch/mips/kvm/tlb.c | 33 ++++++++----- arch/mips/lib/dump_tlb.c | 10 ++-- arch/mips/lib/r3k_dump_tlb.c | 9 ++-- arch/mips/mm/tlb-r3k.c | 24 ++++++---- arch/mips/mm/tlb-r4k.c | 2 +- arch/mips/mm/tlb-r8k.c | 2 +- arch/mips/pci/pci-alchemy.c | 2 +- 18 files changed, 173 insertions(+), 144 deletions(-) Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Cc: Manuel Lauss <manuel.lauss@xxxxxxxxx> Cc: Jayachandran C. <jchandra@xxxxxxxxxxxx> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx> Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx> Cc: linux-mips@xxxxxxxxxxxxxx Cc: kvm@xxxxxxxxxxxxxxx -- 2.4.10