KVM: SVM: Emulate nRIP feature when reinjecting INT3
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 23 Feb 2010 16:47:56 +0000 (17:47 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 10:00:43 +0000 (13:00 +0300)
commit66b7138f913635b40822890ba8913548f8b285b8
tree1dd5faf941e04ae911e0bc9e9f00869f6a0aebd2
parentf92653eeb496fe8624ac4b0d628c916a06a3d25c
KVM: SVM: Emulate nRIP feature when reinjecting INT3

When in guest debugging mode, we have to reinject those #BP software
exceptions that are caused by guest-injected INT3. As older AMD
processors do not support the required nRIP VMCB field, try to emulate
it by moving RIP past the instruction on exception injection. Fix it up
again in case the injection failed and we were able to catch this. This
does not work for unintercepted faults, but it is better than doing
nothing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c