alistair23-linux/arch/mips
James Hogan 1581ff3dbf KVM: MIPS/MMU: Move preempt/ASID handling to implementation
The MIPS KVM host and guest GVA ASIDs may need regenerating when
scheduling a process in guest context, which is done from the
kvm_arch_vcpu_load() / kvm_arch_vcpu_put() functions in mmu.c.

However this is a fairly implementation specific detail. VZ for example
may use GuestIDs instead of normal ASIDs to distinguish mappings
belonging to different guests, and even on VZ without GuestID the root
TLB will be used differently to trap & emulate.

Trap & emulate GVA ASIDs only relate to the user part of the full
address space, so can be left active during guest exit handling (guest
context) to allow guest instructions to be easily read and translated.

VZ root ASIDs however are for GPA mappings so can't be left active
during normal kernel code. They also aren't useful for accessing guest
virtual memory, and we should have CP0_BadInstr[P] registers available
to provide encodings of trapping guest instructions anyway.

Therefore move the ASID preemption handling into the implementation
callback.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
2017-02-03 15:20:44 +00:00
..
alchemy clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
ar7 MIPS: ar7: use gpiochip data pointer 2016-02-19 09:51:43 +01:00
ath25 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
ath79 MIPS: ath79: Fix test for error return of clk_register_fixed_factor(). 2016-09-13 14:13:26 +02:00
bcm47xx MIPS: BCM47xx: Make serial explicitly non-modular 2016-10-04 16:13:57 +02:00
bcm63xx MIPS: BCM63xx: Let clk_disable() return immediately if clk is NULL 2016-10-04 16:13:57 +02:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot RTC for 4.10 2016-12-18 18:18:03 -08:00
cavium-octeon clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
dec Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
emma MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
generic MIPS: generic: Fix KASLR for generic kernel. 2016-11-04 00:32:06 +01:00
include KVM: MIPS: Convert get/set_regs -> vcpu_load/put 2017-02-03 15:20:44 +00:00
jazz Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
jz4740 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
kernel Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
kvm KVM: MIPS/MMU: Move preempt/ASID handling to implementation 2017-02-03 15:20:44 +00:00
lantiq MIPS: Lantiq: Fix mask of GPE frequency 2016-12-11 11:20:25 +01:00
lasat mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
lib MIPS: dump_tlb: Fix printk continuations 2016-11-04 01:04:32 +01:00
loongson32 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
loongson64 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm MIPS: Export some tlbex internals for KVM to use 2017-02-03 15:19:01 +00:00
mti-malta clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
net treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
netlogic clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
oprofile Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:05:56 -08:00
paravirt MIPS: SMP: Don't increment irq_count multiple times for call function IPIs 2015-08-03 09:25:12 +02:00
pci MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
pic32 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power MIPS: Hibernate: flush TLB entries earlier 2015-04-10 15:41:52 +02:00
ralink MIPS: ralink: Make timer explicitly non-modular 2016-10-04 16:13:57 +02:00
rb532 MIPS: rb532: use gpiochip data pointer 2016-02-19 09:51:44 +01:00
sgi-ip22 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sgi-ip27 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
sgi-ip32 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sibyte Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: PCI: Reduce stack frame usage 2016-10-04 16:13:57 +02:00
vdso MIPS: VDSO: Drop duplicated -I*/-E* aflags 2016-10-11 15:07:30 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
Kbuild MIPS: Initial implementation of a VDSO 2015-11-11 08:36:36 +01:00
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Fix build of compressed image 2016-11-04 00:37:15 +01:00