Received: from eggs.gnu.org ([2001:4830:134:3::10]:55720) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf8cZ-0003vx-Vu for qemu-devel@nongnu.org; Thu, 24 Sep 2015 11:39:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf8cZ-0007yS-2C for qemu-devel@nongnu.org; Thu, 24 Sep 2015 11:39:43 -0400 Date: Thu, 24 Sep 2015 12:39:40 -0300 From: Eduardo Habkost Message-ID: <20150924153940.GB30243@thinpad.lan.raisama.net> References: <1443017389-7869-1-git-send-email-armbru@redhat.com> <1443017389-7869-8-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443017389-7869-8-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 7/7] Revert "qdev: Use qdev_get_device_class() for -device , help" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: thuth@redhat.com, qemu-stable@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com, afaerber@suse.de On Wed, Sep 23, 2015 at 04:09:49PM +0200, 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 > Reviewed-by: Eric Blake Reviewed-by: Eduardo Habkost -- Eduardo