Re: [PATCH 5/7] x86/vdso: Add vDSO functions for direct store instructions
From: Fenghua Yu
Date: Wed Jul 25 2018 - 18:20:10 EST
On Mon, Jul 23, 2018 at 10:27:34PM -0700, Andy Lutomirski wrote:
> On Mon, Jul 23, 2018 at 8:42 PM, Fenghua Yu <fenghua.yu@xxxxxxxxx> wrote:
> > On Mon, Jul 23, 2018 at 06:48:00PM -0700, Andy Lutomirski wrote:
> >> On 07/23/2018 05:55 AM, Fenghua Yu wrote:
> >> >The instructions can be implemented in intrinsic functions in future
> >> >GCC. But the vDSO interfaces are available to user without the
> >> I'm not convinced that any of this belongs in the vDSO at all. You could
> >> just add AT_HWCAP (or AT_HWCAP2) flags for the new instructions. Or user
> > Thomas asked to use vDSO. Please see the discussion thread:
> > https://lkml.org/lkml/2018/6/19/316
> I think he meant that, if these helpers belong in the kernel at all,
> then they belong in the vDSO. But I think they mostly don't belong in
> the kernel.
I think both you and Thomas are right. I misunderstood Thomas's comments.
I will remove the APIs/functions from next version of patch set. They
don't belong to kernel and will be implemented in either GCC or glibc.
GCC8 already implemented movdiri and movdir64b instruction intrinsics.
GCC9 will implement user wait instruction intrinsics.
If user wants to use those instinsics now, this GCC link has them:
If user wants to use the intrinsics in native code, the user needs to
check availability of the features (i.e. movdiri, movdir64b, waitpkg)
by running cpuid or a glibc interface that is going to be available in
Thank you for your comments!