All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Markus Armbruster <armbru@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org, "Vassili Karpov (malc)" <av1474@comtv.ru>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Liguori <aliguori@amazon.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PULL v2 01/24] qdev: Replace no_user by cannot_instantiate_with_device_add_yet
Date: Tue, 07 Jan 2014 12:56:35 +0100	[thread overview]
Message-ID: <52CBEB73.9050906@suse.de> (raw)
In-Reply-To: <87a9f82iid.fsf@blackfin.pond.sub.org>

Am 07.01.2014 11:28, schrieb Markus Armbruster:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
> 
>> On Tue, Dec 24, 2013 at 06:04:12PM +0100, Andreas Färber wrote:
>>> From: Markus Armbruster <armbru@redhat.com>
>>>
>>> In an ideal world, machines can be built by wiring devices together
>>> with configuration, not code.  Unfortunately, that's not the world we
>>> live in right now.  We still have quite a few devices that need to be
>>> wired up by code.  If you try to device_add such a device, it'll fail
>>> in sometimes mysterious ways.  If you're lucky, you get an
>>> unmysterious immediate crash.
>>>
>>> To protect users from such badness, DeviceClass member no_user used to
>>> make device models unavailable with -device / device_add, but that
>>> regressed in commit 18b6dad.  The device model is still omitted from
>>> help, but is available anyway.
>>>
>>> Attempts to fix the regression have been rejected with the argument
>>> that the purpose of no_user isn't clear, and it's prone to misuse.
>>>
>>> This commit clarifies no_user's purpose.  Anthony suggested to rename
>>> it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
>>> I shorten somewhat to keep checkpatch happy.  While there, make it
>>> bool.
>>>
>>> Every use of cannot_instantiate_with_device_add_yet gets a FIXME
>>> comment asking for rationale.  The next few commits will clean them
>>> all up, either by providing a rationale, or by getting rid of the use.
>>>
>>> With that done, the regression fix is hopefully acceptable.
>>>
>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>
>>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>
>> Sorry about not commenting on this earlier.
>> It looks like a bunch of devices will have this flag
>> (whatever we call it) forever.
> 
> Anthony has argued otherwise.
> 
>> If so, _yet seems confusing, should be just
>> cannot_instantiate_with_device_add.
> 
> I don't care.  In fact, I was perfectly happy with 'no_user'.  I renamed
> it (and added additional value) just to make my "protect users from
> device_add that's known not to work" regression palatable for Anthony.
> I recognize the result is an improvement, so Anthony wasn't entirely
> wrong ;)
> 
>> Doesn't have to block this patchset, we can
>> rename it all in one patch easily.
> 
> Thanks :)

Sorry for not explicitly having responded to that yet. In short, I
regarded this patchset as an improvement, not blocking further
improvements on top. It addresses feedback that blocked an earlier,
simpler no_user-checking solution in qdev-monitor.c.

Let's take further discussions off this pull request (that's still
waiting to be processed) and back to where it last sparked!

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-01-07 11:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-24 17:04 [Qemu-devel] [PULL v2 00/24] QOM devices patch queue 2013-12-24 Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 01/24] qdev: Replace no_user by cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 19:43   ` Michael S. Tsirkin
2014-01-07 10:28     ` Markus Armbruster
2014-01-07 11:56       ` Andreas Färber [this message]
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 02/24] sysbus: Set cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 03/24] cpu: Document why cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 04/24] apic: " Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 05/24] pci-host: Consistently set cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 06/24] ich9: Document why cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 07/24] piix3 piix4: Clean up use of cannot_instantiate_with_device_add_yet Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 08/24] vt82c686: " Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 09/24] isa: " Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 10/24] qdev: Do not let the user try to device_add when it cannot work Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 11/24] qdev-monitor: Avoid device_add crashing on non-device driver name Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 12/24] hw: cannot_instantiate_with_device_add_yet due to pointer props Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 13/24] qdev: Document that pointer properties kill device_add Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 14/24] qom: Split out object and class caches Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 15/24] qom: Do not register interface "types" in the type table and fix names Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 16/24] tests: Test QOM interface casting Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 17/24] qom: Detect bad reentrance during object_class_foreach() Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 18/24] qdev: Drop misleading qbus_free() function Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 19/24] apic: Cleanup for QOM'ification Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 20/24] apic: QOM'ify APIC Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 21/24] icc_bus: QOM'ify ICC Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 22/24] ioapic: Cleanup for QOM'ification Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 23/24] ioapic: QOM'ify ioapic Andreas Färber
2013-12-24 17:04 ` [Qemu-devel] [PULL v2 24/24] qdev-monitor: Improve error message for -device nonexistant Andreas Färber
2014-02-04 15:56 ` [Qemu-devel] [PULL v2 00/24] QOM devices patch queue 2013-12-24 Andreas Färber
2014-02-04 16:13   ` Michael S. Tsirkin
2014-02-04 17:40   ` Michael S. Tsirkin
2014-02-04 18:07   ` Michael S. Tsirkin

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=52CBEB73.9050906@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=av1474@comtv.ru \
    --cc=cornelia.huck@de.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    --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 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.