[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse |
Date: |
Tue, 24 Mar 2015 13:48:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Adding Andreas because he's the odd fixer for pc87312.
Paolo Bonzini <address@hidden> writes:
> 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.
Two questions: what exactly is going to change, and where do we want to
document it?
On the former:
Use of -drive if=floppy with onboard pc87312 (machine "prep") shouldn't
be affected. Likewise for connecting onboard m25p80-generic derivatives
with if=mtd drives, or onboard ssi-sd with if=sd.
Weird usage similar to the one you caught in time for sdhci-pci (--drive
if=sd --device sdhci-pci) would break. It's possible when the target
has the device, and the machine type has a suitable bus.
* pc87312
Depends on CONFIG_PC87312, set in {ppc,ppc64}-softmmu.mak.
Requires an ISA bus. I believe "prep" is the only machine providing
one. Adding a second one with --device seems unlikely to work (I
didn't try). If that's correct, there's nothing to document.
If Andreas agrees, I can set cannot_instantiate_with_device_add_yet
for pc87312 now.
* ssi-sd
Depends on CONFIG_SSI_SD, set in arm-softmmu.mak.
Requires an SSI bus. At least the following targets provide one:
collie, highbank, lm3s6965evb, lm3s811evb, midway, xilinx-zynq-a9.
Can't exclude use of --device ssi-sd.
I guess we want to document that --device ssi-sd will at some point
cease to auto-connect to the next available if=sd drive and require
the usual drive property instead. Okay?
* m25p80-generic
Depends on CONFIG_SSI_M25P80, set in
{arm,microblaze,microblazeel}-softmmu.mak.
Requires an SSI bus. At least the ARM targets above provide one.
Can't exclude use with --device.
Document just like ssi-sd.
[...]
> Acked-by: Paolo Bonzini <address@hidden>
Thanks!
- [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Markus Armbruster, 2015/03/23
- [Qemu-devel] [PATCH for-2.3 3/3] sysbus: Contain drive_get_next() misuse, Markus Armbruster, 2015/03/23
- [Qemu-devel] [PATCH for-2.3 2/3] sdhci: Make device "sdhci-pci" unavailable with -device, Markus Armbruster, 2015/03/23
- [Qemu-devel] [PATCH for-2.3 1/3] hw: Mark devices misusing drive_get(), drive_get_next() FIXME, Markus Armbruster, 2015/03/23
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Paolo Bonzini, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Paolo Bonzini, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Markus Armbruster, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Paolo Bonzini, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Markus Armbruster, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Paolo Bonzini, 2015/03/24
- Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Markus Armbruster, 2015/03/25
Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse, Markus Armbruster, 2015/03/25