701890bd | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
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
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>
show more ...
|
9c2fb9e1 | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
target/i386: Pass host pointer and size to cpu_x86_{fxsave,fxrstor}
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helpe
target/i386: Pass host pointer and size to cpu_x86_{fxsave,fxrstor}
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.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
76d8d0f8 | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
target/i386: Pass host pointer and size to cpu_x86_{fsave,frstor}
We have already validated the memory region in the course of validating the signal frame. No need to do it again within the helper
target/i386: Pass host pointer and size to cpu_x86_{fsave,frstor}
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.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
a7365e98 | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Fix allocation and alignment of fp state
For modern cpus, the kernel uses xsave to store all extra cpu state across the signal handler. For xsave/xrstor to work, the pointer must b
linux-user/i386: Fix allocation and alignment of fp state
For modern cpus, the kernel uses xsave to store all extra cpu state across the signal handler. For xsave/xrstor to work, the pointer must be 64 byte aligned. Moreover, the regular part of the signal frame must be 16 byte aligned.
Attempt to mirror the kernel code as much as possible. Use enum FPStateKind instead of use_xsave() and use_fxsr().
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1648 Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
9e9b7d4c | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Return boolean success from xrstor_sigcontext
Invert the sense of the return value and use bool.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <
linux-user/i386: Return boolean success from xrstor_sigcontext
Invert the sense of the return value and use bool.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
c536f9b7 | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Return boolean success from restore_sigcontext
Invert the sense of the return value and use bool.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson
linux-user/i386: Return boolean success from restore_sigcontext
Invert the sense of the return value and use bool.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
3b6e9491 | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea
Use the structure definition from target/i386/cpu.h. The only minor quirk is re-casting the sw_reserved area to the OS specific
linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea
Use the structure definition from target/i386/cpu.h. The only minor quirk is re-casting the sw_reserved area to the OS specific struct target_fpx_sw_bytes.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
fcc9b64d | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Remove xfeatures from target_fpstate_fxsave
This is easily computed by advancing past the structure. At the same time, replace the magic number "64".
Reviewed-by: Paolo Bonzini <pb
linux-user/i386: Remove xfeatures from target_fpstate_fxsave
This is easily computed by advancing past the structure. At the same time, replace the magic number "64".
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
077c43eb | 08-Apr-2024 |
Richard Henderson <richard.henderson@linaro.org> |
linux-user/i386: Drop xfeatures_size from sigcontext arithmetic
This is subtracting sizeof(target_fpstate_fxsave) in TARGET_FXSAVE_SIZE, then adding it again via &fxsave->xfeatures. Perform the same
linux-user/i386: Drop xfeatures_size from sigcontext arithmetic
This is subtracting sizeof(target_fpstate_fxsave) in TARGET_FXSAVE_SIZE, then adding it again via &fxsave->xfeatures. Perform the same computation using xstate_size alone.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|