qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 1/4] qdev-properties: alias all object class properties


From: Stefan Hajnoczi
Subject: Re: [PATCH v4 1/4] qdev-properties: alias all object class properties
Date: Thu, 21 Dec 2023 10:47:43 -0500

On Thu, Dec 21, 2023 at 01:39:48PM +0100, Kevin Wolf wrote:
> Am 20.12.2023 um 14:47 hat Stefan Hajnoczi geschrieben:
> > qdev_alias_all_properties() aliases a DeviceState's qdev properties onto
> > an Object. This is used for VirtioPCIProxy types so that --device
> > virtio-blk-pci has properties of its embedded --device virtio-blk-device
> > object.
> > 
> > Currently this function is implemented using qdev properties. Change the
> > function to use QOM object class properties instead. This works because
> > qdev properties create QOM object class properties, but it also catches
> > any QOM object class-only properties that have no qdev properties.
> > 
> > This change ensures that properties of devices are shown with --device
> > foo,\? even if they are QOM object class properties.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> Reviewed-by: Kevin Wolf <kwolf@redhat.com>
> 
> We should also update the comment to refer to properties in general
> rather than just qdev properties. I can squash in the following hunk.

Please go ahead. Thank you!

Stefan

> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
> index 25743a29a0..09aa04ca1e 100644
> --- a/include/hw/qdev-properties.h
> +++ b/include/hw/qdev-properties.h
> @@ -230,8 +230,8 @@ void qdev_property_add_static(DeviceState *dev, Property 
> *prop);
>   * @target: Device which has properties to be aliased
>   * @source: Object to add alias properties to
>   *
> - * Add alias properties to the @source object for all qdev properties on
> - * the @target DeviceState.
> + * Add alias properties to the @source object for all properties on the 
> @target
> + * DeviceState.
>   *
>   * This is useful when @target is an internal implementation object
>   * owned by @source, and you want to expose all the properties of that
> 

Attachment: signature.asc
Description: PGP signature


reply via email to

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