[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/5] machine: introduce get_fw_dev_pa

From: Alexey Kardashevskiy
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/5] machine: introduce get_fw_dev_path() callback
Date: Tue, 10 Dec 2013 18:34:46 +1100
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 12/04/2013 01:00 AM, Paolo Bonzini wrote:
> Il 03/12/2013 14:44, Andreas Färber ha scritto:
>>>> You can check "if (current_machine &&
>>>> current_machine->get_fw_dev_path)", and move current_machine from vl.c
>>>> to hw/qdev/core.c.
>> Please don't encourage moving random stuff into "core" device code.
>> If needed, we can easily add a machine.c, but that should remain
>> softmmu-only.
> Another solution would be to:
> (1) add an interface which contains "get_fw_dev_path".  When
> qdev_get_fw_dev_path is called, walk the QOM tree until an object that
> implements the interface is found.  If none is found, call the bus
> implementation as usual.
> (2) in vl.c, add a way for current_machine to override the /machine
> object.  A 100%-QOMified machine indeed could put a SOC-like Device there.

Is there any good example of a 100%-QOMified machine? I could not find any.

> (3) for spapr, define the machine object to something that implements
> said interface.
> It seemed a bit complicated for this particular problem, but I cannot
> say it's overengineered.

I posted another series, please have a look. I did not find a good example
to copy from so...

> More aspects of the configuration could be moved to the new interface
> over time, for example compat properties.

How would it help?


reply via email to

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