linux-stable/arch/mips
James Hogan 372582a6c6 KVM: MIPS/TLB: Add VZ TLB management
Add functions for MIPS VZ TLB management to tlb.c.

kvm_vz_host_tlb_inv() will be used for invalidating root TLB entries
after GPA page tables have been modified due to a KVM page fault. It
arranges for a root GPA mapping to be flushed from the TLB, using the
gpa_mm ASID or the current GuestID to do the probe.

kvm_vz_local_flush_roottlb_all_guests() and
kvm_vz_local_flush_guesttlb_all() flush all TLB entries in the
corresponding TLB for guest mappings (GPA->RPA for root TLB with
GuestID, and all entries for guest TLB). They will be used when starting
a new GuestID cycle, when VZ hardware is enabled/disabled, and also when
switching to a guest when the guest TLB contents may be stale or belong
to a different VM.

kvm_vz_guest_tlb_lookup() converts a guest virtual address to a guest
physical address using the guest TLB. This will be used to decode guest
virtual addresses which are sometimes provided by VZ hardware in
CP0_BadVAddr for certain exceptions when the guest physical address is
unavailable.

kvm_vz_save_guesttlb() and kvm_vz_load_guesttlb() will be used to
preserve wired guest VTLB entries while a guest isn't running.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
2017-03-28 14:53:51 +01:00
..
alchemy MIPS changes for v4.11 2017-02-21 14:21:11 -08:00
ar7 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
ath25
ath79 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
bcm47xx MIPS: BCM47XX: Fix button inversion for Asus WL-500W 2017-02-17 11:16:46 +00:00
bcm63xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: DTS: Add img directory to Makefile 2017-02-17 11:16:46 +00:00
cavium-octeon MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS changes for v4.11 2017-02-21 14:21:11 -08:00
dec MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
emma MIPS: Avoid old-style declaration 2017-01-25 02:51:11 +01:00
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
generic MIPS: generic/kexec: add support for a DTB passed in a separate buffer 2017-01-03 16:34:46 +01:00
include KVM: MIPS/TLB: Add VZ TLB management 2017-03-28 14:53:51 +01:00
jazz MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
jz4740 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
kernel MIPS: Probe guest MVH 2017-03-28 14:49:15 +01:00
kvm KVM: MIPS/TLB: Add VZ TLB management 2017-03-28 14:53:51 +01:00
lantiq MIPS: Lantiq: Keep ethernet enabled during boot 2017-02-17 11:14:29 +00:00
lasat MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
lib MIPS: Fix modversions 2017-01-24 18:30:35 +01:00
loongson32 MIPS: Loongson1B: Change the OSC clock name 2017-01-03 16:48:40 +01:00
loongson64 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
math-emu sched/headers: Prepare to move the task_lock()/unlock() APIs to <linux/sched/task.h> 2017-03-02 08:42:38 +01:00
mm MIPS: Separate MAAR V bit into VL and VH for XPA 2017-03-28 14:49:01 +01:00
mti-malta MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
net treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
netlogic MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
oprofile MIPS: Unify perf counter register definitions 2017-02-14 09:00:24 +00:00
paravirt sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
pci This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
pic32 MIPS: pic32mzda: Fix linker error for pic32_get_pbclk() 2017-02-17 11:14:29 +00: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: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power
ralink MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
rb532 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
sgi-ip22 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sgi-ip27 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sgi-ip32 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sibyte sched/headers: Move task-stack related APIs from <linux/sched.h> to <linux/sched/task_stack.h> 2017-03-03 01:43:47 +01:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
vdso MIPS: VDSO: Explicitly use -fno-asynchronous-unwind-tables 2017-02-17 11:32:12 +00:00
vr41xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
xilfpga MIPS: xilfpga: Use irqchip instead of the legacy way 2017-01-03 16:34:39 +01: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 MIPS changes for v4.11 2017-02-21 14:21:11 -08:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Disable stack checks on MIPS kernels 2017-02-14 09:00:23 +00:00
Makefile.postlink MIPS: Fix distclean with Makefile.postlink 2017-02-13 18:57:34 +00:00