On 05/19/2011 10:27 PM, Jan Kiszka wrote:
On 2011-05-19 16:12, Avi Kivity wrote:
>  +/* Sets an offset to be added to MemoryRegionOps callbacks. */
>  +void memory_region_set_offset(MemoryRegion *mr, target_phys_addr_t offset);

Please mark this as a legacy helper, ideally to be removed after the
complete conversion to this API. During that phase we should try to
identify those devices which still depend on offset=0 and maybe directly
fix them.

Okay.

>  +/* Turn loggging on or off for specified client (display, migration) */
>  +void memory_region_set_log(MemoryRegion *mr, bool log, unsigned client);
>  +/* Enable memory coalescing for the region.  MMIO ->write callbacks may be
>  + * delayed until a non-coalesced MMIO is issued.
>  + */
>  +void memory_region_set_coalescing(MemoryRegion *mr);
>  +/* Enable memory coalescing for a sub-range of the region.  MMIO ->write
>  + * callbacks may be delayed until a non-coalesced MMIO is issued.
>  + */
>  +void memory_region_add_coalescing(MemoryRegion *mr,
>  +                                  target_phys_addr_t offset,
>  +                                  target_phys_addr_t size);

Will this be such a common use case that requesting the user to split up
the region and then use set_coalescing will generate too much boiler
plate code?

Look at e1000, coalescing ranges have byte granularity.

>  +/* Disable MMIO coalescing for the region. */
>  +void memory_region_clear_coalescing(MemoryRegion *mr);

And what about clearing coalescing for sub-ranges?

Clear them all and rebuild.

Maybe skip
add_coalescing for the first run and see how far we get.

We get as far as e.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


Reply via email to