target/i386: Pass host pointer and size to cpu_x86_{xsave,xrstor}
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 9 Apr 2024 04:04:19 +0000 (18:04 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 26 May 2024 22:49:58 +0000 (15:49 -0700)
commit701890bdd09b289fd9cb852e714e91373088b0f3
tree423f6606e9f4d9252aba71e38bedaa153fd423de
parent9c2fb9e1d589fbda266d8db611b9d3a38ab96a3c
target/i386: Pass host pointer and size to cpu_x86_{xsave,xrstor}

We have already validated the memory region in the course of
validating the signal frame.  No need to do it again within
the helper function.

In addition, return failure when the header contains invalid
xstate_bv.  The kernel handles this via exception handling
within XSTATE_OP within xrstor_from_user_sigframe.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/i386/signal.c
target/i386/cpu.h
target/i386/tcg/fpu_helper.c