From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33398 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhjPz-0003PD-Oe for qemu-devel@nongnu.org; Tue, 25 Jan 2011 08:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhjPs-00009F-6f for qemu-devel@nongnu.org; Tue, 25 Jan 2011 08:58:47 -0500 Received: from mail-gy0-f173.google.com ([209.85.160.173]:37456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhjPs-000096-3H for qemu-devel@nongnu.org; Tue, 25 Jan 2011 08:58:40 -0500 Received: by gye5 with SMTP id 5so1949495gye.4 for ; Tue, 25 Jan 2011 05:58:39 -0800 (PST) Message-ID: <4D3ED70C.5000400@codemonkey.ws> Date: Tue, 25 Jan 2011 07:58:36 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state References: <4D2B6CB5.9050602@codemonkey.ws> <4D2B74D8.4080309@web.de> <4D2B8662.9060909@web.de> <4D2C60FB.7030009@linux.vnet.ibm.com> <4D2D80ED.8030405@redhat.com> <4D2D82EE.20002@siemens.com> <4D35A39A.8000801@siemens.com> <4D3EA5A9.1010408@redhat.com> In-Reply-To: <4D3EA5A9.1010408@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: kvm@vger.kernel.org, Jan Kiszka , Glauber Costa , Marcelo Tosatti , Markus Armbruster , qemu-devel@nongnu.org, Anthony Liguori On 01/25/2011 04:27 AM, Avi Kivity wrote: >> It boils down to how we reasonably pass a kvm_state reference from >> machine init code to a sysbus device. I'm probably biased, but I don't >> see any way that does not work against the idea of confining access to >> kvm_state or breaks device instantiation from the command line or a >> config file. > > I'm biased in the other direction, but I agree. Just #include "kvm.h" and reference the global kvm_state once in the initfn. We don't have to solve this problem yet. References to the global kvm_state become placeholders of where things need to be fixed up. Regards, Anthony Liguori