diff mbox series

[1/3] target/i386: Renumber EXCP_SYSCALL

Message ID 20200114210921.11216-2-richard.henderson@linaro.org
State New
Headers show
Series linux-user: Implement x86_64 vsyscalls | expand

Commit Message

Richard Henderson Jan. 14, 2020, 9:09 p.m. UTC
We are not short of numbers for EXCP_*.  There is no need to confuse things
by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is
only used for system mode and the latter is only used for user mode.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/i386/cpu.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 15, 2020, 7:22 a.m. UTC | #1
On 1/14/20 10:09 PM, Richard Henderson wrote:
> We are not short of numbers for EXCP_*.  There is no need to confuse things
> by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is
> only used for system mode and the latter is only used for user mode.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/i386/cpu.h | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 594326a794..164d038d1f 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -998,9 +998,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
>   #define EXCP11_ALGN	17
>   #define EXCP12_MCHK	18
>   
> -#define EXCP_SYSCALL    0x100 /* only happens in user only emulation
> -                                 for syscall instruction */
> -#define EXCP_VMEXIT     0x100
> +#define EXCP_VMEXIT     0x100 /* only for system emulation */
> +#define EXCP_SYSCALL    0x101 /* only for user emulation */
>   
>   /* i386-specific interrupt pending bits.  */
>   #define CPU_INTERRUPT_POLL      CPU_INTERRUPT_TGT_EXT_1
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Alex Bennée Jan. 15, 2020, 9:55 a.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> We are not short of numbers for EXCP_*.  There is no need to confuse things
> by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is
> only used for system mode and the latter is only used for user mode.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  target/i386/cpu.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 594326a794..164d038d1f 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -998,9 +998,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
>  #define EXCP11_ALGN	17
>  #define EXCP12_MCHK	18
>  
> -#define EXCP_SYSCALL    0x100 /* only happens in user only emulation
> -                                 for syscall instruction */
> -#define EXCP_VMEXIT     0x100
> +#define EXCP_VMEXIT     0x100 /* only for system emulation */
> +#define EXCP_SYSCALL    0x101 /* only for user emulation */
>  
>  /* i386-specific interrupt pending bits.  */
>  #define CPU_INTERRUPT_POLL      CPU_INTERRUPT_TGT_EXT_1
diff mbox series

Patch

diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 594326a794..164d038d1f 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -998,9 +998,8 @@  typedef uint64_t FeatureWordArray[FEATURE_WORDS];
 #define EXCP11_ALGN	17
 #define EXCP12_MCHK	18
 
-#define EXCP_SYSCALL    0x100 /* only happens in user only emulation
-                                 for syscall instruction */
-#define EXCP_VMEXIT     0x100
+#define EXCP_VMEXIT     0x100 /* only for system emulation */
+#define EXCP_SYSCALL    0x101 /* only for user emulation */
 
 /* i386-specific interrupt pending bits.  */
 #define CPU_INTERRUPT_POLL      CPU_INTERRUPT_TGT_EXT_1