public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: SVM improvements around INT3 and NMI
@ 2010-02-15 18:17 Jan Kiszka
  2010-02-15 18:17 ` [PATCH 1/2] KVM: SVM: Emulate nRIP feature when reinjecting INT3 Jan Kiszka
  2010-02-15 18:17 ` [PATCH 2/2] KVM: SVM: Make stepping out of NMI handlers more robust Jan Kiszka
  0 siblings, 2 replies; 16+ messages in thread
From: Jan Kiszka @ 2010-02-15 18:17 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Gleb Natapov

Two patches that aim at improving some hairy SVM parts: The emulation of
INT3 reinjection on older processors without nRIP support (required for
proper guest debugging) and the infamous NMI handling.

Unfortunately, I do not have test cases for all scenarios involved.
Specifically the exception-during-IRET-from-NMI requires a hand-crafted
test that does not exist yet. However, patch 1 was successfully tested
on a nRIP-capable host by disabling that bit, and patch 2 survived
basic tests, including single-step out of NMI via guest debugging.

If the core idea of patch 2 - interception of all exceptions that the
problematic instruction causes - works, it may also be applied on INT3.
However, I'm reluctant to invest too much effort in this given that the
remaining open issues are very improbable to show up in practice.

Please check sceptically, I surely messed up some corner case.

Jan Kiszka (2):
  KVM: SVM: Emulate nRIP feature when reinjecting INT3
  KVM: SVM: Make stepping out of NMI handlers more robust

 arch/x86/include/asm/kvm_host.h |    3 +
 arch/x86/kvm/svm.c              |  166 ++++++++++++++++++++++++++++----------
 2 files changed, 125 insertions(+), 44 deletions(-)


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2010-02-18  7:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 18:17 [PATCH 0/2] KVM: SVM improvements around INT3 and NMI Jan Kiszka
2010-02-15 18:17 ` [PATCH 1/2] KVM: SVM: Emulate nRIP feature when reinjecting INT3 Jan Kiszka
2010-02-16  7:52   ` Gleb Natapov
2010-02-16  8:02     ` Jan Kiszka
2010-02-16  9:50   ` [PATCH v2 " Jan Kiszka
2010-02-15 18:17 ` [PATCH 2/2] KVM: SVM: Make stepping out of NMI handlers more robust Jan Kiszka
2010-02-16  8:04   ` Gleb Natapov
2010-02-16  9:14     ` Jan Kiszka
2010-02-16  9:34       ` Gleb Natapov
2010-02-16  9:45         ` Jan Kiszka
2010-02-16  9:49           ` Gleb Natapov
2010-02-16 10:05             ` Jan Kiszka
2010-02-16 10:08               ` Gleb Natapov
2010-02-17 13:49                 ` Gleb Natapov
2010-02-17 19:16                   ` Jan Kiszka
2010-02-18  7:52                     ` Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox