]> err.no Git - linux-2.6/commitdiff
KVM: add basic paravirt support
authorMarcelo Tosatti <mtosatti@redhat.com>
Fri, 22 Feb 2008 17:21:36 +0000 (12:21 -0500)
committerAvi Kivity <avi@qumranet.com>
Sun, 27 Apr 2008 09:00:24 +0000 (12:00 +0300)
Add basic KVM paravirt support. Avoid vm-exits on IO delays.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/x86.c
include/asm-x86/kvm_para.h
include/linux/kvm.h

index 621a8e362fe772ec1b65789854ca555f13672ded..1b9e695cc64116f34270da7be083a0c53094e98d 100644 (file)
@@ -820,6 +820,7 @@ int kvm_dev_ioctl_check_extension(long ext)
        case KVM_CAP_EXT_CPUID:
        case KVM_CAP_CLOCKSOURCE:
        case KVM_CAP_PIT:
+       case KVM_CAP_NOP_IO_DELAY:
                r = 1;
                break;
        case KVM_CAP_VAPIC:
index 5ab7d3dbd357d9b6d22e59f29b461f7e0a7b8f97..ed5df3a54aab6340b2cf6194e3efcd09de057ee9 100644 (file)
@@ -10,7 +10,8 @@
  * paravirtualization, the appropriate feature bit should be checked.
  */
 #define KVM_CPUID_FEATURES     0x40000001
-#define KVM_FEATURE_CLOCKSOURCE 0
+#define KVM_FEATURE_CLOCKSOURCE                0
+#define KVM_FEATURE_NOP_IO_DELAY       1
 
 #define MSR_KVM_WALL_CLOCK  0x11
 #define MSR_KVM_SYSTEM_TIME 0x12
index a2f3274016ee01a2c00f1b0b440fc3f75b820565..76f09474be98d22b6a95c8ce49047a4e9045dcff 100644 (file)
@@ -237,6 +237,7 @@ struct kvm_vapic_addr {
 #define KVM_CAP_NR_VCPUS 9       /* returns max vcpus per vm */
 #define KVM_CAP_NR_MEMSLOTS 10   /* returns max memory slots per vm */
 #define KVM_CAP_PIT 11
+#define KVM_CAP_NOP_IO_DELAY 12
 
 /*
  * ioctls for VM fds