From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdJU5-0006iS-BU for qemu-devel@nongnu.org; Tue, 18 Aug 2009 03:51:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdJTz-0006fK-TA for qemu-devel@nongnu.org; Tue, 18 Aug 2009 03:51:56 -0400 Received: from [199.232.76.173] (port=40915 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdJTz-0006f3-Lc for qemu-devel@nongnu.org; Tue, 18 Aug 2009 03:51:51 -0400 Received: from mx20.gnu.org ([199.232.41.8]:38881) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MdJTy-0001fX-Sc for qemu-devel@nongnu.org; Tue, 18 Aug 2009 03:51:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MdJTx-000517-Si for qemu-devel@nongnu.org; Tue, 18 Aug 2009 03:51:50 -0400 Message-ID: <4A8A5D90.8080700@redhat.com> Date: Tue, 18 Aug 2009 10:51:44 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] kvm: Simplify cpu_synchronize_state() References: <1250540393-3998-1-git-send-email-avi@redhat.com> <20090817205226.GA13129@1und1.de> In-Reply-To: <20090817205226.GA13129@1und1.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Reimar_D=F6ffinger?= Cc: qemu-devel@nongnu.org On 08/17/2009 11:52 PM, Reimar D=F6ffinger wrote: > On Mon, Aug 17, 2009 at 11:19:53PM +0300, Avi Kivity wrote: > =20 >> diff --git a/kvm-all.c b/kvm-all.c >> index f669c3a..15c30d4 100644 >> --- a/kvm-all.c >> +++ b/kvm-all.c >> @@ -57,6 +57,7 @@ struct KVMState >> KVMSlot slots[32]; >> int fd; >> int vmfd; >> + int regs_modified; >> int coalesced_mmio; >> int broken_set_mem_region; >> int migration_log; >> =20 > I think regs_modified is a really bad name since it has nothing at all > to do with whether the registers were modified. > IMO it actually indicates if the register copy in the KVM or in CPUStat= e > is valid. > So maybe cpustate_regs_valid is a more straight-forward name? (implying > that when the cpustate regs are valid, the kvm ones probably aren't - > though the way qemu access registers we can't know). > =20 I'm fine with such a change. > One disadvantage is that code that only needs to read registers will no= w > uselessly do kvm_arch_put_registers. > A fancy way to do it would be to add a "mode" flag indicating if we onl= y > want read or read-write access to registers, but since we can't enforce > that it might be a bad idea. > =20 This is so rare it's pointless to optimize. --=20 error compiling committee.c: too many arguments to function