qtest: add a QOM object for qtest

The qtest server right now can only be created using the -qtest
and -qtest-log options.  Allow an alternative way to create it
using "-object qtest,chardev=...,log=...".

This is part of the long term plan to make more (or all) of
QEMU configurable through QMP and preconfig mode.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-11-09 10:13:30 -05:00
parent 9e33013bd4
commit 6ba7ada355
3 changed files with 196 additions and 11 deletions

View file

@ -1758,8 +1758,9 @@ static bool object_create_early(const char *type)
* add one, state the reason in a comment!
*/
/* Reason: rng-egd property "chardev" */
if (g_str_equal(type, "rng-egd")) {
/* Reason: property "chardev" */
if (g_str_equal(type, "rng-egd") ||
g_str_equal(type, "qtest")) {
return false;
}