On Tue, Sep 19, 2017 at 17:43:06 -0400, nutar...@ornl.gov wrote:
> += Synchronizing the virtual clock with an external source =
> +
> +QEMU has a protocol for synchronizing its virtual clock
> +with the clock of a simulator in which QEMU is embedded
> +as a component. This options is enabled with the -qqq
> +argument, and it should generally be accompanied by the
> +following additional command line arguments:
> +
> +-icount 1,sleep=off -rtc clock=vm
> +  or
> +-enable-kvm -rtc clock=vm
> +
> +The -qqq argument is used to supply a file descriptor
> +for a Unix socket, which is used for synchronization.
> +The procedure for launching QEMU in is synchronization
> +mode has three steps:
> +
> +(1) Create a socket pair with the Linux socketpair function.
> +    The code segment that does this might look like

I thought a little bit about this patch. I think the feature is useful
and should eventually be provided by QEMU.

The part I'm not sure about is the socket interface; for instance,
it isn't cross-platform.

A better alternative might be to expose this functionality to plugins,
and let the plugins deal with the external world--socket or whatever
IPC is appropriate on the platform they're meant to be run.

Of course the plugin interface is still under discussion. I think though
it should be fairly easy to expose this functionality to plugins. I'll take
a look at in the next few weeks, hopefully also supporting MTTCG instances
(with some collaboration/hack from the plugin, I'm afraid).

Thanks,

                Emilio

Reply via email to