On 12/14/21 07:05, Tian, Kevin wrote:
+ if (guest_fpu) { + newfps->is_guest = true; + newfps->is_confidential = curfps->is_confidential; + newfps->in_use = curfps->in_use; + guest_fpu->xfeatures |= xfeatures; + } +As you explained guest fpstate is not current active in the restoring path, thus it's not correct to always inherit attributes from the active one.
Indeed, guest_fpu->fpstate should be used instead of curfps. Paolo