From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com,
qemu-devel@nongnu.org, michael@walle.cc,
edgar.iglesias@gmail.com, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse
Date: Tue, 24 Mar 2015 13:48:57 +0100 [thread overview]
Message-ID: <877fu68ssm.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <55113AE7.1070506@redhat.com> (Paolo Bonzini's message of "Tue, 24 Mar 2015 11:22:31 +0100")
Adding Andreas because he's the odd fixer for pc87312.
Paolo Bonzini <pbonzini@redhat.com> 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 <pbonzini@redhat.com>
Thanks!
next prev parent reply other threads:[~2015-03-24 12:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 19:09 [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse Markus Armbruster
2015-03-23 19:09 ` [Qemu-devel] [PATCH for-2.3 1/3] hw: Mark devices misusing drive_get(), drive_get_next() FIXME Markus Armbruster
2015-03-23 19:09 ` [Qemu-devel] [PATCH for-2.3 2/3] sdhci: Make device "sdhci-pci" unavailable with -device Markus Armbruster
2015-03-23 19:13 ` Peter Maydell
2015-03-23 20:43 ` Markus Armbruster
2015-03-23 19:09 ` [Qemu-devel] [PATCH for-2.3 3/3] sysbus: Contain drive_get_next() misuse Markus Armbruster
2015-03-24 10:22 ` [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse Paolo Bonzini
2015-03-24 12:48 ` Markus Armbruster [this message]
2015-03-24 14:50 ` Paolo Bonzini
2015-03-24 15:18 ` Markus Armbruster
2015-03-24 16:20 ` Paolo Bonzini
2015-03-24 20:03 ` Markus Armbruster
2015-03-24 20:13 ` Paolo Bonzini
2015-03-25 10:23 ` Markus Armbruster
2015-03-25 14:26 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877fu68ssm.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=edgar.iglesias@gmail.com \
--cc=michael@walle.cc \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.