kernel-fxtec-pro1x/arch/mips
Sean Christopherson 23ad135ae6 KVM: Call kvm_arch_memslots_updated() before updating memslots
commit 152482580a1b0accb60676063a1ac57b2d12daf6 upstream.

kvm_arch_memslots_updated() is at this point in time an x86-specific
hook for handling MMIO generation wraparound.  x86 stashes 19 bits of
the memslots generation number in its MMIO sptes in order to avoid
full page fault walks for repeat faults on emulated MMIO addresses.
Because only 19 bits are used, wrapping the MMIO generation number is
possible, if unlikely.  kvm_arch_memslots_updated() alerts x86 that
the generation has changed so that it can invalidate all MMIO sptes in
case the effective MMIO generation has wrapped so as to avoid using a
stale spte, e.g. a (very) old spte that was created with generation==0.

Given that the purpose of kvm_arch_memslots_updated() is to prevent
consuming stale entries, it needs to be called before the new generation
is propagated to memslots.  Invalidating the MMIO sptes after updating
memslots means that there is a window where a vCPU could dereference
the new memslots generation, e.g. 0, and incorrectly reuse an old MMIO
spte that was created with (pre-wrap) generation==0.

Fixes: e59dbe09f8 ("KVM: Introduce kvm_arch_memslots_updated()")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 20:10:13 +01:00
..
alchemy
ar7
ath25
ath79
bcm47xx MIPS: BCM47XX: Setup struct device for the SoC 2019-01-22 21:40:33 +01:00
bcm63xx MIPS: BCM63XX: provide DMA masks for ethernet devices 2019-03-05 17:58:54 +01:00
bmips
boot DTS: CI20: Fix bugs in ci20's device tree. 2019-03-13 14:02:34 -07:00
cavium-octeon MIPS: OCTEON: mark RGMII interface disabled on OCTEON III 2019-01-09 17:38:48 +01:00
cobalt
configs MIPS: ath79: Enable OF serial ports in the default config 2019-02-27 10:08:53 +01:00
crypto
dec
emma
fw
generic
include KVM: Call kvm_arch_memslots_updated() before updating memslots 2019-03-23 20:10:13 +01:00
jazz MIPS: jazz: fix 64bit build 2019-02-27 10:08:53 +01:00
jz4740 mmc: jz4740: Get CD/WP GPIOs from descriptors 2019-02-12 19:47:10 +01:00
kernel MIPS: Remove function size check in get_frame_info() 2019-03-13 14:02:37 -07:00
kvm KVM: Remove obsolete kvm_unmap_hva notifier backend 2018-09-07 15:06:02 +02:00
lantiq MIPS: lantiq: Fix IPI interrupt handling 2019-01-22 21:40:33 +01:00
lasat kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
lib MIPS: memset: Fix CPU_DADDI_WORKAROUNDS `small_fixup' regression 2018-10-05 09:41:39 -07:00
loongson32
loongson64 mips: loongson64: remove unreachable(), fix loongson_poweroff(). 2019-02-15 08:10:11 +01:00
math-emu MIPS: math-emu: Write-protect delay slot emulation pages 2019-01-09 17:38:47 +01:00
mm MIPS: Expand MIPS32 ASIDs to 64 bits 2019-01-09 17:38:48 +01:00
mti-malta
net MIPS: eBPF: Fix icache flush end address 2019-03-05 17:58:54 +01:00
netlogic
oprofile
paravirt
pci MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled 2019-02-15 08:10:11 +01:00
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8 2019-02-12 19:47:17 +01:00
rb532
sgi-ip22
sgi-ip27
sgi-ip32
sibyte MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur 2019-01-26 09:32:35 +01:00
sni
tools
txx9
vdso MIPS: VDSO: Include $(ccflags-vdso) in o32,n32 .lds builds 2019-02-15 08:10:12 +01:00
vr41xx
Kbuild
Kbuild.platforms
Kconfig MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur 2019-01-26 09:32:35 +01:00
Kconfig.debug
Makefile kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
Makefile.postlink