qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Memory API: handling unassigned physical memory


From: Peter Maydell
Subject: Re: [Qemu-devel] Memory API: handling unassigned physical memory
Date: Mon, 30 Apr 2012 15:39:33 +0100

On 30 April 2012 15:33, Mark Cave-Ayland <address@hidden> wrote:
> On 30/04/12 15:03, Peter Maydell wrote:
> Right I think I'm starting to understand this now - in which case it becomes
> a matter of just copying a handful of lines within sun4m which is more
> bearable.
>
> In your view, would a suitable fix be to change dma_memory_read,
> dma_memory_write, dma_opaque, it_shift and dma_enabled to be qdev properties
> and modify esp_init() to return the qdev reference so they can be set by the
> caller?

They should be some kind of qdev property, probably. Since you can't
change a property after the qdev_init there's not much point changing
esp_init to return the DeviceState*, though.

(Disclaimer: I'm not sure what the best QOM/qdev practice is for "here
is a set of function pointers". In my ideal world this would be done
by setting a single strongly typed qdev property which encapsulates
the idea of "here is a connection into which you can plug something
that satisfies this dma read/write API".)

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]