From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFoQX-0006fS-6C for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:35:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFoQS-0006cw-Dr for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:35:24 -0500 Received: from [199.232.76.173] (port=46385 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFoQR-0006cr-Uv for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:35:20 -0500 Received: from thoth.sbs.de ([192.35.17.2]:18434) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NFoQR-00074m-ER for qemu-devel@nongnu.org; Wed, 02 Dec 2009 07:35:19 -0500 Message-ID: <4B165F04.8090000@siemens.com> Date: Wed, 02 Dec 2009 13:35:16 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1259671897-22232-1-git-send-email-glommer@redhat.com> <1259671897-22232-2-git-send-email-glommer@redhat.com> <1259671897-22232-3-git-send-email-glommer@redhat.com> <1259671897-22232-4-git-send-email-glommer@redhat.com> <1259671897-22232-5-git-send-email-glommer@redhat.com> <1259671897-22232-6-git-send-email-glommer@redhat.com> <20091202104826.GA9537@redhat.com> <5d6222a80912020322s49e45015ga7b012ddd066c93b@mail.gmail.com> <4B16592E.5030201@siemens.com> <20091202122653.GD9537@redhat.com> In-Reply-To: <20091202122653.GD9537@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 05/11] tell kernel about all registers instead of just mp_state List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: "aliguori@us.ibm.com" , Glauber Costa , Glauber Costa , "qemu-devel@nongnu.org" , "agraf@suse.de" , "avi@redhat.com" Gleb Natapov wrote: > On Wed, Dec 02, 2009 at 01:10:22PM +0100, Jan Kiszka wrote: >> Glauber Costa wrote: >>>>> +{ >>>>> + if (kvm_enabled()) { >>>> Is this ever called or intended to be called when kvm is disabled? >>>> >>>>> + kvm_cpu_flush_state(env); >>>>> + } >>> I don't think so. But this is here for consistency with its synchronize brother. >> Ack. As soon as someone starts to use this generic service outside code >> that is only built under CONFIG_KVM or called when kvm is enabled, >> things will break. >> > We can add the check when adding first such user. Code outside > CONFIG_KVM can't use this since the function is in kvm.h header. > I don't have really strong opinion about that. I personally use > kvm_enabled() as a hint that code is generic for kvm and non-kvm > case when reading code. It's the same case as with cpu_synchronize_state, just that the latter is already used outside kvm code. Both services logically belong into a different header but are in kvm.h for simplicity reasons. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux