On 02.01.2025 09:45, Tu Dinh wrote:
> HVM vCPU state images are uncompressed and therefore can't contain XSS
> states.

Then again ...

> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -1208,7 +1208,8 @@ HVM_REGISTER_SAVE_RESTORE(CPU, hvm_save_cpu_ctxt, NULL, 
> hvm_load_cpu_ctxt, 1,
>  
>  #define HVM_CPU_XSAVE_SIZE(xcr0) (offsetof(struct hvm_hw_cpu_xsave, \
>                                             save_area) + \
> -                                  xstate_uncompressed_size(xcr0))
> +                                  xstate_uncompressed_size(xcr0 & \
> +                                                           ~X86_XSS_STATES))

... a variable / parameter named "xcr0" shouldn't include any XSS bits
anyway. IOW this perhaps needs sorting at the use sites of the macros.

Jan

Reply via email to