[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 35/37] linux-user: i386/signal: move fpstate at the end of the 32-
From: |
Paolo Bonzini |
Subject: |
[PULL 35/37] linux-user: i386/signal: move fpstate at the end of the 32-bit frames |
Date: |
Tue, 11 Oct 2022 12:26:58 +0200 |
Recent versions of Linux moved the 32-bit fpstate towards the end of the
frame, so that the variable-sized xsave data does not overwrite the
(ABI-defined) extramask[] field. Follow suit in QEMU.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
linux-user/i386/signal.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
index 4372621a4d..76317a3d16 100644
--- a/linux-user/i386/signal.c
+++ b/linux-user/i386/signal.c
@@ -163,9 +163,16 @@ struct sigframe {
abi_ulong pretcode;
int sig;
struct target_sigcontext sc;
- struct target_fpstate fpstate;
+ /*
+ * The actual fpstate is placed after retcode[] below, to make
+ * room for the variable-sized xsave data. The older unused fpstate
+ * has to be kept to avoid changing the offset of extramask[], which
+ * is part of the ABI.
+ */
+ struct target_fpstate fpstate_unused;
abi_ulong extramask[TARGET_NSIG_WORDS-1];
char retcode[8];
+ struct target_fpstate fpstate;
};
struct rt_sigframe {
@@ -175,8 +182,8 @@ struct rt_sigframe {
abi_ulong puc;
struct target_siginfo info;
struct target_ucontext uc;
- struct target_fpstate fpstate;
char retcode[8];
+ struct target_fpstate fpstate;
};
#else
--
2.37.3
- [PULL 23/37] target/i386: Use gen_jmp_rel for loop, repz, jecxz insns, (continued)
- [PULL 23/37] target/i386: Use gen_jmp_rel for loop, repz, jecxz insns, Paolo Bonzini, 2022/10/11
- [PULL 24/37] target/i386: Use gen_jmp_rel for gen_jcc, Paolo Bonzini, 2022/10/11
- [PULL 25/37] target/i386: Use gen_jmp_rel for DISAS_TOO_MANY, Paolo Bonzini, 2022/10/11
- [PULL 27/37] target/i386: Merge gen_jmp_tb and gen_goto_tb into gen_jmp_rel, Paolo Bonzini, 2022/10/11
- [PULL 29/37] target/i386: Add cpu_eip, Paolo Bonzini, 2022/10/11
- [PULL 26/37] target/i386: Remove MemOp argument to gen_op_j*_ecx, Paolo Bonzini, 2022/10/11
- [PULL 30/37] target/i386: Inline gen_jmp_im, Paolo Bonzini, 2022/10/11
- [PULL 28/37] target/i386: Create eip_cur_tl, Paolo Bonzini, 2022/10/11
- [PULL 31/37] target/i386: Enable TARGET_TB_PCREL, Paolo Bonzini, 2022/10/11
- [PULL 32/37] x86: Implement MSR_CORE_THREAD_COUNT MSR, Paolo Bonzini, 2022/10/11
- [PULL 35/37] linux-user: i386/signal: move fpstate at the end of the 32-bit frames,
Paolo Bonzini <=
- [PULL 33/37] i386: kvm: Add support for MSR filtering, Paolo Bonzini, 2022/10/11
- [PULL 36/37] linux-user: i386/signal: support FXSAVE fpstate on 32-bit emulation, Paolo Bonzini, 2022/10/11
- [PULL 34/37] KVM: x86: Implement MSR_CORE_THREAD_COUNT MSR, Paolo Bonzini, 2022/10/11
- [PULL 37/37] linux-user: i386/signal: support XSAVE/XRSTOR for signal frame fpstate, Paolo Bonzini, 2022/10/11
- Re: [PULL 00/37] SCSI, i386 patches for 2022-10-11, Stefan Hajnoczi, 2022/10/13