]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Skip MMIO insn after emulation
authorMark Rutland <mark.rutland@arm.com>
Fri, 9 Nov 2018 15:07:10 +0000 (15:07 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 18 Dec 2018 14:10:36 +0000 (14:10 +0000)
commit6c5527f7635a2a83b46269f5829ddaf91eefe313
treeaa9c116f560d604190b904d0a0b966cdae8e6519
parentc1cd78c0e0fca39e5e5c6c6ccb3b1437a1beeacd
arm64: KVM: Skip MMIO insn after emulation

When we emulate an MMIO instruction, we advance the CPU state within
decode_hsr(), before emulating the instruction effects.

Having this logic in decode_hsr() is opaque, and advancing the state
before emulation is problematic. It gets in the way of applying
consistent single-step logic, and it prevents us from being able to fail
an MMIO instruction with a synchronous exception.

Clean this up by only advancing the CPU state *after* the effects of the
instruction are emulated.

Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/mmio.c