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 (was: [RF


From: Paul Brook
Subject: Re: [Qemu-devel] Machine description as data prototype, take 2 (was: [RFC] Machine description as data)
Date: Tue, 17 Feb 2009 17:32:29 +0000
User-agent: KMail/1.9.9

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





reply via email to

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