From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 05/10] Don't call apic functions directly from kvm code Date: Wed, 17 Mar 2010 18:29:21 +0200 Message-ID: <4BA10361.2010203@redhat.com> References: <1267215141-13629-1-git-send-email-glommer@redhat.com> <1267215141-13629-2-git-send-email-glommer@redhat.com> <1267215141-13629-3-git-send-email-glommer@redhat.com> <1267215141-13629-4-git-send-email-glommer@redhat.com> <1267215141-13629-5-git-send-email-glommer@redhat.com> <1267215141-13629-6-git-send-email-glommer@redhat.com> <4B964CA6.9050909@redhat.com> <20100317140022.GA9951@mothafucka.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, mtosatti@redhat.com To: Glauber Costa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49495 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755580Ab0CQQ3Y (ORCPT ); Wed, 17 Mar 2010 12:29:24 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2HGTMJK018258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Mar 2010 12:29:22 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2HGTM2v015663 for ; Wed, 17 Mar 2010 12:29:22 -0400 In-Reply-To: <20100317140022.GA9951@mothafucka.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On 03/17/2010 04:00 PM, Glauber Costa wrote: > On Tue, Mar 09, 2010 at 03:27:02PM +0200, Avi Kivity wrote: > >> On 02/26/2010 10:12 PM, Glauber Costa wrote: >> >>> It is actually not necessary to call a tpr function to save and load cr8, >>> as cr8 is part of the processor state, and thus, it is much easier >>> to just add it to CPUState. >>> >>> As for apic base, wrap kvm usages, so we can call either the qemu device, >>> or the in kernel version. >>> >>> >>> } >>> >>> +static void kvm_set_apic_base(CPUState *env, uint64_t val) >>> +{ >>> + if (!kvm_irqchip_in_kernel()) >>> + cpu_set_apic_base(env, val); >>> >> What if it is in kernel? Just ignored? Doesn't seem right. >> > At this point it is right, because there is no irqchip in kernel yet. > > In a later patch, irqchip in kernel begins to exist, and this function > gets filled. > Ok. In the future please code things like that without the if (), and add it when you introduce the other side. Helps fend off nit-pickers. -- error compiling committee.c: too many arguments to function