From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V2 3/5] kvm hypervisor : Add two hypercalls to support pv-ticketlock Date: Mon, 24 Oct 2011 16:30:46 +0530 Message-ID: <4EA5455E.5090007@linux.vnet.ibm.com> References: <20111023190307.16364.35381.sendpatchset@oc5400248562.ibm.com> <20111023190558.16364.2136.sendpatchset@oc5400248562.ibm.com> <1319450510.5660.6.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Raghavendra K T , Greg Kroah-Hartman , "H. Peter Anvin" , Gleb Natapov , Virtualization , Jeremy Fitzhardinge , x86@kernel.org, KVM , Dave Jiang , Thomas Gleixner , Stefano Stabellini , Xen , Sedat Dilek , Yinghai Lu , Marcelo Tosatti , Ingo Molnar , Avi Kivity , Rik van Riel , Konrad Rzeszutek Wilk , LKML , Suzuki Poulose , Srivatsa Vaddagiri , Peter Zijlstra Return-path: In-Reply-To: <1319450510.5660.6.camel@lappy> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 10/24/2011 03:31 PM, Sasha Levin wrote: > On Mon, 2011-10-24 at 00:35 +0530, Raghavendra K T wrote: >> Add two hypercalls to KVM hypervisor to support pv-ticketlocks. >> >> +static void kvm_pv_kick_cpu_op(struct kvm *kvm, int cpu) >> +{ >> + struct kvm_vcpu *vcpu = kvm_get_vcpu(kvm, cpu); >> + >> + if (vcpu) { >> + vcpu->kicked = 1; > > I'm not sure about it, but maybe we want a memory barrier over here? Yes, Thanks for pointing this. Avi Kivity also pointed same. 'll add barrier() here. > >> + wake_up_interruptible(&vcpu->wq); >> + } >> +}