From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO58y-0001O4-A3 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 07:49:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO58o-0002fr-U7 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 07:49:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO58o-0002fd-Ni for qemu-devel@nongnu.org; Fri, 05 Apr 2013 07:49:10 -0400 Message-ID: <515EBA2A.1090005@redhat.com> Date: Fri, 05 Apr 2013 13:48:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365136091-26148-1-git-send-email-lig.fnst@cn.fujitsu.com> <1365136091-26148-4-git-send-email-lig.fnst@cn.fujitsu.com> In-Reply-To: <1365136091-26148-4-git-send-email-lig.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liguang Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, aliguori@us.ibm.com, afaerber@suse.de, stefanha@gmail.com Il 05/04/2013 06:28, liguang ha scritto: > Signed-off-by: liguang > --- > vl.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/vl.c b/vl.c > index aeed7f4..a14549e 100644 > --- a/vl.c > +++ b/vl.c > @@ -171,6 +171,8 @@ int main(int argc, char **argv) > #include "ui/qemu-spice.h" > #include "qapi/string-input-visitor.h" > > +#include "hw/power.h" > + > //#define DEBUG_NET > //#define DEBUG_SLIRP > > @@ -4295,6 +4297,8 @@ int main(int argc, char **argv, char **envp) > > qdev_machine_init(); > > + qdev_init_nofail(qdev_create(NULL, TYPE_POWER_CHIP)); > + You cannot just add a random device to the machine. Perhaps what you want to do is define a QOM interface that some device in the machine will implement. But right now this all seems very nebulous. Honestly, I read the patches and I have no idea _why_ you are doing this. Paolo > QEMUMachineInitArgs args = { .ram_size = ram_size, > .boot_device = (boot_devices[0] == '\0') ? > machine->boot_order : >