From: Thomas Gleixner <tglx@linutronix.de>
To: "David Woodhouse" <dwmw2@infradead.org>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Helge Deller" <deller@gmx.de>,
"Andy Lutomirski" <luto@kernel.org>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
"Frederic Weisbecker" <frederic@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>, "Theodore Ts'o" <tytso@mit.edu>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Huacai Chen" <chenhuacai@kernel.org>,
"WANG Xuerui" <kernel@xen0n.name>,
"Russell King" <linux@armlinux.org.uk>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Sven Schnelle" <svens@linux.ibm.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Naveen N Rao" <naveen@kernel.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
"Arnd Bergmann" <arnd@arndb.de>, "Guo Ren" <guoren@kernel.org>
Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, loongarch@lists.linux.dev,
linux-s390@vger.kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org,
Nam Cao <namcao@linutronix.de>,
linux-csky@vger.kernel.org, "Ridoux, Julien" <ridouxj@amazon.com>,
"Luu, Ryan" <rluu@amazon.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH v3 00/18] vDSO: Introduce generic data storage
Date: Fri, 14 Feb 2025 12:34:44 +0100 [thread overview]
Message-ID: <87ed00kbe3.ffs@tglx> (raw)
In-Reply-To: <ff83dc5c91b4e46bcf2d99680ec6af250fb05b27.camel@infradead.org>
David!
On Thu, Feb 06 2025 at 09:31, David Woodhouse wrote:
> Thanks for working on this. Is there a plan to expose the time data
> directly to userspace in a form which is usable *other* than by
> function calls which get the value of the clock at a given moment?
>
> For populating the vmclock device¹ we need to know the actual
> relationship between the hardware counter (TSC, arch timer, etc.) and
> real time in order to propagate that to the guest.
>
> I see two options for doing this:
>
> 1. Via userspace, exposing the vdso time data (and a notification when
> it changes?) and letting the userspace VMM populate the vmclock.
> This is complex for x86 because of TSC scaling; in fact userspace
> doesn't currently know the precise scaling from host to guest TSC
> so we'd have to be able to extract that from KVM.
Exposing the raw data is not going to happen as we would create an ABI
preventing any modifications to the internals. VDSO data is considered a
fully internal (think kernel) representation and the accessor functions
create an ABI around it. So if at all you can add a accessor function
which exposes data to user space so that the internal data
representation can still be modified as necessary.
> 2. In kernel, asking KVM to populate the vmclock structure much like
> it does other pvclocks shared with the guest. KVM/x86 already uses
> pvclock_gtod_register_notifier() to hook changes; should we expand
> on that? The problem with that notifier is that it seems to be
> called far more frequently than I'd expect.
It's called once per tick to expose the continous updates to the
conversion factors and related internal data.
Thanks,
tglx
next prev parent reply other threads:[~2025-02-14 11:34 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 12:05 [PATCH v3 00/18] vDSO: Introduce generic data storage Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 01/18] x86/vdso: Fix latent bug in vclock_pages calculation Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 02/18] parisc: Remove unused symbol vdso_data Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 03/18] vdso: Introduce vdso/align.h Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 04/18] vdso: Rename included Makefile Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 05/18] vdso: Add generic time data storage Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 06/18] vdso: Add generic random " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 07/18] vdso: Add generic architecture-specific " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 08/18] arm64: vdso: Switch to generic storage implementation Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 09/18] riscv: " Thomas Weißschuh
2025-02-22 8:17 ` Xi Ruoyao
2025-02-22 10:14 ` Thomas Gleixner
2025-02-04 12:05 ` [PATCH v3 10/18] LoongArch: vDSO: " Thomas Weißschuh
2025-02-22 8:20 ` Xi Ruoyao
2025-02-04 12:05 ` [PATCH v3 11/18] arm: vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 12/18] s390/vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 13/18] MIPS: vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 14/18] powerpc/vdso: " Thomas Weißschuh
2025-02-05 8:50 ` Christophe Leroy
2025-02-04 12:05 ` [PATCH v3 15/18] x86/vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 16/18] x86/vdso/vdso2c: Remove page handling Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 17/18] vdso: Remove remnants of architecture-specific random state storage Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 18/18] vdso: Remove remnants of architecture-specific time storage Thomas Weißschuh
2025-02-06 9:31 ` [PATCH v3 00/18] vDSO: Introduce generic data storage David Woodhouse
2025-02-06 10:59 ` Thomas Weißschuh
2025-02-07 10:15 ` David Woodhouse
2025-02-14 11:34 ` Thomas Gleixner [this message]
2025-02-14 12:04 ` David Woodhouse
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=87ed00kbe3.ffs@tglx \
--to=tglx@linutronix.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Jason@zx2c4.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=dwmw2@infradead.org \
--cc=frederic@kernel.org \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=kernel@xen0n.name \
--cc=kvm@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=namcao@linutronix.de \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=ridouxj@amazon.com \
--cc=rluu@amazon.com \
--cc=svens@linux.ibm.com \
--cc=thomas.weissschuh@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=tytso@mit.edu \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).