[lkml]   [2018]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 5/7] x86/vdso: Add vDSO functions for direct store instructions
On Mon, Jul 23, 2018 at 8:42 PM, Fenghua Yu <> 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:

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.

>> code could use CPUID just like for any other new instruction. But, if there
>> really is some compelling reason to add this to the vDSO, then see below:
>> >+notrace bool __vdso_movdiri_supported(void)
>> >+{
>> >+ return _vdso_funcs_data->movdiri_supported;
>> return static_cpu_has(X86_FEATURE_MOVDIRI);
> But boot_cpu_data (used in static_cpu_has) cannot be accessed by user
> unless mapped in VVAR. So this change cannot be compiled.

The underlying alternative infrastructure works in the vDSO. You'd
need to introduce an alternate version of _static_cpu_has if
BUILD_VDSO that skips the boot_cpu_has fallback.

 \ /
  Last update: 2018-07-24 07:28    [W:0.069 / U:3.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site