From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raghavendra K T Subject: Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks Date: Fri, 02 Dec 2011 17:59:16 +0530 Message-ID: <4ED8C49C.8070306@linux.vnet.ibm.com> References: <20111130085921.23386.89708.sendpatchset@oc5400248562.ibm.com> <20111130085959.23386.69166.sendpatchset@oc5400248562.ibm.com> <4ED760F1.6080804@redhat.com> <4ED7DA85.5080504@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4ED7DA85.5080504@linux.vnet.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Avi Kivity Cc: Jeremy Fitzhardinge , x86@kernel.org, Peter Zijlstra , Virtualization , "H. Peter Anvin" , Stefano Stabellini , Xen , Dave Jiang , KVM , Raghavendra K T , Ingo Molnar , Rik van Riel , Konrad Rzeszutek Wilk , Srivatsa Vaddagiri , Jeremy Fitzhardinge , Sasha Levin , Sedat Dilek , Thomas Gleixner , Yinghai Lu , Greg Kroah-Hartman , LKML , Dave Hansen , Suzuki List-Id: virtualization@lists.linuxfoundation.org On 12/02/2011 01:20 AM, Raghavendra K T wrote: >>> + struct kvm_mp_state mp_state; >>> + >>> + mp_state.mp_state = KVM_MP_STATE_RUNNABLE; >>> + if (vcpu) { >>> + vcpu->kicked = 1; >>> + /* Ensure kicked is always set before wakeup */ >>> + barrier(); >>> + } >>> + kvm_arch_vcpu_ioctl_set_mpstate(vcpu,&mp_state); >> >> This must only be called from the vcpu thread. > > Hmm. Okay. 'll check this. > Yes true. kvm_arch_vcpu_ioctl_set_mpstate itself is redundant, and will remove this.