linux_dsm_epyc7002/arch/arm64/kvm/hyp
Mark Rutland bd7d95cafb arm64: KVM: Consistently advance singlestep when emulating instructions
When we emulate a guest instruction, we don't advance the hardware
singlestep state machine, and thus the guest will receive a software
step exception after a next instruction which is not emulated by the
host.

We bodge around this in an ad-hoc fashion. Sometimes we explicitly check
whether userspace requested a single step, and fake a debug exception
from within the kernel. Other times, we advance the HW singlestep state
rely on the HW to generate the exception for us. Thus, the observed step
behaviour differs for host and guest.

Let's make this simpler and consistent by always advancing the HW
singlestep state machine when we skip an instruction. Thus we can rely
on the hardware to generate the singlestep exception for us, and never
need to explicitly check for an active-pending step, nor do we need to
fake a debug exception from the guest.

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>
2018-12-18 14:11:37 +00:00
..
debug-sr.c KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags 2018-05-25 12:28:13 +01:00
entry.S KVM: arm64: Invoke FPSIMD context switch trap from C 2018-05-25 12:28:31 +01:00
fpsimd.S arm64: KVM: Implement fpsimd save/restore 2015-12-14 11:30:41 +00:00
hyp-entry.S KVM: arm64: Safety check PSTATE when entering guest and handle IL 2018-10-19 11:13:03 +01:00
Makefile kvm: arm64: Configure VTCR_EL2 per VM 2018-10-01 13:50:29 +01:00
switch.c arm64: KVM: Consistently advance singlestep when emulating instructions 2018-12-18 14:11:37 +00:00
sysreg-sr.c KVM updates for v4.20 2018-10-25 17:57:35 -07:00
tlb.c kvm: arm64: Add helper for loading the stage2 setting for a VM 2018-10-01 13:08:41 +01:00
vgic-v2-cpuif-proxy.c arm64: KVM: Consistently advance singlestep when emulating instructions 2018-12-18 14:11:37 +00:00