[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/28] linux-user/i386: Remove xfeatures from target_fpstate_f
From: |
Richard Henderson |
Subject: |
[PATCH v3 16/28] linux-user/i386: Remove xfeatures from target_fpstate_fxsave |
Date: |
Wed, 15 May 2024 17:08:25 +0200 |
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>
---
linux-user/i386/signal.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c
index 89048ed069..f8064691c4 100644
--- a/linux-user/i386/signal.c
+++ b/linux-user/i386/signal.c
@@ -67,7 +67,6 @@ struct target_fpstate_fxsave {
uint32_t xmm_space[64];
uint32_t hw_reserved[12];
struct target_fpx_sw_bytes sw_reserved;
- uint8_t xfeatures[];
};
#define TARGET_FXSAVE_SIZE sizeof(struct target_fpstate_fxsave)
QEMU_BUILD_BUG_ON(TARGET_FXSAVE_SIZE != 512);
@@ -266,7 +265,7 @@ static void xsave_sigcontext(CPUX86State *env, struct
target_fpstate_fxsave *fxs
assert(!(fxsave_addr & 0x3f));
/* Zero the header, XSAVE *adds* features to an existing save state.
*/
- memset(fxsave->xfeatures, 0, 64);
+ memset(fxsave + 1, 0, sizeof(X86XSaveHeader));
cpu_x86_xsave(env, fxsave_addr, -1);
__put_user(TARGET_FP_XSTATE_MAGIC1, &fxsave->sw_reserved.magic1);
__put_user(extended_size, &fxsave->sw_reserved.extended_size);
--
2.34.1
- [PATCH v3 17/28] linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea, (continued)
- [PATCH v3 17/28] linux-user/i386: Replace target_fpstate_fxsave with X86LegacyXSaveArea, Richard Henderson, 2024/05/15
- [PATCH v3 20/28] linux-user/i386: Return boolean success from restore_sigcontext, Richard Henderson, 2024/05/15
- [PATCH v3 19/28] linux-user/i386: Fix -mregparm=3 for signal delivery, Richard Henderson, 2024/05/15
- [PATCH v3 26/28] target/i386: Pass host pointer and size to cpu_x86_{fsave, frstor}, Richard Henderson, 2024/05/15
- [PATCH v3 28/28] target/i386: Pass host pointer and size to cpu_x86_{xsave, xrstor}, Richard Henderson, 2024/05/15
- [PATCH v3 23/28] target/i386: Honor xfeatures in xrstor_sigcontext, Richard Henderson, 2024/05/15
- [PATCH v3 18/28] linux-user/i386: Split out struct target_fregs_state, Richard Henderson, 2024/05/15
- [PATCH v3 22/28] linux-user/i386: Fix allocation and alignment of fp state, Richard Henderson, 2024/05/15
- [PATCH v3 25/28] target/i386: Convert do_xrstor to X86Access, Richard Henderson, 2024/05/15
- [PATCH v3 24/28] target/i386: Convert do_xsave to X86Access, Richard Henderson, 2024/05/15
- [PATCH v3 16/28] linux-user/i386: Remove xfeatures from target_fpstate_fxsave,
Richard Henderson <=
- [PATCH v3 21/28] linux-user/i386: Return boolean success from xrstor_sigcontext, Richard Henderson, 2024/05/15
- [PATCH v3 27/28] target/i386: Pass host pointer and size to cpu_x86_{fxsave, fxrstor}, Richard Henderson, 2024/05/15