Re: [PATCH v3 00/16] s390x cpu model implementation

From: Eduardo Habkost
Date: Mon Mar 02 2015 - 14:26:06 EST


On Mon, Mar 02, 2015 at 01:43:52PM +0100, Michael Mueller wrote:
[...]
>
> What's currently a little bit unclear to me is how to best initialize the
> various accelerators for machine 'none'. I played around with different
> options and finally came up with the following sugguestion:
>
> Introduce a QEMU "probe mode" that gets entered in case the current machine
> is "none" and no specific accelerator is requested on the cmd line. When
> in that mode, loop trough a list of acellerators in configure_accelerator
> and invoke all their init methods once. The last accelerator to init shall
> be tcg.
>
> In cpu model context that allows to initialize the S390 CPU classes for
> each single accelertor which supports it. Whence the callback for
> qemu-cpu-definitions allows to populate its answer string according to the
> above sketched extended CpuDefinitionInfo type for multiplaccelerators.

To initialize the various accelereators, you should just be able to
create temporary QOM accelerators on the fly, when you need them. That
was the whole point of the conversion of accelerators to QOM.

So we shouldn't need any special probe mode as long as: 1) all
accelerators don't do anything destructive (that affects global QEMU
state) in their instance_init functions; 2) the probing code simply
creates the accel objects when needed, query for information, and then
destroy them.

--
Eduardo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/