linux-stable/arch/arm64
Christoffer Dall 7a364bd5db KVM: arm/arm64: Avoid vcpu_load for other vcpu ioctls than KVM_RUN
Calling vcpu_load() registers preempt notifiers for this vcpu and calls
kvm_arch_vcpu_load().  The latter will soon be doing a lot of heavy
lifting on arm/arm64 and will try to do things such as enabling the
virtual timer and setting us up to handle interrupts from the timer
hardware.

Loading state onto hardware registers and enabling hardware to signal
interrupts can be problematic when we're not actually about to run the
VCPU, because it makes it difficult to establish the right context when
handling interrupts from the timer, and it makes the register access
code difficult to reason about.

Luckily, now when we call vcpu_load in each ioctl implementation, we can
simply remove the call from the non-KVM_RUN vcpu ioctls, and our
kvm_arch_vcpu_load() is only used for loading vcpu content to the
physical CPU when we're actually going to run the vcpu.

Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-03-19 10:53:09 +00:00
..
boot ARM: SoC device tree updates for 4.16 2018-02-01 16:07:54 -08:00
configs ARM: SoC platform updates for 4.16 2018-02-01 16:17:40 -08:00
crypto crypto: arm64/sha512 - fix/improve new v8.2 Crypto Extensions code 2018-01-26 01:10:36 +11:00
include arm64: KVM: Move CPU ID reg trap setup off the world switch path 2018-02-26 10:48:01 +01:00
kernel arm64/kvm: Prohibit guest LOR accesses 2018-02-26 10:48:01 +01:00
kvm KVM: arm/arm64: Avoid vcpu_load for other vcpu ioctls than KVM_RUN 2018-03-19 10:53:09 +00:00
lib arm64: uaccess: Mask __user pointers for __arch_{clear, copy_*}_user 2018-02-06 22:53:40 +00:00
mm arm64: Enforce BBM for huge IO/VMAP mappings 2018-02-22 11:25:53 +00:00
net bpf, arm64: fix out of bounds access in tail call 2018-02-22 16:06:28 -08:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: Add software workaround for Falkor erratum 1041 2018-02-06 22:53:13 +00:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms clk: meson-axg: add clock controller drivers 2017-12-14 10:19:37 +01:00
Makefile arm64: ftrace: emit ftrace-mod.o contents through code 2017-12-01 13:04:59 +00:00