qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 4/5] hw/ppc: remove QEMUMachine indirection


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH V2 4/5] hw/ppc: remove QEMUMachine indirection
Date: Thu, 03 Apr 2014 19:57:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Am 03.04.2014 19:46, schrieb Marcel Apfelbaum:
> On Thu, 2014-04-03 at 19:25 +0200, Andreas Färber wrote:
>> Am 31.03.2014 11:26, schrieb Marcel Apfelbaum:
>>> No need for QEMUMachine anymore because
>>> its fields are passed to MachineClass.
>>
>> QEMUMachineInitArgs still has a QEMUMachine field that now becomes NULL?
> No... 
> It is properly initiated right before the machine init: (No changes made)
> 
> 
>    QEMUMachineInitArgs args = { .machine = machine, 
>                                 .ram_size = ram_size, 
>                                 .boot_order = boot_order, 
>                                 .kernel_filename = kernel_filename, 
>                                 .kernel_cmdline = kernel_cmdline, 
>                                 .initrd_filename = initrd_filename, 
>                                 .cpu_model = cpu_model }; 
>    
>    current_machine->init_args = args; 
>    machine->init(&current_machine->init_args);

You're dropping pseries QEMUMachine in this patch,
=> mc->qemu_machine = NULL
=> machine = NULL
=> .machine = NULL

Therefore my suggestion to start using MachineClass for .machine early
(because machine_class != NULL) and to do the ->qemu_machine and mc->
changes in one go (so that ->qemu_machine != NULL as long as it exists).

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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