Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753442AbbBJISU (ORCPT ); Tue, 10 Feb 2015 03:18:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46570 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbbBJISS (ORCPT ); Tue, 10 Feb 2015 03:18:18 -0500 Message-ID: <54D9BEC2.5020500@redhat.com> Date: Tue, 10 Feb 2015 09:18:10 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Matlack CC: "linux-kernel@vger.kernel.org" , kvm list , riel@redhat.com, Marcelo Tosatti , rkrcmar@redhat.com Subject: Re: [PATCH 1/2] KVM: x86: extract guest running logic from __vcpu_run References: <1423225019-11001-1-git-send-email-pbonzini@redhat.com> <1423225019-11001-2-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 21 On 09/02/2015 23:44, David Matlack wrote: >> > >> > +static inline int __vcpu_run(struct kvm *kvm, struct kvm_vcpu *vcpu) > Kind of confusing function body given the name. Maybe put > > if (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && > !vcpu->arch.apf.halted) > return vcpu_enter_guest(vcpu); > > back in vcpu_run and rename this function? vcpu_wait? Yeah, vcpu_wait or vcpu_block (since it calls kvm_vcpu_block) sound good. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/