[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/29] display: enable DIRTY_MEMORY_VGA tracking
Re: [Qemu-devel] [PATCH 03/29] display: enable DIRTY_MEMORY_VGA tracking explicitly
Tue, 26 May 2015 13:16:44 +0100
On 26 May 2015 at 13:10, Paolo Bonzini <address@hidden> wrote:
> On 26/05/2015 14:08, Peter Maydell wrote:
>>>> >> Could you provide some explanation/documentation of when a
>>>> >> display device needs to set DIRTY_MEMORY_VGA (and when it
>>>> >> doesn't)?
>>> > It needs to set it if it uses memory_region_get/set/clear_dirty with
>>> > DIRTY_MEMORY_VGA as the last argument.
>> OK, and which devices need to do that?
> Those that care to optimize their update_display callback. It's
> entirely opt in.
It also appears to be entirely undocumented :-)
The reason I'm asking is that the a lot of the bulk of QEMU is
device models, which are often written by people without a deep
understanding of QEMU's APIs and then reviewed by people who
may not be familiar with all the subsystem details either. So
APIs which are required to be used by devices are more in need
of documentation and assertion-sanity-checks on their use than
APIs which are only used by core code or even by tcg frontends.
For instance, up until this thread I'd assumed that DIRTY_MEMORY_VGA
was pretty much what the name implies, something that's only
of interest to the PC VGA card emulation. So it's very hard
for me to review something that's relating to an API that's
not one I know of and which isn't documented either.