qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, qemu-stable@nongnu.org, stefanha@redhat.com,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH 6/7] Revert "qdev: Use qdev_get_device_class() for -device <type>, help"
Date: Fri, 18 Sep 2015 10:13:49 -0600	[thread overview]
Message-ID: <55FC383D.3020000@redhat.com> (raw)
In-Reply-To: <1442577640-11612-7-git-send-email-armbru@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2173 bytes --]

On 09/18/2015 06:00 AM, Markus Armbruster wrote:
> This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6.
> 
> The reverted commit changed qdev_device_help() to reject abstract
> devices and devices that have cannot_instantiate_with_device_add_yet
> set, to fix crash bugs like -device x86_64-cpu,help.
> 
> Rejecting abstract devices makes sense: they're purely internal, and
> the implementation of the help feature can't cope with them.
> 
> Rejecting non-pluggable devices makes less sense: even though you
> can't use them with -device, the help may still be useful elsewhere,
> for instance with -global.  This is a regression: -device FOO,help
> used to help even for FOO that aren't pluggable.
> 
> The previous two commits fixed the crash bug at a lower layer, so
> reverting this one is now safe.  Fixes the -device FOO,help
> regression, except for the broken devices marked
> cannot_even_create_with_object_new_yet.  For those, the error message
> is improved.
> 
> Example of a device where the regression is fixed:
> 
>     $ qemu-system-x86_64 -device PIIX4_PM,help
>     PIIX4_PM.command_serr_enable=bool (on/off)
>     PIIX4_PM.multifunction=bool (on/off)
>     PIIX4_PM.rombar=uint32
>     PIIX4_PM.romfile=str
>     PIIX4_PM.addr=int32 (Slot and optional function number, example: 06.0 or 06)
>     PIIX4_PM.memory-hotplug-support=bool
>     PIIX4_PM.acpi-pci-hotplug-with-bridge-support=bool
>     PIIX4_PM.s4_val=uint8
>     PIIX4_PM.disable_s4=uint8
>     PIIX4_PM.disable_s3=uint8
>     PIIX4_PM.smb_io_base=uint32
> 
> Example of a device where it isn't fixed:
> 
>     $ qemu-system-x86_64 -device host-x86_64-cpu,help
>     Can't list properties of device 'host-x86_64-cpu'
> 
> Both failed with "Parameter 'driver' expects pluggable device type"
> before.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qdev-monitor.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-09-18 16:13 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 12:00 [Qemu-devel] [PATCH 0/7] Fix device introspection regressions Markus Armbruster
2015-09-18 12:00 ` [Qemu-devel] [PATCH 1/7] libqtest: Clean up unused QTestState member sigact_old Markus Armbruster
2015-09-18 15:36   ` Eric Blake
2015-09-18 12:00 ` [Qemu-devel] [PATCH 2/7] libqtest: New hmp() & friends Markus Armbruster
2015-09-18 15:47   ` Eric Blake
2015-09-21  5:59     ` Markus Armbruster
2015-09-18 12:00 ` [Qemu-devel] [PATCH 3/7] device-introspect-test: New, covering device introspection Markus Armbruster
2015-09-18 15:55   ` Eric Blake
2015-09-21  6:05     ` Markus Armbruster
2015-09-18 12:00 ` [Qemu-devel] [PATCH 4/7] qmp: Fix device-list-properties not to crash for abstract device Markus Armbruster
2015-09-18 15:58   ` Eric Blake
2015-09-18 12:00 ` [Qemu-devel] [PATCH 5/7] qdev: Protect device-list-properties against broken devices Markus Armbruster
2015-09-18 12:38   ` Christian Borntraeger
2015-09-21  8:30     ` David Hildenbrand
2015-09-21 15:38       ` Eduardo Habkost
2015-09-22  8:02         ` David Hildenbrand
2015-09-22  8:07         ` Markus Armbruster
2015-09-18 16:09   ` Eric Blake
2015-09-21  6:08     ` Markus Armbruster
2015-09-18 16:36   ` Eduardo Habkost
2015-09-21  6:09     ` Markus Armbruster
2015-09-21 15:13       ` Eduardo Habkost
2015-09-18 18:42   ` Thomas Huth
2015-09-18 19:32     ` Eduardo Habkost
2015-09-21  6:14       ` Markus Armbruster
2015-09-21 15:20         ` Eduardo Habkost
2015-09-21 15:48         ` Thomas Huth
2015-09-21 16:39           ` Markus Armbruster
2015-09-21 17:22             ` Thomas Huth
2015-09-21 18:19               ` Eduardo Habkost
2015-09-18 12:00 ` [Qemu-devel] [PATCH 6/7] Revert "qdev: Use qdev_get_device_class() for -device <type>, help" Markus Armbruster
2015-09-18 16:13   ` Eric Blake [this message]
2015-09-18 12:00 ` [Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run Markus Armbruster
2015-09-18 12:53   ` Andreas Färber
2015-09-18 14:24     ` Markus Armbruster
2015-09-18 15:28       ` Andreas Färber
2015-09-21  6:15         ` Markus Armbruster
2015-09-23 13:57         ` 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=55FC383D.3020000@redhat.com \
    --to=eblake@redhat.com \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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).