qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support


From: Pavel Dovgalyuk
Subject: Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support
Date: Mon, 10 Sep 2018 14:41:24 +0300

> From: Alex Bennée [mailto:address@hidden
> Pavel Dovgalyuk <address@hidden> 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

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