[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/11] config: Add header file for device config
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH 10/11] config: Add header file for device config options |
Date: |
Sun, 21 Nov 2010 13:45:57 +0100 |
On 21.11.2010, at 13:37, Blue Swirl wrote:
> On Fri, Nov 19, 2010 at 2:56 AM, Alexander Graf <address@hidden> wrote:
>> So far we have C preprocessor defines for target and host config
>> options, but we're lacking any information on which devices are
>> available.
>>
>> We do need that information at times though, for example in the
>> ahci patch where we need to call a legacy init function depending
>> on whether we have support compiled in or not.
>
> That does not seem right. Devices should not care about what other
> devices may exist. Perhaps stub style approach would be better.
Well, for the -drive parameter we need to know what devices we can create and
I'd like to keep that code as close as possible to the actual device code.
So the stub alternative would be to create a stub .c file for each device that
could get created during -drive. I'm not sure that is a good idea :).
Another alternative would be to move the instantiation code to somewhere
generic. But that sounds rather ugly to me.
Also, devices really shouldn't care about other devices' availability. Machine
descriptions should care, and that's what this patch is there for :).
Alex
- [Qemu-devel] [PATCH 00/11] AHCI emulation support v3, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 06/11] pci: add storage class for sata, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 05/11] ide: add ncq identify data for ahci sata drives, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 11/11] ahci: spawn controller on demand, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 01/11] ide: split ide command interpretation off, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 03/11] ide: add support for ide bus ops, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 09/11] ahci: add -drive support, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 07/11] pci: add ich7 pci id, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 04/11] ide: add DMA hooks to bus ops, Alexander Graf, 2010/11/18
- [Qemu-devel] [PATCH 02/11] ide: fix whitespace gap in ide_exec_cmd, Alexander Graf, 2010/11/18