https://github.com/torvalds/linux
Revision 2113c5f62b7423e4a72b890bd479704aa85c81ba authored by Andrew Jones on 22 August 2019, 11:03:05 UTC, committed by Marc Zyngier on 22 August 2019, 12:19:56 UTC
If after an MMIO exit to userspace a VCPU is immediately run with an
immediate_exit request, such as when a signal is delivered or an MMIO
emulation completion is needed, then the VCPU completes the MMIO
emulation and immediately returns to userspace. As the exit_reason
does not get changed from KVM_EXIT_MMIO in these cases we have to
be careful not to complete the MMIO emulation again, when the VCPU is
eventually run again, because the emulation does an instruction skip
(and doing too many skips would be a waste of guest code :-) We need
to use additional VCPU state to track if the emulation is complete.
As luck would have it, we already have 'mmio_needed', which even
appears to be used in this way by other architectures already.

Fixes: 0d640732dbeb ("arm64: KVM: Skip MMIO insn after emulation")
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 16e604a
History
Tip revision: 2113c5f62b7423e4a72b890bd479704aa85c81ba authored by Andrew Jones on 22 August 2019, 11:03:05 UTC
KVM: arm/arm64: Only skip MMIO insn once
Tip revision: 2113c5f
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 14.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.6 KB
.mailmap -rw-r--r-- 12.0 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 97.1 KB
Kbuild -rw-r--r-- 1.5 KB
Kconfig -rw-r--r-- 595 bytes
MAINTAINERS -rw-r--r-- 509.8 KB
Makefile -rw-r--r-- 59.1 KB
README -rw-r--r-- 727 bytes

README

back to top