From: Marc Zyngier <maz@kernel.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Will Deacon <will@kernel.org>,
Julien Thierry <julien.thierry.kdev@gmail.com>,
kvm@vger.kernel.org, kvmarm@lists.linux.dev,
Alexandru Elisei <alexandru.elisei@arm.com>
Subject: Re: [PATCH kvmtool v2 4/6] arm64: Add counter offset control
Date: Sat, 26 Jul 2025 10:25:07 +0100 [thread overview]
Message-ID: <87ikjftibw.wl-maz@kernel.org> (raw)
In-Reply-To: <20250725144100.2944226-5-andre.przywara@arm.com>
On Fri, 25 Jul 2025 15:40:58 +0100,
Andre Przywara <andre.przywara@arm.com> wrote:
>
> From: Marc Zyngier <maz@kernel.org>
>
> KVM now allows to offset the arch timer counter values reported to a
> guest, via a per-VM ioctl. This is conceptually similar to the effects
> of CNTVOFF_EL2, but applies to both the emulated physical and virtual
> counter, and also to all VCPUs.
Not really. Architecturally, there is only a single, global counter,
and multiple *views* of that counter.
What this option does is to offset the global counter. Then, the
various per-CPU offsets are applied on the views that can be affected
by them. This is cumulative. So for example, CNTVCT_EL0 is affected by
both the global offset and CNTVOFF_EL2 when read from EL0, EL1, and
EL2 when E2H==0. Behind the scenes, this is of course implemented with
CNTVOFF_EL2 (when it works), but that's not really relevant here.
I'd suggest something along the lines of:
"KVM allows the offsetting of the global counter in order to help with
migration of a VM. This offset applies cumulatively with the offsets
provided by the architecture.
Although kvmtool doesn't provide a way to migrate a VM, controlling
this offset is useful to test the timer subsystem."
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
next prev parent reply other threads:[~2025-07-26 9:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 14:40 [PATCH kvmtool v2 0/6] arm64: Nested virtualization support Andre Przywara
2025-07-25 14:40 ` [PATCH kvmtool v2 1/6] Sync kernel UAPI headers with v6.16-rc1 Andre Przywara
2025-07-25 14:40 ` [PATCH kvmtool v2 2/6] arm64: Initial nested virt support Andre Przywara
2025-07-25 14:40 ` [PATCH kvmtool v2 3/6] arm64: nested: add support for setting maintenance IRQ Andre Przywara
2025-07-25 14:40 ` [PATCH kvmtool v2 4/6] arm64: Add counter offset control Andre Przywara
2025-07-26 9:25 ` Marc Zyngier [this message]
2025-07-25 14:40 ` [PATCH kvmtool v2 5/6] arm64: add FEAT_E2H0 support (TBC) Andre Przywara
2025-07-25 16:37 ` Marc Zyngier
2025-07-26 9:01 ` Wei-Lin Chang
2025-07-26 9:19 ` Marc Zyngier
2025-07-26 10:11 ` Wei-Lin Chang
2025-07-26 10:34 ` Marc Zyngier
2025-07-25 14:41 ` [PATCH kvmtool v2 6/6] arm64: Generate HYP timer interrupt specifiers Andre Przywara
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=87ikjftibw.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alexandru.elisei@arm.com \
--cc=andre.przywara@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=will@kernel.org \
/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.