From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Ruslan Ruslichenko <ruslichenko.r@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
peter.maydell@linaro.org, artem_mygaiev@epam.com,
volodymyr_babchuk@epam.com, takahiro.nakata.wr@renesas.com,
"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
francisco.iglesias@amd.com, Ruslan_Ruslichenko@epam.com,
Paolo Bonzini <pbonzini@redhat.com>,
"Edgar E . Iglesias" <edgar.iglesias@amd.com>
Subject: Re: [PATCH 23/29] system: Introduce -sync-quantum command line option
Date: Thu, 5 Feb 2026 20:40:59 +0000 [thread overview]
Message-ID: <aYUAWw9Rfuu7KWjA@redhat.com> (raw)
In-Reply-To: <20260205195824.2610192-24-ruslichenko.r@gmail.com>
On Thu, Feb 05, 2026 at 08:58:18PM +0100, Ruslan Ruslichenko wrote:
> From: Ruslan Ruslichenko <Ruslan_Ruslichenko@epam.com>
>
> Add a new global option '-sync-quantum' to specify the maximum time
> interval, in nanoseconds, between synchronizations with remote peers.
Again, we don't really want to introduced new top level command
line options, so try to find an existing place that's suitable
to fit this in, perhaps a prop -machine.
>
> In co-simulation environments (such as QEMU coupled with a SystemC
> simulator), time must be synchronized periodically to ensure functional
> accuracy. The 'sync-quantum' defines the maximum amount of time QEMU
> can simulate ahead of its remote peers before a mandatory synchronization
> event (sync packet) occurs.
>
> This value is stored in the global 'global_sync_quantum' variable and
> serves as a default hint for device models and Remote Port instances
> to manage their simulation time.
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
> Signed-off-by: Takahiro Nakata <takahiro.nakata.wr@renesas.com>
> Signed-off-by: Ruslan Ruslichenko <Ruslan_Ruslichenko@epam.com>
> ---
> include/system/system.h | 2 ++
> qemu-options.hx | 11 +++++++++++
> system/vl.c | 8 ++++++++
> 3 files changed, 21 insertions(+)
>
> diff --git a/include/system/system.h b/include/system/system.h
> index 0cd012004d..f187544147 100644
> --- a/include/system/system.h
> +++ b/include/system/system.h
> @@ -59,6 +59,8 @@ extern MlockState mlock_state;
>
> extern const char *machine_path;
>
> +extern uint64_t global_sync_quantum;
> +
> #define MAX_OPTION_ROMS 16
> typedef struct QEMUOptionRom {
> const char *name;
> diff --git a/qemu-options.hx b/qemu-options.hx
> index b7dd2a64f0..8ef0c57507 100644
> --- a/qemu-options.hx
> +++ b/qemu-options.hx
> @@ -765,6 +765,17 @@ SRST
> Preallocate memory when using -mem-path.
> ERST
>
> +DEF("sync-quantum", HAS_ARG, QEMU_OPTION_sync_quantum,
> + "-sync-quantum Max time between synchroniation, nanoseconds.\n",
> + QEMU_ARCH_ALL)
> +SRST
> +``-sync-quantum val``
> + Maximum time between synchronization <val>.
> + This value is used to drive periodic synchronization with remote port peers.
> + It is also used to set device models sync-quantum properties controlling
> + the maximum amount of ahead of time simulation that is prefered (only a hint).
> +ERST
> +
> DEF("machine-path", HAS_ARG, QEMU_OPTION_machine_path,
> "-machine-path DIR A directory in which to create machine nodes\n",
> QEMU_ARCH_ALL)
> diff --git a/system/vl.c b/system/vl.c
> index 4750b1cf69..467646c3ff 100644
> --- a/system/vl.c
> +++ b/system/vl.c
> @@ -182,6 +182,7 @@ static QemuPluginList plugin_list = QTAILQ_HEAD_INITIALIZER(plugin_list);
> static BlockdevOptionsQueue bdo_queue = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);
> static bool nographic = false;
> static int mem_prealloc; /* force preallocation of physical target memory */
> +uint64_t global_sync_quantum;
> const char *machine_path;
> static const char *vga_model = NULL;
> static DisplayOptions dpy;
> @@ -3129,6 +3130,13 @@ void qemu_init(int argc, char **argv)
> case QEMU_OPTION_mem_prealloc:
> mem_prealloc = 1;
> break;
> + case QEMU_OPTION_sync_quantum:
> + if (qemu_strtou64(optarg, &optarg, 10,
> + &global_sync_quantum)) {
> + error_report("failed to parse sync_quantum");
> + exit(1);
> + }
> + break;
> case QEMU_OPTION_machine_path:
> machine_path = optarg;
> break;
> --
> 2.43.0
>
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2026-02-05 20:41 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 19:57 [PATCH 00/29] hw/core: Introduce Remote Port Co-simulation Protocol Ruslan Ruslichenko
2026-02-05 19:57 ` [PATCH 01/29] hw/core: Add Remote Port protocol packet definition Ruslan Ruslichenko
2026-02-05 20:38 ` Daniel P. Berrangé
2026-02-06 17:45 ` Ruslan Ruslichenko
2026-02-06 18:06 ` Daniel P. Berrangé
2026-02-05 19:57 ` [PATCH 02/29] hw/core: Add Remote Port header helpers Ruslan Ruslichenko
2026-02-05 19:57 ` [PATCH 03/29] hw/core: Add Remote Port session state and hello protocol Ruslan Ruslichenko
2026-02-05 19:57 ` [PATCH 04/29] hw/core: Implement Remote Port bus access helpers Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 05/29] hw/core: Implement Remote Port irq, sync and ATS helpers Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 06/29] system/vl: Introduce -machine-path command line option Ruslan Ruslichenko
2026-02-05 20:17 ` Daniel P. Berrangé
2026-02-05 19:58 ` [PATCH 07/29] hw/core: Add Remote Port object skeleton Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 08/29] hw/core: Setup Remote Port I/O channels Ruslan Ruslichenko
2026-02-05 20:28 ` Daniel P. Berrangé
2026-02-06 17:33 ` Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 09/29] hw/core: Add Remote Port protocol thread and handshake Ruslan Ruslichenko
2026-02-05 20:29 ` Daniel P. Berrangé
2026-02-06 17:38 ` Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 10/29] hw/core: Implement Remote Port packet dispatch logic Ruslan Ruslichenko
2026-02-05 20:32 ` Daniel P. Berrangé
2026-02-05 19:58 ` [PATCH 11/29] hw/core: Implement Remote Port response handling Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 12/29] hw/core: Implement Remote Port time synchronization Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 13/29] system/memory: Introduce unified MemoryTransaction and .access callback Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 14/29] hw/core: Add Remote Port Memory Master object skeleton Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 15/29] hw/core: Implement Remote Port Memory Master bus transactions Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 16/29] system/physmem: Add ats_do_translate helper Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 17/29] hw/core: Add Remote Port ATS device skeleton Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 18/29] hw/core: Implement Remote Port ATS logic and cache management Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 19/29] hw/core: Add Remote Port memory slave device Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 20/29] hw/core: Add Remote Port GPIO/Interrupt bridge Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 21/29] hw/core: Add Remote Port Stream device Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 22/29] hw/core: Add Remote Port files to build Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 23/29] system: Introduce -sync-quantum command line option Ruslan Ruslichenko
2026-02-05 20:40 ` Daniel P. Berrangé [this message]
2026-02-06 17:57 ` Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 24/29] hw/core: Add FDT support to Remote Port GPIO Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 25/29] hw/core: Add FDT support to Remote Port memory master Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 26/29] hw/core: Add Remote Port connection support to fdt-generic Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 27/29] hw/core: Support IOMMU translation for Remote Port memory slave Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 28/29] hw/core: Add Remote Port attachment helpers Ruslan Ruslichenko
2026-02-05 19:58 ` [PATCH 29/29] hw/core: Add ATS support to Remote Port memory slave Ruslan Ruslichenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYUAWw9Rfuu7KWjA@redhat.com \
--to=berrange@redhat.com \
--cc=Ruslan_Ruslichenko@epam.com \
--cc=artem_mygaiev@epam.com \
--cc=edgar.iglesias@amd.com \
--cc=edgar.iglesias@gmail.com \
--cc=francisco.iglesias@amd.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ruslichenko.r@gmail.com \
--cc=takahiro.nakata.wr@renesas.com \
--cc=volodymyr_babchuk@epam.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.