From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, pbonzini@redhat.com,
peter.crosthwaite@xilinx.com, michael@walle.cc,
edgar.iglesias@gmail.com
Subject: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse
Date: Mon, 23 Mar 2015 20:09:47 +0100 [thread overview]
Message-ID: <1427137790-27265-1-git-send-email-armbru@redhat.com> (raw)
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
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(+)
--
1.9.3
next reply other threads:[~2015-03-23 19:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 19:09 Markus Armbruster [this message]
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
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=1427137790-27265-1-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).