mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
61e5f69ef0
KVM_GUESTDBG_BLOCKIRQ will allow KVM to block all interrupts while running. This change is mostly intended for more robust single stepping of the guest and it has the following benefits when enabled: * Resuming from a breakpoint is much more reliable. When resuming execution from a breakpoint, with interrupts enabled, more often than not, KVM would inject an interrupt and make the CPU jump immediately to the interrupt handler and eventually return to the breakpoint, to trigger it again. From the user point of view it looks like the CPU never executed a single instruction and in some cases that can even prevent forward progress, for example, when the breakpoint is placed by an automated script (e.g lx-symbols), which does something in response to the breakpoint and then continues the guest automatically. If the script execution takes enough time for another interrupt to arrive, the guest will be stuck on the same breakpoint RIP forever. * Normal single stepping is much more predictable, since it won't land the debugger into an interrupt handler. * RFLAGS.TF has less chance to be leaked to the guest: We set that flag behind the guest's back to do single stepping but if single step lands us into an interrupt/exception handler it will be leaked to the guest in the form of being pushed to the stack. This doesn't completely eliminate this problem as exceptions can still happen, but at least this reduces the chances of this happening. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20210811122927.900604-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
a.out.h | ||
auxvec.h | ||
bitsperlong.h | ||
boot.h | ||
bootparam.h | ||
byteorder.h | ||
debugreg.h | ||
e820.h | ||
hw_breakpoint.h | ||
hwcap2.h | ||
ist.h | ||
Kbuild | ||
kvm.h | ||
kvm_para.h | ||
kvm_perf.h | ||
ldt.h | ||
mce.h | ||
mman.h | ||
msgbuf.h | ||
msr.h | ||
mtrr.h | ||
perf_regs.h | ||
posix_types.h | ||
posix_types_32.h | ||
posix_types_64.h | ||
posix_types_x32.h | ||
prctl.h | ||
processor-flags.h | ||
ptrace-abi.h | ||
ptrace.h | ||
sembuf.h | ||
setup.h | ||
sgx.h | ||
shmbuf.h | ||
sigcontext.h | ||
sigcontext32.h | ||
siginfo.h | ||
signal.h | ||
stat.h | ||
statfs.h | ||
svm.h | ||
swab.h | ||
ucontext.h | ||
unistd.h | ||
vm86.h | ||
vmx.h | ||
vsyscall.h |