qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: peter.maydell@linaro.org, kevin@koconnor.net,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] sdhci: Make device "sdhci-pci" unavailable with -device again
Date: Fri, 4 Dec 2015 16:35:27 +0100	[thread overview]
Message-ID: <5661B2BF.8010607@redhat.com> (raw)
In-Reply-To: <87vb8edzu7.fsf@blackfin.pond.sub.org>



On 04/12/2015 15:59, Markus Armbruster wrote:
> My comment makes two claims: "wrong" and "dangerous".
> 
> First "dangerous".  You're making a non-local argument why it's not
> actually broken, and you might be right.  If you are, it's just fragile,
> not broken.  We could debate whether to call it dangerous or fragile,
> but I don't really care.  If you'd prefer to call it fragile, let's
> update the comment and the commit message.

Indeed I didn't claim it wasn't dangerous. :)  Still, that doesn't
justify disabling device-add.

> Now "wrong".  The qdev property belongs to the SD card (the thing we're
> initializing here), not the SD controller sdhci-pci.  Unfortunately, the
> SD card still hasn't been qdevified.  But if we permit tacking the
> property to the controller now, we're stuck with having it there
> forever.  No harm if the SD card never becomes an object in its own
> right.  But if it does, it'll end up in the same unhappy place as
> usb-storage, where we hackishly jump through hoops to somehow transfer
> the backend from the controller to the SCSI device.  This has caused so
> much trouble that we replaced the whole thing by usb-bot.  I'm not keen
> on repeating the experience.

That's a different kind of wrong, unrelated to blk_attach_dev.

I cannot say that it will never happen, and I'm not keen on having
another usb-storage.  That said, we have another example of automagic
property setting on children, which is virtio-blk-pci.  That one works
well, and I wonder whether lessons taught by virtio-blk-pci could be
applied to cleanup usb-storage.

But perfect is the enemy of good.  sdhci-pci is a useful device for
testing, and I don't see the point of disabling it with no qdevification
in sight for the SD card.

FWIW, I don't think the SD card will be qdevified because it doesn't
need a bus.  A host controller controls exactly one SD card, the SSI
bridge is also for exactly one SD card, etc.  So there's not much to
gain from qdevification of the card itself.  There would be a gain from
qdevification of the OMAP and StrongARM controllers (i.e. drive_get_next
is moved to the board, the problematic blk_attach_dev can disappear, etc.).

Paolo

      reply	other threads:[~2015-12-04 15:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 14:07 [Qemu-devel] [PATCH] sdhci: Make device "sdhci-pci" unavailable with -device again Markus Armbruster
2015-12-04 14:33 ` Paolo Bonzini
2015-12-04 14:59   ` Markus Armbruster
2015-12-04 15:35     ` Paolo Bonzini [this message]

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=5661B2BF.8010607@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).