From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state Date: Tue, 25 Jan 2011 07:58:36 -0600 Message-ID: <4D3ED70C.5000400@codemonkey.ws> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm@vger.kernel.org, Glauber Costa , Marcelo Tosatti , Markus Armbruster , qemu-devel@nongnu.org, Anthony Liguori To: Avi Kivity Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:51403 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551Ab1AYN6j (ORCPT ); Tue, 25 Jan 2011 08:58:39 -0500 Received: by yxt3 with SMTP id 3so1700600yxt.19 for ; Tue, 25 Jan 2011 05:58:39 -0800 (PST) In-Reply-To: <4D3EA5A9.1010408@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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