qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] qom: Introduce object_realize_nofail()
Date: Fri, 13 Apr 2012 11:43:13 +0100

On 13 April 2012 11:24, Paolo Bonzini <address@hidden> wrote:
> The PC has a similar model but it is implemented with N+1 devices, one
> APIC per CPU plus the IO-APIC.
>
> For the ARM, it seems cleaner to me to also split it into a per-CPU
> object (gic_cpu_ops) and a connection object (gic_dist_ops +
> gic_thiscpu_ops)---even if the per-CPU object are just thin forwarders
> because the logic is embedded in a single device.

I'm against this because it's not modelling the hardware. The
actual silicon is a single block of functionality with a number
of configurable knobs/pins/memory regions, and I think trying
to impose a boundary that doesn't exist in reality isn't going
to work. The only sane forwarding you could do for the gic_cpu_ops
objects would be to forward the reads and writes entirely untouched.
That's just a silly special case wrapper around a MemoryRegion and
I don't see that it helps.

Also from the point of view of a user of the GIC (ie the SoC
level containers) you don't want to be messing about instantiating
lots of different objects and connecting them together. You want
to configure and instantiate one object, the GIC, and wire it up in
the obvious way: by mapping the memory regions it exposes at
the locations you require and by wiring up the irq/gpio lines
to your own irq/gpio lines.

-- PMM



reply via email to

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