mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
d5dc3a927a
commit
76d8d0f85c
3 changed files with 24 additions and 16 deletions
|
@ -373,7 +373,7 @@ static void setup_sigcontext(CPUX86State *env,
|
|||
__put_user(env->regs[R_ESP], &sc->esp_at_signal);
|
||||
__put_user(env->segs[R_SS].selector, (uint32_t *)&sc->ss);
|
||||
|
||||
cpu_x86_fsave(env, fpstate_addr, 1);
|
||||
cpu_x86_fsave(env, fpstate, sizeof(*fpstate));
|
||||
fpstate->status = fpstate->swd;
|
||||
magic = (fpkind == FPSTATE_FSAVE ? 0 : 0xffff);
|
||||
__put_user(magic, &fpstate->magic);
|
||||
|
@ -702,7 +702,7 @@ static bool frstor_sigcontext(CPUX86State *env, FPStateKind fpkind,
|
|||
* the merge within ENV by loading XSTATE/FXSTATE first, then
|
||||
* overriding with the FSTATE afterward.
|
||||
*/
|
||||
cpu_x86_frstor(env, fpstate_addr, 1);
|
||||
cpu_x86_frstor(env, fpstate, sizeof(*fpstate));
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue