qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Machine description as data prototype, take 2


From: Markus Armbruster
Subject: Re: [Qemu-devel] Machine description as data prototype, take 2
Date: Wed, 18 Feb 2009 09:42:51 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Paul Brook <address@hidden> writes:

> On Monday 16 February 2009, Markus Armbruster wrote:
>> +    { "vga", sizeof(struct dt_device_vga), dt_vga_props,
>> +      dt_vga_config, dt_vga_init, NULL },
>> +    { "nic", sizeof(struct dt_device_nic), dt_nic_props,
>> +      dt_nic_config, dt_nic_init, NULL },
>
> I think this is doing things the wrong way. We shouldn't have a "nic" device 
> that mutates into one of several devices based on magic options. Instead each 
> nic/display adapter/HBA should be registered, and we instantiate those 
> directly. For devices that have a common set of properties (e.g. nics) it 
> probably makes sense to have common helper functions. It should be possible 
> to have a single device that is (say) both a SCSI HBA and a NIC.
>
> Paul

Fair point.  File it under "short cut".

My machine configuration tree is hard-coded, then modified according to
command line options.  The way that's done is not the way I think it
should be done.  I've concentrated on what to do with the configuration,
not so much on how to assemble it.




reply via email to

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