[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qdev_get_machine() can return something non-NULL but no
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] qdev_get_machine() can return something non-NULL but not TYPE_MACHINE |
Date: |
Tue, 12 Sep 2017 10:11:32 +0100 |
On 12 September 2017 at 08:40, Igor Mammedov <address@hidden> wrote:
> On Mon, 11 Sep 2017 14:33:03 +0100
> Peter Maydell <address@hidden> wrote:
>> It's not possible in all cases to set a CPU property from the
>> top level board code. In quite a lot of cases the CPU
>> object is created by an SoC object which is in turn
>> created by the board code, and there is no plumbing
>> there to pass arbitrary properties through to the CPU
>> object...
> there is a cleaner way without cpu accessing machine,
> make it property of cpu and use compat machinery that
> was invented for fixing up stuff of this kind.
>
> SET_MACHINE_COMPAT(MachineClass,
> { .driver = "arm-cpu",
> .property = "foo",
> .value = "off",
> }
> )
It looks like we only use that machine-compat stuff on
our versioned boards, which is pretty much the only place
where we don't need to set this particular flag...
thanks
-- PMM