From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45741 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsNsc-00083l-TC for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:12:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsNsY-00060O-Fv for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:12:20 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:49101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsNsY-0005zz-DT for qemu-devel@nongnu.org; Wed, 23 Feb 2011 18:12:18 -0500 Received: by vws19 with SMTP id 19so4307364vws.4 for ; Wed, 23 Feb 2011 15:12:18 -0800 (PST) Message-ID: <4D65945A.3090106@codemonkey.ws> Date: Wed, 23 Feb 2011 17:12:26 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH] Split machine creation from the main loop References: <1298497114-7436-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: 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: quintela@redhat.com Cc: qemu-devel@nongnu.org On 02/23/2011 05:00 PM, Juan Quintela wrote: > Anthony Liguori wrote: > >> The goal is to enable the monitor to run independently of whether the machine >> has been created such that the monitor can be used to specify all of the >> parameters for machine initialization. >> >> Signed-off-by: Anthony Liguori >> > I agree that it is one step in the right direction, but we are still > calling qemu_machine_init() before calling the main_loop(). > > What is the plan from here? > 1) Decouple QMP from qemu_machine_init(). This really requires the introduction of the new QAPI server that exists outside of the chardev infrastructure since chardevs are currently initialized in qemu_machine_init(). 2) Make qemu_machine_init() take no parameters and just reference global state. 3) Teach all QMP functions to behave themselves if called before qemu_machine_init() 4) Introduce QMP function to call qemu_machine_init() 5) Introduce new command line flag to not automatically call qemu_machine_init() 6) Convert all command line options to just be QMP function calls (6) can be started right now. (1) comes with the QAPI merge. (2) is pretty easy to do after applying this patch. (3) is probably something that can be done shortly after (1). (4) and (5) really require everything but (6) to be in place before we can meaningful do it. I think we can lay out much of the ground work for this in 0.15 and I think we can have a total conversion realistically for 0.16. That means that by EOY, we could invoke QEMU with no options and do everything through QMP. Somewhere in all of this, we need to fit in a stateful (non-)config file too IMHO. Regards, Anthony Liguori > Later, Juan. > >