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