CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2025/09/13 10:42:55
Modified files: sys/arch/amd64/amd64: vmm_machdep.c Log message: vmm(4): emulate PKRU XSAVE area and features. vmm(4) has supported guests using memory protection keys based on OpenBSD's implementation on Intel amd64 devices. Recent releases of Linux distros use kernel builds expecting to save and restore the PKRU state using XSAVE/XRSTOR. This leads to Linux guests panicking on boot as they expect to see certain CPUID features. This change adds support to the CPUID emulation to describe the proper size and offset required for PKRU state so a guest can choose to use XSAVE/XRSTOR to handle PKRU on context switches. This does not change how the OpenBSD host uses XSAVE/XRSTOR. vmm(4) continues to directly save and restore PKRU using WRPKRU/RDPKRU instructions on guest entry and exit. ok mlarkin@