public inbox for gentoo-project@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-project] Looking for someone with AVX-512 capable CPU
@ 2019-05-27 16:25 Michał Górny
  2019-05-27 17:05 ` Thomas Deutschmann
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Górny @ 2019-05-27 16:25 UTC (permalink / raw
  To: gentoo-project

[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]

Hi,

I'm looking for someone having AVX-512 capable CPU, for the purpose of
XSAVE support development in LLDB.  If you have such a CPU, could you
compile and run the following program, and send me the output?  If you
could in the future provide me with a shell account (unprivileged user
is sufficient) to build and test LLDB, that'd be even better.

The program is meant to grab offsets and sizes of XSAVE components.  It
should run unprivileged.  However, it might require a new-ish kernel. 
TIA.

---

#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

#include <cpuid.h>

int main()
{
	int i;
	uint32_t eax, ebx, ecx, edx;
	uint64_t xcr0;

	asm volatile(
		"xorq %%rcx, %%rcx\n\t"
		"xgetbv\n\t"
		: "=a"(eax), "=d"(edx)
		:
		:
	);

	printf("XCR0: EAX = %08" PRIx32 "; EDX = %08" PRIx32 "\n", eax, edx);
	xcr0 = ((uint64_t)edx << 32) | eax;

	if (!__get_cpuid_count(0x0D, 0, &eax, &ebx, &ecx, &edx))
		return 0;

	printf("0Dh(0): EAX = %08" PRIx32 "; EDX = %08" PRIx32 "\n", eax, edx);
	printf("0Dh(0): ECX = %" PRId32 "; EBX = %" PRId32 "\n", ecx, ebx);

	for (i = 2; i < 64; ++i)
	{
		if (!(xcr0 & ((uint64_t)1 << i)))
			continue;

		__cpuid_count(0x0D, i, eax, ebx, ecx, edx);
		printf("0Dh(%d): EAX = %" PRId32 "; EBX = %" PRId32 "; ECX = %"
				PRIx32 "\n", i, eax, ebx, ecx);
	}
}



-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-project] Looking for someone with AVX-512 capable CPU
  2019-05-27 16:25 [gentoo-project] Looking for someone with AVX-512 capable CPU Michał Górny
@ 2019-05-27 17:05 ` Thomas Deutschmann
  2019-05-27 20:21   ` Michał Górny
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Deutschmann @ 2019-05-27 17:05 UTC (permalink / raw
  To: gentoo-project


[-- Attachment #1.1: Type: text/plain, Size: 1970 bytes --]

Hi,

here's the output:

> $ ./a.out
> XCR0: EAX = 000002ff; EDX = 00000000
> 0Dh(0): EAX = 000002ff; EDX = 00000000
> 0Dh(0): ECX = 2696; EBX = 2696
> 0Dh(2): EAX = 256; EBX = 576; ECX = 0
> 0Dh(3): EAX = 64; EBX = 960; ECX = 0
> 0Dh(4): EAX = 64; EBX = 1024; ECX = 0
> 0Dh(5): EAX = 64; EBX = 1088; ECX = 0
> 0Dh(6): EAX = 512; EBX = 1152; ECX = 0
> 0Dh(7): EAX = 1024; EBX = 1664; ECX = 0
> 0Dh(9): EAX = 8; EBX = 2688; ECX = 0


Run on

> processor       : 31
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 85
> model name      : Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
> stepping        : 4
> microcode       : 0x200005e
> cpu MHz         : 800.000
> cache size      : 11264 KB
> physical id     : 1
> siblings        : 16
> core id         : 7
> cpu cores       : 8
> apicid          : 31
> initial apicid  : 31
> fpu             : yes
> fpu_exception   : yes
> cpuid level     : 22
> wp              : yes
> flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse
> sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb invpcid_single ssbd ibrs ibpb stibp kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke flush_l1d


Sorry, no shell access possible at the moment.


-- 
Regards,
Thomas Deutschmann / Gentoo Linux Developer
C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-project] Looking for someone with AVX-512 capable CPU
  2019-05-27 17:05 ` Thomas Deutschmann
@ 2019-05-27 20:21   ` Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2019-05-27 20:21 UTC (permalink / raw
  To: gentoo-project

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

On Mon, 2019-05-27 at 19:05 +0200, Thomas Deutschmann wrote:
> Hi,
> 
> here's the output:
> 
> > $ ./a.out
> > XCR0: EAX = 000002ff; EDX = 00000000
> > 0Dh(0): EAX = 000002ff; EDX = 00000000
> > 0Dh(0): ECX = 2696; EBX = 2696
> > 0Dh(2): EAX = 256; EBX = 576; ECX = 0
> > 0Dh(3): EAX = 64; EBX = 960; ECX = 0
> > 0Dh(4): EAX = 64; EBX = 1024; ECX = 0
> > 0Dh(5): EAX = 64; EBX = 1088; ECX = 0
> > 0Dh(6): EAX = 512; EBX = 1152; ECX = 0
> > 0Dh(7): EAX = 1024; EBX = 1664; ECX = 0
> > 0Dh(9): EAX = 8; EBX = 2688; ECX = 0
> 

Thanks.  That's helpful.  Or well, at least I know for sure that you
can't really rely on those offsets being fixed.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-27 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-27 16:25 [gentoo-project] Looking for someone with AVX-512 capable CPU Michał Górny
2019-05-27 17:05 ` Thomas Deutschmann
2019-05-27 20:21   ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox