On 2012-11-09 07:23, liu ping fan wrote:
> Ping? Any further comments?
> 

Don't expect too much feedback these days. Folks are busy listening to
KVM forum talks, doing networking, enjoying Barcelona and curing their
hangovers. ;)

Anyway, while hacking my talk it became clearer to me that one of the
bigger issues remaining is with the ref/unref callbacks. I don't think
we want that much boilerplate code in the device models that this
approach implies.

The idea I had so far on this is to go back to registering a QOM object
reference with the access callbacks and reference it in the generic code
directly instead of letting the device models do this. We could introduce

struct MemoryRegionOps {
    uint64_t (*read)(void *opaque,
                     hwaddr addr,
                     unsigned size);
    uint64_t (*read_unlocked)(QObject *object,
                     hwaddr addr,
                     unsigned size);

    void (*write)(void *opaque,
                  hwaddr addr,
                  uint64_t data,
                  unsigned size);
    void (*write_unlocked)(QObject *object,
                  hwaddr addr,
                  uint64_t data,
                  unsigned size);

So, device models supporting the lock-less mode would implement the
*_unlocked callbacks, all the rest stay with the simple read/write
versions, leaving the new ones NULL. It's an early idea, not fully
thought through yet.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to