[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v25 14/20] i386: separate fpu_helper into user and sysemu par
From: |
Richard Henderson |
Subject: |
Re: [PATCH v25 14/20] i386: separate fpu_helper into user and sysemu parts |
Date: |
Fri, 26 Feb 2021 10:42:51 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 2/26/21 9:51 AM, Claudio Fontana wrote:
> +/* fpu_helper.c */
> +
> +void do_fsave(CPUX86State *env, target_ulong ptr, int data32, uintptr_t ra);
> +void do_frstor(CPUX86State *env, target_ulong ptr, int data32, uintptr_t ra);
> +void do_fxsave(CPUX86State *env, target_ulong ptr, uintptr_t ra);
> +void do_fxrstor(CPUX86State *env, target_ulong ptr, uintptr_t ra);
Is this really worth it? It means that we unnecessarily expose these functions
in system mode, where they are still not safe.
I had thought about doing something like
#ifdef CONFIG_USER_ONLY
#define SYSEMU_STATIC
#else
#define SYSEMU_STATIC static
#endif
SYSEMU_STATIC void
cpu_x86_fsave(...)
{
...
}
void helper_fsave(...)
{
cpu_x86_fsave(..., GETPC());
}
but I thought the existing example of "do_" functions within that file to be
compelling. I think small sections of this CONFIG within a file should be
fine, especially where it interacts with other functions like this.
I guess either way,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- [PATCH v25 09/20] i386: split off sysemu-only functionality in tcg-cpu, (continued)
- [PATCH v25 09/20] i386: split off sysemu-only functionality in tcg-cpu, Claudio Fontana, 2021/02/26
- [PATCH v25 13/20] i386: split misc helper user stubs and sysemu part, Claudio Fontana, 2021/02/26
- [PATCH v25 15/20] i386: split svm_helper into sysemu and stub-only user, Claudio Fontana, 2021/02/26
- [PATCH v25 16/20] i386: split seg_helper into user-only and sysemu parts, Claudio Fontana, 2021/02/26
- [PATCH v25 11/20] i386: split tcg excp_helper into sysemu and user parts, Claudio Fontana, 2021/02/26
- [PATCH v25 17/20] i386: split off sysemu part of cpu.c, Claudio Fontana, 2021/02/26
- [PATCH v25 19/20] target/i386: gdbstub: only write CR0/CR2/CR3/EFER for sysemu, Claudio Fontana, 2021/02/26
- [PATCH v25 12/20] i386: move TCG bpt_helper into sysemu/, Claudio Fontana, 2021/02/26
- [PATCH v25 14/20] i386: separate fpu_helper into user and sysemu parts, Claudio Fontana, 2021/02/26
- Re: [PATCH v25 14/20] i386: separate fpu_helper into user and sysemu parts,
Richard Henderson <=
- [PATCH v25 18/20] target/i386: gdbstub: introduce aux functions to read/write CS64 regs, Claudio Fontana, 2021/02/26
- [PATCH v25 20/20] i386: make cpu_load_efer sysemu-only, Claudio Fontana, 2021/02/26
- Re: [PATCH v25 00/20] i386 cleanup PART 2, no-reply, 2021/02/26