Re: Purpose of QOM properties registered at realize time?

2020-10-12 Thread Mark Cave-Ayland
On 06/10/2020 23:06, Eduardo Habkost wrote: > Hi, > > While trying to understand how QOM properties are used in QEMU, I > stumbled upon multiple cases where alias properties are added at > realize time. > > Now, I don't understand why those properties exist. As the > properties are added at

Re: Purpose of QOM properties registered at realize time?

2020-10-08 Thread Peter Maydell
On Thu, 8 Oct 2020 at 16:15, Eduardo Habkost wrote: > > On Thu, Oct 08, 2020 at 11:45:08AM +0200, Markus Armbruster wrote: > > A first class static array property, where the size of the array is part > > of the value could perhaps cover this case. > > This is an interesting idea, I think we

Re: Purpose of QOM properties registered at realize time?

2020-10-08 Thread Eduardo Habkost
On Thu, Oct 08, 2020 at 11:45:08AM +0200, Markus Armbruster wrote: > A first class static array property, where the size of the array is part > of the value could perhaps cover this case. This is an interesting idea, I think we should explore that. qdev_pass_gpios() would become unnecessary and

Re: Purpose of QOM properties registered at realize time?

2020-10-08 Thread Peter Maydell
On Thu, 8 Oct 2020 at 10:45, Markus Armbruster wrote: > In real hardware, the number of GPIOs and such is fixed. That depends on your point of view. Often this kind of parameter is configurable in the hardware also, as a parameter to the RTL, so different boards/SoCs using the same device may

Re: Purpose of QOM properties registered at realize time?

2020-10-08 Thread Markus Armbruster
Peter Maydell writes: [...] > Possibly one could move the code in the devices which creates the > GPIO array/sdbus/whatever so that it does so in instance_init > rather than in realize, and then more of these "alias a connection > through" bits of code could also move to instance_init. But there

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Peter Maydell
On Wed, 7 Oct 2020 at 16:51, Eduardo Habkost wrote: > Right now, I only want to know if the QOM property is part of a > supported stable external interface. For the properties > registered at realize time, the answer seems to be "no". I don't think that's inherently the case. But most QOM

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Eduardo Habkost
On Wed, Oct 07, 2020 at 03:28:52PM +0100, Peter Maydell wrote: > On Tue, 6 Oct 2020 at 23:06, Eduardo Habkost wrote: > > While trying to understand how QOM properties are used in QEMU, I > > stumbled upon multiple cases where alias properties are added at > > realize time. > > > > Now, I don't

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Eduardo Habkost
On Wed, Oct 07, 2020 at 04:54:31PM +0200, Paolo Bonzini wrote: > On 07/10/20 16:27, Eduardo Habkost wrote: > >> It is always wrapped, but (as far as I recall, because I have never > >> worked with GPIOs) they are intentionally QOM properties and not just as > >> an implementation detail. It's

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Paolo Bonzini
On 07/10/20 16:27, Eduardo Habkost wrote: >> It is always wrapped, but (as far as I recall, because I have never >> worked with GPIOs) they are intentionally QOM properties and not just as >> an implementation detail. It's meant to be accessible to the user if >> only through qom-get/qom-set. > >

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Peter Maydell
On Tue, 6 Oct 2020 at 23:06, Eduardo Habkost wrote: > While trying to understand how QOM properties are used in QEMU, I > stumbled upon multiple cases where alias properties are added at > realize time. > > Now, I don't understand why those properties exist. As the > properties are added at

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Eduardo Habkost
On Wed, Oct 07, 2020 at 03:55:58PM +0200, Paolo Bonzini wrote: > On 07/10/20 15:02, Eduardo Habkost wrote: > > On Wed, Oct 07, 2020 at 02:04:23PM +0200, Paolo Bonzini wrote: > >> On 07/10/20 00:06, Eduardo Habkost wrote: > >>> Hi, > >>> > >>> While trying to understand how QOM properties are used

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Paolo Bonzini
On 07/10/20 15:02, Eduardo Habkost wrote: > On Wed, Oct 07, 2020 at 02:04:23PM +0200, Paolo Bonzini wrote: >> On 07/10/20 00:06, Eduardo Habkost wrote: >>> Hi, >>> >>> While trying to understand how QOM properties are used in QEMU, I >>> stumbled upon multiple cases where alias properties are

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Eduardo Habkost
On Wed, Oct 07, 2020 at 02:04:23PM +0200, Paolo Bonzini wrote: > On 07/10/20 00:06, Eduardo Habkost wrote: > > Hi, > > > > While trying to understand how QOM properties are used in QEMU, I > > stumbled upon multiple cases where alias properties are added at > > realize time. > > > > Now, I don't

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread Paolo Bonzini
On 07/10/20 00:06, Eduardo Habkost wrote: > Hi, > > While trying to understand how QOM properties are used in QEMU, I > stumbled upon multiple cases where alias properties are added at > realize time. > > Now, I don't understand why those properties exist. As the > properties are added at

Re: Purpose of QOM properties registered at realize time?

2020-10-07 Thread BALATON Zoltan via
On Tue, 6 Oct 2020, Eduardo Habkost wrote: Hi, While trying to understand how QOM properties are used in QEMU, I stumbled upon multiple cases where alias properties are added at realize time. Now, I don't understand why those properties exist. As the properties are added at realize time, I

Purpose of QOM properties registered at realize time?

2020-10-06 Thread Eduardo Habkost
Hi, While trying to understand how QOM properties are used in QEMU, I stumbled upon multiple cases where alias properties are added at realize time. Now, I don't understand why those properties exist. As the properties are added at realize time, I assume they aren't supposed to be touched by