From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines
Date: Thu, 12 Jul 2018 15:19:50 +0200 [thread overview]
Message-ID: <87efg8lhft.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA-RwRdgr-_YVwEWf0pSNQj_rdEmX_OZf5HFmNoR8LbthA@mail.gmail.com> (Peter Maydell's message of "Thu, 12 Jul 2018 13:55:49 +0100")
Peter Maydell <peter.maydell@linaro.org> writes:
> On 12 July 2018 at 13:06, Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>>> On 11 July 2018 at 17:12, Eduardo Habkost <ehabkost@redhat.com> wrote:
>>>> On Wed, Jul 11, 2018 at 09:21:48AM +0200, Thomas Huth wrote:
>>>>> Hm, ok, so how to continue here now? Shall we at least mark the
>>>>> bcm2836/7 devices with user_creatable=false, so that users can not crash
>>>>> their QEMU so easily with device_add? The problem with introspection via
>>>>> device-list-properties would still continue to exist, but I think that's
>>>>> less likely used in practice... otherwise we could still move the
>>>>> qdev_set_parent_bus() calls to the realize() function instead, and just
>>>>> add a big fat FIXME comment in front of the code block, so that we
>>>>> remember to clean that up one day...
>>>>
>>>> Crashing device-list-properties should be a blocker bug, IMO.
>>
>> Seconded.
>>
>>>> Moving to realize is not the best solution, but I would prefer to
>>>> do that in 3.0 instead of leaving the device-list-properties
>>>> crash unfixed.
>>>
>>> I would like to see the crash fixed too. But I'd like to
>>> see it fixed:
>>> (a) by having clear documentation about how the QOM
>>> system works, what you should do in init and what you
>>> should do in realize, when and why you need to manually
>>> parent objects, etc
>>> (b) as far as possible making our APIs for doing this
>>> easy to use correctly and difficult to use wrongly. At
>>> the moment we have APIs that are far too easy to misuse,
>>> which means we will continue to get bugs like this and spend
>>> a lot of time on one-off fixes for them.
>>>
>>> In particular I don't understand why we need to manually
>>> parent these objects at all.
>>
>> I want both (a) and (b) as badly as anyone, but we should not hold any
>> particular crash bug hostage to get them.
>
> Without at least (a) I can't review this patch or any other
> patch that fixes this kind of crash bug...
Fair point. But if Paolo can, and vouches for a fix, then we shouldn't
hold the fix hostage.
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines
Date: Thu, 12 Jul 2018 15:19:50 +0200 [thread overview]
Message-ID: <87efg8lhft.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA-RwRdgr-_YVwEWf0pSNQj_rdEmX_OZf5HFmNoR8LbthA@mail.gmail.com> (Peter Maydell's message of "Thu, 12 Jul 2018 13:55:49 +0100")
Peter Maydell <peter.maydell@linaro.org> writes:
> On 12 July 2018 at 13:06, Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>
>>> On 11 July 2018 at 17:12, Eduardo Habkost <ehabkost@redhat.com> wrote:
>>>> On Wed, Jul 11, 2018 at 09:21:48AM +0200, Thomas Huth wrote:
>>>>> Hm, ok, so how to continue here now? Shall we at least mark the
>>>>> bcm2836/7 devices with user_creatable=false, so that users can not crash
>>>>> their QEMU so easily with device_add? The problem with introspection via
>>>>> device-list-properties would still continue to exist, but I think that's
>>>>> less likely used in practice... otherwise we could still move the
>>>>> qdev_set_parent_bus() calls to the realize() function instead, and just
>>>>> add a big fat FIXME comment in front of the code block, so that we
>>>>> remember to clean that up one day...
>>>>
>>>> Crashing device-list-properties should be a blocker bug, IMO.
>>
>> Seconded.
>>
>>>> Moving to realize is not the best solution, but I would prefer to
>>>> do that in 3.0 instead of leaving the device-list-properties
>>>> crash unfixed.
>>>
>>> I would like to see the crash fixed too. But I'd like to
>>> see it fixed:
>>> (a) by having clear documentation about how the QOM
>>> system works, what you should do in init and what you
>>> should do in realize, when and why you need to manually
>>> parent objects, etc
>>> (b) as far as possible making our APIs for doing this
>>> easy to use correctly and difficult to use wrongly. At
>>> the moment we have APIs that are far too easy to misuse,
>>> which means we will continue to get bugs like this and spend
>>> a lot of time on one-off fixes for them.
>>>
>>> In particular I don't understand why we need to manually
>>> parent these objects at all.
>>
>> I want both (a) and (b) as badly as anyone, but we should not hold any
>> particular crash bug hostage to get them.
>
> Without at least (a) I can't review this patch or any other
> patch that fixes this kind of crash bug...
Fair point. But if Paolo can, and vouches for a fix, then we shouldn't
hold the fix hostage.
next prev parent reply other threads:[~2018-07-12 13:20 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-09 21:03 [Qemu-arm] [PATCH] hw/arm/bcm283x: Fix crash with device_add bcm2837 on unsupported machines Thomas Huth
2018-07-09 21:03 ` [Qemu-devel] " Thomas Huth
2018-07-09 21:31 ` [Qemu-arm] " Eduardo Habkost
2018-07-09 21:31 ` [Qemu-devel] " Eduardo Habkost
2018-07-09 21:36 ` [Qemu-arm] " Thomas Huth
2018-07-09 21:36 ` [Qemu-devel] " Thomas Huth
2018-07-09 21:42 ` [Qemu-arm] " Peter Maydell
2018-07-09 21:42 ` [Qemu-devel] " Peter Maydell
2018-07-09 22:03 ` [Qemu-arm] " Thomas Huth
2018-07-09 22:03 ` [Qemu-devel] " Thomas Huth
2018-07-10 6:50 ` [Qemu-arm] " Peter Maydell
2018-07-10 6:50 ` [Qemu-devel] " Peter Maydell
2018-07-11 7:21 ` [Qemu-arm] " Thomas Huth
2018-07-11 7:21 ` [Qemu-devel] " Thomas Huth
2018-07-11 16:12 ` [Qemu-arm] " Eduardo Habkost
2018-07-11 16:12 ` [Qemu-devel] " Eduardo Habkost
2018-07-11 17:15 ` [Qemu-arm] " Peter Maydell
2018-07-11 17:15 ` [Qemu-devel] " Peter Maydell
2018-07-12 12:06 ` [Qemu-arm] " Markus Armbruster
2018-07-12 12:06 ` Markus Armbruster
2018-07-12 12:55 ` [Qemu-arm] " Peter Maydell
2018-07-12 12:55 ` Peter Maydell
2018-07-12 13:19 ` Markus Armbruster [this message]
2018-07-12 13:19 ` Markus Armbruster
2018-07-12 15:25 ` [Qemu-arm] " Thomas Huth
2018-07-12 15:25 ` Thomas Huth
2018-07-12 16:16 ` [Qemu-arm] " Markus Armbruster
2018-07-12 16:16 ` Markus Armbruster
2018-07-12 16:22 ` [Qemu-arm] " Peter Maydell
2018-07-12 16:22 ` Peter Maydell
2018-07-12 16:32 ` Thomas Huth
2018-07-16 6:41 ` [Qemu-arm] " Markus Armbruster
2018-07-16 6:41 ` Markus Armbruster
2018-07-11 17:21 ` [Qemu-arm] " Paolo Bonzini
2018-07-11 17:21 ` [Qemu-devel] " Paolo Bonzini
2018-07-11 19:04 ` [Qemu-arm] " Thomas Huth
2018-07-11 19:04 ` [Qemu-devel] " Thomas Huth
2018-07-11 19:59 ` [Qemu-arm] " Eduardo Habkost
2018-07-11 19:59 ` [Qemu-devel] " Eduardo Habkost
2018-07-12 8:04 ` [Qemu-arm] " Paolo Bonzini
2018-07-12 8:04 ` Paolo Bonzini
2018-07-12 12:04 ` [Qemu-arm] " Markus Armbruster
2018-07-12 12:04 ` Markus Armbruster
2018-07-11 17:20 ` [Qemu-arm] " Paolo Bonzini
2018-07-11 17:20 ` [Qemu-devel] " Paolo Bonzini
2018-07-11 18:30 ` [Qemu-arm] " Eduardo Habkost
2018-07-11 18:30 ` [Qemu-devel] " Eduardo Habkost
2018-07-11 20:16 ` [Qemu-arm] " Paolo Bonzini
2018-07-11 20:16 ` [Qemu-devel] " Paolo Bonzini
2018-07-11 20:23 ` [Qemu-arm] " Eduardo Habkost
2018-07-11 20:23 ` [Qemu-devel] " Eduardo Habkost
2018-07-12 8:05 ` Paolo Bonzini
2018-07-12 18:04 ` [Qemu-arm] " Eduardo Habkost
2018-07-12 18:04 ` Eduardo Habkost
2018-07-16 6:43 ` [Qemu-arm] " Markus Armbruster
2018-07-16 6:43 ` Markus Armbruster
2018-07-16 14:25 ` [Qemu-arm] " Eduardo Habkost
2018-07-16 14:25 ` Eduardo Habkost
2018-07-11 18:43 ` [Qemu-arm] " Thomas Huth
2018-07-11 18:43 ` [Qemu-devel] " Thomas Huth
2018-07-11 20:15 ` [Qemu-arm] " Paolo Bonzini
2018-07-11 20:15 ` [Qemu-devel] " Paolo Bonzini
2018-07-12 5:57 ` [Qemu-arm] " Thomas Huth
2018-07-12 5:57 ` [Qemu-devel] " Thomas Huth
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=87efg8lhft.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@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 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.