]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Fix guest single-stepping while interruptible
authorJan Kiszka <jan.kiszka@web.de>
Sun, 18 Oct 2009 11:24:44 +0000 (13:24 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 3 Dec 2009 07:32:19 +0000 (09:32 +0200)
commit10cb63e38c1c7fc627eef6df0950a4f0de3e177c
tree7bf7482bcbe690313909d5f2770384f853562a2d
parent170d95566c0c6f325cd8279fa70e64a7057abc47
KVM: x86: Fix guest single-stepping while interruptible

Commit 705c5323 opened the doors of hell by unconditionally injecting
single-step flags as long as guest_debug signaled this. This doesn't
work when the guest branches into some interrupt or exception handler
and triggers a vmexit with flag reloading.

Fix it by saving cs:rip when user space requests single-stepping and
restricting the trace flag injection to this guest code position.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c