qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse
Date: Tue, 24 Mar 2015 11:22:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 23/03/2015 20:09, Markus Armbruster wrote:
> Drives defined with if!=none are for board initialization to wire up.
> Board code calls drive_get() or similar to find them, and creates
> devices with their qdev drive properties set accordingly.
> 
> Except a few devices go on a fishing expedition for a suitable backend
> instead of exposing a drive property for board code to set: they call
> driver_get() or drive_get_next() in their realize() or init() method.
> Wrong.
> 
> We can't fix this in time for the release, so do the next best thing:
> contain the mistakes as far as possible so they don't become ABI:
> 
> * Mark them all with suitable FIXME comments [PATCH 1]
> 
> * sdhci-pci is new, set cannot_instantiate_with_device_add_yet to make
>   it unavailable with -device [PATCH 2]
> 
> * A few more aren't currently available with -device, set
>   cannot_instantiate_with_device_add_yet to ensure they stay
>   unavailable [PATCH 3]
> 
> * Left alone: m25p80-generic and its derivatives, ssi-sd, pc87312

Maybe worth documenting as future incompatible changes?  These machines
are not versioned, so it's not the end of the world to make things saner
if somebody comes and qdevifies the SD card.

> Markus Armbruster (3):
>   hw: Mark devices misusing drive_get(), drive_get_next() FIXME
>   sdhci: Make device "sdhci-pci" unavailable with -device
>   sysbus: Contain drive_get_next() misuse
> 
>  hw/arm/spitz.c            | 3 +++
>  hw/block/m25p80.c         | 1 +
>  hw/isa/pc87312.c          | 2 ++
>  hw/sd/milkymist-memcard.c | 3 +++
>  hw/sd/pl181.c             | 3 +++
>  hw/sd/sdhci.c             | 6 ++++++
>  hw/sd/ssi-sd.c            | 1 +
>  7 files changed, 19 insertions(+)
> 

Acked-by: Paolo Bonzini <address@hidden>



reply via email to

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