From: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx> The patch, extends KVM-hypervisor and Linux guest running on KVM-hypervisor to support pv-ticket spinlocks. PV ticket spinlock helps to solve Lock Holder Preemption problem discussed in http://www.amd64.org/fileadmin/user_upload/pub/LHP-commented_slides.pdf. When spinlock is contended,a guest vcpu relinqueshes cpu by halt(). Correspondingly, One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick the halted vcpu to continue with execution. Note: Below patch should be applied only after corresponding linux-header changes taken into qemu via scripts/update-linux-headers.sh script. TODO: There was a discussion on changing cpuid stuff, paravirt and non-paravirt stuff to address backward compatibility/feature support with Avi and Jan. But it is not addressed yet. Changes in V2: Drop the syncing kernel header changes. (Alex) rename KICK_VCPU --> PVLOCK_KICK. Change log: Extend the KVM Hypervisor to enable PVLOCK_KICK feature that allows a vcpu to kick the halted vcpu to continue with execution in PV ticket spinlock. Signed-off-by: Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx> Signed-off-by: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx> --- The corresponding kernel patch is available in the thread https://lkml.org/lkml/2012/1/14/66 older kernel patch: https://lkml.org/lkml/2011/11/30/62 older qemu-patch: http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg00397.html diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 04e65c5..14de1c0 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -97,6 +97,7 @@ struct kvm_para_features { { KVM_CAP_NOP_IO_DELAY, KVM_FEATURE_NOP_IO_DELAY }, { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP }, { KVM_CAP_ASYNC_PF, KVM_FEATURE_ASYNC_PF }, + { KVM_CAP_PVLOCK_KICK, KVM_FEATURE_PVLOCK_KICK }, { -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