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 10:53:03 +0100

On 13 April 2012 10:32, Paolo Bonzini <address@hidden> wrote:
> Il 13/04/2012 11:09, Peter Maydell ha scritto:
>> You're right in general that we should be modelling these as
>> container objects (I posted a series the other week that starts
>> to move in that direction by dropping the weird subclassing of
>> the GIC.) But the overall container object for a cortex-a9 will
>> still be an object whose number of exposed IRQ lines depends on
>> a device parameter
>
> Yes, that would require a little more coding, just like the grlib.

Well, if we can do it then that's fine (assuming that the actual
implementation doesn't look too dreadful and doesn't look wildly
different from "number of irq lines is fixed").

>> , and the GIC device must still have a number
>> of exposed memory regions/input lines/output lines that depends
>> on the number of CPUs, which is going to be a device parameter.
>
> That would be a device parameter of the SoC.  As long as the GIC
> is only created after the device parameter has been set on the
> parent, it can just read it from there.

I don't understand how this would work? The GIC can't read
parameters from its parent, surely, that would be breaking
encapsulation.

> (BTW perhaps it is cheating, but on the PC you just have
> "-smp 4" for a four-core so it's not a device property).

I am assuming that '-smp 4' will eventually convert into
setting a device property on something (probably on the
QOM object which corresponds to the top level machine?).

>> I'm not sure what your GICInterface children are?
>
> Those would model the GIC<->CPU interface memory regions.

MemoryRegions model memory regions :-) I'm not sure what
more there is to do there.

-- PMM



reply via email to

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