On 12.07.2024 11:08, Fonyuy-Asheri Caleb wrote: >>> I was able to locate the failure point to the file >>> xen/arch/x86/domctl.c with the following check. >>> >>> if( evc->size<PV_XSAVE_HDR_SIZE|| >>> evc->size>PV_XSAVE_SIZE(xfeature_mask) ) >>> gotovcpuextstate_out; >> >> It is certainly more complicated than that. >> >> What that's saying is that Xen doesn't think that the size of the blob >> matches expectations. That said - I'm in the middle of rewriting this >> logic because lots of it is subtly wrong. > > > Following from the check above, I have this other check in the same code > block. > > if ( evc->size == PV_XSAVE_HDR_SIZE ) > ; /* Nothing to restore. */ > else if ( evc->size < PV_XSAVE_HDR_SIZE + XSTATE_AREA_MIN_SIZE ) > ret = -EINVAL; /* Can't be legitimate data. */ > else if ( xsave_area_compressed(_xsave_area) ) > ret = -EOPNOTSUPP; /* Don't support compressed data. */ > else if ( evc->size != PV_XSAVE_SIZE(_xcr0_accum) ) > ret = -EINVAL; /* Not legitimate data. */ > > > What do you consider here as legitimate / non-legitimate data ?
In the first case (first "else if"): Simply too small. In the last case: Size not matching accumulated features. Jan