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: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH V2 4/5] hw/ppc: remove QEMUMachine indirection
Date: Thu, 03 Apr 2014 21:08:55 +0300

On Thu, 2014-04-03 at 19:57 +0200, Andreas Färber wrote:
> 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
Right! My bad :(

> 
> 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).
Going for it,

Thanks,
Marcel
> 
> Regards,
> Andreas
> 






reply via email to

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