qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from Mach


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass
Date: Wed, 30 Apr 2014 10:39:44 +0300

On Tue, 2014-04-29 at 16:55 +0200, Andreas Färber wrote:
> Am 27.04.2014 11:08, schrieb Marcel Apfelbaum:
> > On Sat, 2014-04-26 at 00:30 +0200, Andreas Färber wrote:
> >> Am 09.04.2014 19:34, schrieb Marcel Apfelbaum:
> >>> Next steps:
> >>>  - Replace QemuOpts queries by MachineState fields.
> >>>  - Follow Paolo's suggestions to get rid of QEMUMachineInitArgs.
> >>
> >> Another next step will be re-evaluating the PC machines: If we let
> >> pc-x.y inherit from either an abstract base type or from the latest PC
> >> machine, then macro'ified copying of machine options can be replaced
> >> with overriding the actually changing values.
> > Are you referring to PC_COMPAT_xxx macros - compat_props?
> 
> Actually I rather meant PC_COMMON_MACHINE_OPTIONS,
> PC_DEFAULT_MACHINE_OPTIONS, PC_I440FX_MACHINE_OPTIONS,
> PC_Q35_MACHINE_OPTIONS et al. which are setting QEMUMachine fields, to
> be converted to MachineClass fields. Rather than just have them
> converted from ".foo = bar," to "dc->foo = bar;" I was thinking we might
> put the common parts into a base type's *_class_init while at it, and
> let the values be inherited via QOM rather than through repeated macro
> usage.
This would be the QOM way :), sure

> 
> Another more crazy thought would be whether we can construct a clever
> type inheritance hierarchy so that the 1.7 is based off 2.0, etc.
> That's about pc_compat_*() and pc_init_pci_*() / pc_q35_init_*() functions.
I was thinking about what would be the 'right' hierarchy that will let
us inherit/override all properties that are currently defined as macros. 
This is definitely on my todo list.
 
> 
> But you are of course right that we could/should at some point also
> re-evaluate the rest of our PC macros, such as PC_COMPAT_xxx. :)
> 
> > If yes, I was thinking about approaching this in a not distant future.
> 
> Good. Maybe it makes sense to track these TODO items on a Wiki page,
> such as http://wiki.qemu-project.org/Features/QOM/Machine?
Yes, I was thinking to add the plans in DeveloperNews and CodeTransitions,
but a full page will do it too :). I'll get to it.

Thanks,
Marcel

> 
> Cheers,
> Andreas
> 






reply via email to

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