> From: Alex Bennée [mailto:alex.ben...@linaro.org]
> Pavel Dovgalyuk <pavel.dovga...@ispras.ru> writes:
> 
> > This patch adds support for dynamically loaded plugins.
> > Every plugin is a dynamic library with a set of optional exported
> > functions that will be called from QEMU.
> >
> <snip>
> > +
> > +static QLIST_HEAD(, QemuPluginInfo) qemu_plugins
> > +                                = QLIST_HEAD_INITIALIZER(qemu_plugins);
> > +
> > +static QemuOptsList qemu_plugin_opts = {
> > +    .name = "plugin",
> > +    .head = QTAILQ_HEAD_INITIALIZER(qemu_plugin_opts.head),
> > +    .desc = {
> > +        {
> > +            .name = "file",
> > +            .type = QEMU_OPT_STRING,
> > +        },{
> > +            .name = "args",
> > +            .type = QEMU_OPT_STRING,
> > +        },
> > +        { /* end of list */ }
> > +    },
> > +};
> > +
> > +void qemu_plugin_parse_cmd_args(const char *optarg)
> > +{
> > +    QemuOpts *opts = qemu_opts_parse_noisily(&qemu_plugin_opts, optarg, 
> > false);
> > +    qemu_plugin_load(qemu_opt_get(opts, "file"),
> > +        qemu_opt_get(opts, "args"));
> > +}
> 
> Currently this is only available to system mode emulation. Can it be
> extended to include linux-user as well?

Why not? I'm not familiar with linux-user, so I'll need some time to try.

Pavel Dovgalyuk


Reply via email to