From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGAXf-0007uH-5k for qemu-devel@nongnu.org; Thu, 03 Dec 2009 07:12:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGAXZ-0007s0-6T for qemu-devel@nongnu.org; Thu, 03 Dec 2009 07:12:13 -0500 Received: from [199.232.76.173] (port=54628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGAXY-0007rp-Ql for qemu-devel@nongnu.org; Thu, 03 Dec 2009 07:12:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22631) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGAXY-0007RV-Fr for qemu-devel@nongnu.org; Thu, 03 Dec 2009 07:12:08 -0500 Message-ID: <4B17AB15.5050701@redhat.com> Date: Thu, 03 Dec 2009 14:12:05 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1259761575-3953-1-git-send-email-glommer@redhat.com> <1259761575-3953-2-git-send-email-glommer@redhat.com> <1259761575-3953-3-git-send-email-glommer@redhat.com> <1259761575-3953-4-git-send-email-glommer@redhat.com> <1259761575-3953-5-git-send-email-glommer@redhat.com> <1259761575-3953-6-git-send-email-glommer@redhat.com> In-Reply-To: <1259761575-3953-6-git-send-email-glommer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 5/9] Don't call apic functions directly from kvm code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On 12/02/2009 03:46 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. > > @@ -789,8 +802,8 @@ int kvm_arch_post_run(CPUState *env, struct kvm_run *run) > else > env->eflags&= ~IF_MASK; > > - cpu_set_apic_tpr(env, run->cr8); > - cpu_set_apic_base(env, run->apic_base); > + env->cr8 = run->cr8; > + kvm_set_apic_base(env, run->apic_base); > > This will break irqchip-in-qemu, since the APIC tpr will be disconnected from the guest's cr8. -- error compiling committee.c: too many arguments to function