qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH][RFC v2 3/7] vl: create power chip device
Date: Fri, 05 Apr 2013 13:48:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 05/04/2013 06:28, liguang ha scritto:
> Signed-off-by: liguang <address@hidden>
> ---
>  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 :
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]