Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-29 Thread Igor Mammedov
On Thu, 29 Oct 2020 08:56:34 -0400 Eduardo Habkost wrote: > On Wed, Oct 28, 2020 at 04:22:40PM +0100, Paolo Bonzini wrote: > > On 23/10/20 17:33, Igor Mammedov wrote: > > > On Wed, 21 Oct 2020 09:30:41 -0400 > > > Eduardo Habkost wrote: > > > > > >> On Wed, Oct 21, 2020 at 02:24:08PM +0200,

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-29 Thread Eduardo Habkost
On Wed, Oct 28, 2020 at 04:22:40PM +0100, Paolo Bonzini wrote: > On 23/10/20 17:33, Igor Mammedov wrote: > > On Wed, 21 Oct 2020 09:30:41 -0400 > > Eduardo Habkost wrote: > > > >> On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: > >>> On Fri, 9 Oct 2020 12:01:13 -0400 > >>> Eduardo

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-28 Thread Igor Mammedov
On Wed, 28 Oct 2020 16:22:40 +0100 Paolo Bonzini wrote: > On 23/10/20 17:33, Igor Mammedov wrote: > > On Wed, 21 Oct 2020 09:30:41 -0400 > > Eduardo Habkost wrote: > > > >> On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: > >>> On Fri, 9 Oct 2020 12:01:13 -0400 > >>> Eduardo

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-28 Thread Paolo Bonzini
On 23/10/20 17:33, Igor Mammedov wrote: > On Wed, 21 Oct 2020 09:30:41 -0400 > Eduardo Habkost wrote: > >> On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: >>> On Fri, 9 Oct 2020 12:01:13 -0400 >>> Eduardo Habkost wrote: >>> The existing object_class_property_add_uint*_ptr

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-27 Thread Eduardo Habkost
On Fri, Oct 23, 2020 at 05:33:14PM +0200, Igor Mammedov wrote: > On Wed, 21 Oct 2020 09:30:41 -0400 > Eduardo Habkost wrote: [...] > > I don't love object*_property_add_*_ptr() either. I consider the > > qdev property API better. But we need a reasonable alternative, > > because the qdev API can

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-23 Thread Igor Mammedov
On Wed, 21 Oct 2020 09:30:41 -0400 Eduardo Habkost wrote: > On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: > > On Fri, 9 Oct 2020 12:01:13 -0400 > > Eduardo Habkost wrote: > > > > > The existing object_class_property_add_uint*_ptr() functions are > > > not very useful, becaus

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-22 Thread Eduardo Habkost
On Thu, Oct 22, 2020 at 07:06:58AM +0200, Markus Armbruster wrote: [...] > > I don't love object*_property_add_*_ptr() either. I consider the > > qdev property API better. But we need a reasonable alternative, > > because the qdev API can't be used by non-device objects yet. > > Emphasis on *yet

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-21 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: >> On Fri, 9 Oct 2020 12:01:13 -0400 >> Eduardo Habkost wrote: >> >> > The existing object_class_property_add_uint*_ptr() functions are >> > not very useful, because they need a pointer to the property >>

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-21 Thread Eduardo Habkost
On Wed, Oct 21, 2020 at 02:24:08PM +0200, Igor Mammedov wrote: > On Fri, 9 Oct 2020 12:01:13 -0400 > Eduardo Habkost wrote: > > > The existing object_class_property_add_uint*_ptr() functions are > > not very useful, because they need a pointer to the property > > value, which can't really be pro

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-21 Thread Igor Mammedov
On Fri, 9 Oct 2020 12:01:13 -0400 Eduardo Habkost wrote: > The existing object_class_property_add_uint*_ptr() functions are > not very useful, because they need a pointer to the property > value, which can't really be provided before the object is > created. > > Replace the pointer parameter in

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-09 Thread Eduardo Habkost
On Fri, Oct 09, 2020 at 12:24:19PM -0500, Eric Blake wrote: > On 10/9/20 11:01 AM, Eduardo Habkost wrote: > > The existing object_class_property_add_uint*_ptr() functions are > > not very useful, because they need a pointer to the property > > value, which can't really be provided before the object

Re: [PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-09 Thread Eric Blake
On 10/9/20 11:01 AM, Eduardo Habkost wrote: > The existing object_class_property_add_uint*_ptr() functions are > not very useful, because they need a pointer to the property > value, which can't really be provided before the object is > created. > > Replace the pointer parameter in those functions

[PATCH 03/12] qom: Make object_class_property_add_uint*_ptr() get offset

2020-10-09 Thread Eduardo Habkost
The existing object_class_property_add_uint*_ptr() functions are not very useful, because they need a pointer to the property value, which can't really be provided before the object is created. Replace the pointer parameter in those functions with a `ptrdiff_t offset` parameter. Include a uint8 c