From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM:VMX: Add support for Pause-Loop Exiting Date: Wed, 08 Jul 2009 07:43:56 +0300 Message-ID: <4A54240C.3050407@redhat.com> References: <20090708033235.GA577@edwin-srv.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Zhai, Edwin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:47045 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbZGHEnl (ORCPT ); Wed, 8 Jul 2009 00:43:41 -0400 In-Reply-To: <20090708033235.GA577@edwin-srv.sh.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/08/2009 06:32 AM, Zhai, Edwin wrote: > > /* > + * Indicate a busy-waiting vcpu in spinlock. We do not enable the PAUSE > + * exiting, so only get here on cpu with PAUSE-Loop-Exiting. > + */ > +static int handle_pause(struct kvm_vcpu *vcpu, > + struct kvm_run *kvm_run) > +{ > + skip_emulated_instruction(vcpu); > + yield(); > + return 1; > +} > + > yield() does nothing in Linux. Please look at http://lkml.org/lkml/2009/5/11/294 for what needs to be added to the scheduler (that message is part of a thread discussing the same feature for svm). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.