[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH RFC V4 2/5] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks
- To: Avi Kivity <avi@xxxxxxxxxx>
- From: Raghavendra K T <raghavendra.kt@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 Jan 2012 15:25:07 +0530
- Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Jan Kiszka <jan.kiszka@xxxxxxxxxxx>, Virtualization <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, KVM <kvm@xxxxxxxxxxxxxxx>, Glauber Costa <glommer@xxxxxxxxxx>, X86 <x86@xxxxxxxxxx>, Alexander Graf <agraf@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Srivatsa Vaddagiri <vatsa@xxxxxxxxxxxxxxxxxx>, Sasha Levin <levinsasha928@xxxxxxxxx>, Sedat Dilek <sedat.dilek@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Dave Hansen <dave@xxxxxxxxxxxxxxxxxx>, Suzuki Poulose <suzuki@xxxxxxxxxxxxxxxxxx>, Rob Landley <rlandley@xxxxxxxxxxxxx>
- Delivery-date: Mon, 16 Jan 2012 11:26:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
On 01/16/2012 02:33 PM, Avi Kivity wrote:
+/*
+ * kvm_pv_kick_cpu_op: Kick a vcpu.
+ *
+ * @apicid - apicid of vcpu to be kicked.
+ */
+static void kvm_pv_kick_cpu_op(struct kvm *kvm, int apicid)
+{
+ struct kvm_vcpu *vcpu = NULL;
+ int i;
+
+ kvm_for_each_vcpu(i, vcpu, kvm) {
+ if (!kvm_apic_present(vcpu))
+ continue;
+
+ if (kvm_apic_match_dest(vcpu, 0, 0, apicid, 0))
+ break;
+ }
+ if (vcpu) {
+ kvm_make_request(KVM_REQ_PVLOCK_KICK, vcpu);
+ kvm_vcpu_kick(vcpu);
+ }
+}
+
The code that handles KVM_REQ_PVLOCK_KICK needs to be in this patch.
Yes, Agree. as Alex also pointed, the related hunk from patch 4 should
be added here.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|