[PATCH RFC 4/4] Add yield hypercall support in Qemu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add yield hypercall support in Qemu.

Signed-off-by: Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>

---
 kvm/include/linux/kvm.h        |    1 +
 kvm/include/x86/asm/kvm_para.h |    1 +
 target-i386/kvm.c              |    3 +++
 3 files changed, 5 insertions(+)

Index: qemu-kvm/kvm/include/linux/kvm.h
===================================================================
--- qemu-kvm.orig/kvm/include/linux/kvm.h
+++ qemu-kvm/kvm/include/linux/kvm.h
@@ -499,6 +499,7 @@ struct kvm_ioeventfd {
 #define KVM_CAP_PPC_SEGSTATE 43
 
 #define KVM_CAP_PCI_SEGMENT 47
+#define KVM_CAP_YIELD_HYPERCALL 55
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
Index: qemu-kvm/kvm/include/x86/asm/kvm_para.h
===================================================================
--- qemu-kvm.orig/kvm/include/x86/asm/kvm_para.h
+++ qemu-kvm/kvm/include/x86/asm/kvm_para.h
@@ -15,6 +15,7 @@
 #define KVM_FEATURE_CLOCKSOURCE		0
 #define KVM_FEATURE_NOP_IO_DELAY	1
 #define KVM_FEATURE_MMU_OP		2
+#define KVM_FEATURE_YIELD              4
 
 #define MSR_KVM_WALL_CLOCK  0x11
 #define MSR_KVM_SYSTEM_TIME 0x12
Index: qemu-kvm/target-i386/kvm.c
===================================================================
--- qemu-kvm.orig/target-i386/kvm.c
+++ qemu-kvm/target-i386/kvm.c
@@ -147,6 +147,9 @@ struct kvm_para_features {
 #ifdef KVM_CAP_PV_MMU
         { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP },
 #endif
+#ifdef KVM_CAP_YIELD_HYPERCALL
+	{ KVM_CAP_YIELD_HYPERCALL, KVM_FEATURE_YIELD },
+#endif
         { -1, -1 }
 };
 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux