From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Alexander Graf <agraf@suse.de>,
Anthony Liguori <aliguori@amazon.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qdev: Keep global allocation counter per bus
Date: Thu, 05 Dec 2013 12:38:53 +0100 [thread overview]
Message-ID: <52A065CD.8060301@redhat.com> (raw)
In-Reply-To: <874n6ny25p.fsf@blackfin.pond.sub.org>
Il 05/12/2013 12:20, Markus Armbruster ha scritto:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> Il 05/12/2013 10:44, Markus Armbruster ha scritto:
>>> Incompatible change: device ide-cd moved to a different controller.
>>
>> Yes, it should be stated in the commit message but it's expected as
>> discussed yesterday on IRC. The solution is not to use "-device" (which
>> was broken) if you care about backwards compatibility; use "-drive if=ide".
>
> -device is broken for the *other* controller. It works just fine for
> this one.
It is broken in that "-device bus=ide.0" would access the second
controller, the one corresponding to "-drive if=ide,bus=1", or -hdc/-hdd.
>>> Great fun when you try to live migrate across your patch.
>>>
>>> I'd expect isapc to have the same issue once its crash bug is fixed.
>>>
>>> First law of QEMU hacking: if your patch looks simple, it's probably
>>> wrong ;)
>>
>> Yes, the question is how wrong and how the wrong balances the right.
>
> Is it really too much bother to change the ide.0 name for the
> controllers that bus=ide.0 doesn't use, and keep it for the one it does
> use?
Yes, for two reasons:
(1) practical reason, the one mentioned above: it would mean that
"-device bus=ide.0" corresponds to "-drive if=ide,bus=1" and similarly
for ide.1/bus=0. So we would make the cure worse than the disease, in
my opinion. This IMO is a pretty strong sign that the
backwards-compatibility problem doesn't exist and no one ever used
"-device" for built-in devices on anything other than pc IDE and pseries
SCSI.
(2) technical reason: the two are inverted because bus names currently
have a "last wins" policy. The policy is implemented by using
QTAILQ_INSERT_HEAD in bus_add_child. So it is not possible to know the
correct bus names unless you know how many buses you will have (e.g. for
3 buses you'd start giving numbers from ide.2 and go down from there).
And implementing this would probably be really really ugly.
> If yes, the incompatible change needs to be documented much more clearly
> in the commit message.
And in the release notes.
Paolo
next prev parent reply other threads:[~2013-12-05 11:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 20:24 [Qemu-devel] [PATCH] qdev: Keep global allocation counter per bus Alexander Graf
2013-12-05 8:58 ` Paolo Bonzini
2013-12-05 9:44 ` Markus Armbruster
2013-12-05 10:33 ` Paolo Bonzini
2013-12-05 11:20 ` Markus Armbruster
2013-12-05 11:38 ` Paolo Bonzini [this message]
2013-12-05 10:23 ` Markus Armbruster
-- strict thread matches above, loose matches on Subject: below --
2014-02-03 19:36 Alexander Graf
2014-02-04 10:33 ` Markus Armbruster
2014-02-04 11:48 ` Paolo Bonzini
2014-02-04 12:14 ` Markus Armbruster
2014-02-05 17:25 ` Paolo Bonzini
2014-02-06 14:41 ` Markus Armbruster
2014-02-06 14:41 ` Alexander Graf
2014-02-06 15:11 ` 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=52A065CD.8060301@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--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).