[PATCH v2 5/7] KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP

Jan Kiszka
2010-02-23T16:48:19Z

This marks the guest single-step API improvement of 94fe45da and
91586a3b with a capability flag to allow reliable detection by user
space.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
arch/x86/kvm/x86.c | 1 +
include/linux/kvm.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 1a97c43..7abc3c0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1571,6 +1571,7 @@ int kvm_dev_ioctl_check_extension(long ext)
case KVM_CAP_HYPERV_SPIN:
case KVM_CAP_PCI_SEGMENT:
case KVM_CAP_DEBUGREGS:
+ case KVM_CAP_X86_ROBUST_SINGLESTEP:
r = 1;
break;
case KVM_CAP_COALESCED_MMIO:
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index d25912e..ce28767 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -506,6 +506,7 @@ struct kvm_ioeventfd {
#ifdef __KVM_HAVE_DEBUGREGS
#define KVM_CAP_DEBUGREGS 50
#endif
+#define KVM_CAP_X86_ROBUST_SINGLESTEP 51

#ifdef KVM_CAP_IRQ_ROUTING

--
1.6.0.2