Re: [PATCH 2/2] Documentation/x86: Explain guest XSTATE permission control

From: Dave Hansen
Date: Thu Jun 16 2022 - 18:50:07 EST


On 6/16/22 14:22, Chang S. Bae wrote:
> +In addition, a couple of extended options are provided for a VCPU thread.
> +The VCPU XSTATE permission is separately controlled.
> +
> +-ARCH_GET_XCOMP_GUEST_PERM
> +
> + arch_prctl(ARCH_GET_XCOMP_GUEST_PERM, &features);
> +
> + ARCH_GET_XCOMP_GUEST_PERM is a variant of ARCH_GET_XCOMP_PERM. So it
> + provides the same semantics and functionality but for VCPU.

This touches on the "what", but not the "why". Could you explain in
here both why this is needed and why an app might want to use it?