re: port-amd64/59860: nvmm: support AVX2, AVX512, &c.

"matthew green via gnats" <[email protected]>
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
The following reply was made to PR port-amd64/59860; it has been noted by GNATS.

From: matthew green <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
    [email protected], [email protected]
Subject: re: port-amd64/59860: nvmm: support AVX2, AVX512, &c.
Date: Mon, 13 Jul 2026 10:15:00 +1000

 i seems to have gotten past that with a simple mask in vmx_init():
 
 -	vmx_xcr0_mask = x86_xsave_features;
 +	vmx_xcr0_mask = x86_xsave_features & __BITS(XSAVE_MAX_COMPONENT, 0);
 
 not sure why, but my cpu ends up with XCR0_PKRU set here (i mean,
 the cpu has it, but do we otherwise support it?)
 
 it seems to work with that fix:
 
 cpu0: xsave features 0x7<x87,SSE,AVX>
 
 from the guest.  it seems to work:
 
 # cd /usr/tests/kernel
 # atf-run t_signal_and_fpu
 ....
 tc-start: 1783901653.490927, xmm
 tc-end: 1783901655.349492, xmm, passed
 tc-start: 1783901655.350912, ymm
 tc-end: 1783901657.349512, ymm, passed
 tp-end: 1783901657.350932, t_signal_and_fpu
 info: time.end, Mon Jul 13 00:14:17 UTC 2026
 
 
 .mrg.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.