Re: [PATCH v5 1/3] selftests/lam: Move cpu_has_la57() to use cpuinfo flag

2025-01-24 Thread Dave Hansen
On 1/24/25 12:17, Maciej Wieczor-Retman wrote: >> Could you poke around and see if there is any existing ABI that we can >> use to query LA57 support? Maybe one of the things KVM exports, or some >> TASK_SIZE_MAX comparisons? > Sure, I'll try to find some other way. > > My previous tactic was to m

Re: [PATCH v5 1/3] selftests/lam: Move cpu_has_la57() to use cpuinfo flag

2025-01-24 Thread Maciej Wieczor-Retman
On 2025-01-24 at 21:17:22 +0100, Maciej Wieczor-Retman wrote: >On 2025-01-24 at 08:14:41 -0800, Dave Hansen wrote: >>On 11/27/24 09:35, Maciej Wieczor-Retman wrote: >Sure, I'll try to find some other way. > >My previous tactic was to munmap() a high address and see if it works. Does >that >sound o

Re: [PATCH v5 1/3] selftests/lam: Move cpu_has_la57() to use cpuinfo flag

2025-01-24 Thread Maciej Wieczor-Retman
On 2025-01-24 at 08:14:41 -0800, Dave Hansen wrote: >On 11/27/24 09:35, Maciej Wieczor-Retman wrote: >> -/* Check 5-level page table feature in CPUID.(EAX=07H, ECX=00H):ECX.[bit >> 16] */ >> static inline int cpu_has_la57(void) >> { >> -unsigned int cpuinfo[4]; >> - >> -__cpuid_count(0x7

Re: [PATCH v5 1/3] selftests/lam: Move cpu_has_la57() to use cpuinfo flag

2025-01-24 Thread Dave Hansen
On 11/27/24 09:35, Maciej Wieczor-Retman wrote: > -/* Check 5-level page table feature in CPUID.(EAX=07H, ECX=00H):ECX.[bit 16] > */ > static inline int cpu_has_la57(void) > { > - unsigned int cpuinfo[4]; > - > - __cpuid_count(0x7, 0, cpuinfo[0], cpuinfo[1], cpuinfo[2], cpuinfo[3]); > -