qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 2/5] machine: remove QEMUMachine indirection


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

Am 03.04.2014 19:11, schrieb Marcel Apfelbaum:
> On Thu, 2014-04-03 at 18:59 +0200, Andreas Färber wrote:
>> Am 31.03.2014 11:26, schrieb Marcel Apfelbaum:
>>> diff --git a/vl.c b/vl.c
>>> index 9975e5a..96155ca 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -1583,8 +1583,29 @@ MachineState *current_machine;
>>>  static void machine_class_init(ObjectClass *oc, void *data)
>>>  {
>>>      MachineClass *mc = MACHINE_CLASS(oc);
>>> -
>>> -    mc->qemu_machine = data;
>>
>> This looks incomplete. You should drop the qemu_machine field from
>> boards.h to assure that no one is using it - pseries still is, so 4/5
>> needs to be be squashed into this commit, otherwise the new fields below
>> remain empty for it.
> Yes, indeed, otherwise it will break bisection.
> I was looking for a way to separate the changes for hw/ppc/spapr.c
> into a separate patch.
> 
> Maybe I will leave both assignments (of the qemu_machine pointer and the 
> fields)
> in this patch and remove it on 5/5 (together with qemu_machine field from 
> boards.h), leaving the 4/5 as it is?

The trouble with 2/5 is that in generic code you start using mc->
fields, which do not get assigned by pseries. So the "mc->... = ...;"
parts of 4/5 need to go into 2/5, whether you leave qemu_machine
assigned or not.

Of course I understand your desire to not put everything into one huge
commit. Maybe reordering 3/5 before this patch using ->qemu_machine
helps? Next prepare QEMUMachineInitArgs for MachineClass (5/5). Then in
this step you can drop qemu_machine field as suggested and any
->qemu_machine gets dropped in one big but mechanical change.

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]