Il 06/06/2014 15:36, Peter Crosthwaite ha scritto:
However, I'd rather have the concept bake for a bit by starting with
read-only properties.

The just a matter of pulling our the setters?

Yes.  You can leave in all the preparatory refactoring.

I guess it can be done
but I don't fully understand the motivation.

I'm not sure what the interactions should be between the setters and, for example, the "realized" property. In addition, some memory regions (for example PCI BARs) are meant to be moved around by the guest, not the host.

By comparison, with getters only not many things can go wrong.

 I think there are some concepts in the "container"
property that can be generalized.

Can you elaborate this a little more?

Basically the container property acts as a kind of "backdoor" to express many:1 relations (which are a bit ugly to express with the current QOM property model). If object X is on the 1 side and object Y is on the "many" side, you then write the path to Y to a property of X.

There are obvious similarity between the container/address/visible properties of a MemoryRegion are very similar to bus/addr/realized that we have for -device. I think we should try and understand better what this similarity means, and whether this approach to many:1 relations could become a more central part of QOM.

Paolo

Reply via email to