qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/7] Revert "qdev: Use qdev_get_device_class() f


From: Eric Blake
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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: address@hidden
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  qdev-monitor.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]