From: Jan Kiszka Subject: [PATCH 0/2] KVM: SVM improvements around INT3 and NMI Date: Mon, 15 Feb 2010 19:17:16 +0100 Message-ID: Cc: kvm , Gleb Natapov To: Avi Kivity , Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:24976 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755643Ab0BOSRh (ORCPT ); Mon, 15 Feb 2010 13:17:37 -0500 Sender: kvm-owner@vger.kernel.org List-ID: 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(-)