qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [PATCH v3 7/9] s390x/tcg: handle privileged instruction


From: Thomas Huth
Subject: Re: [qemu-s390x] [PATCH v3 7/9] s390x/tcg: handle privileged instructions via flags
Date: Thu, 27 Sep 2018 13:24:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-09-17 11:34, David Hildenbrand wrote:
> Let's check this also at a central place.
> 
> Reviewed-by: Richard Henderson <address@hidden>
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
>  target/s390x/insn-data.def | 138 ++++++++++++++++++-------------------
>  target/s390x/translate.c   |  83 ++--------------------
>  2 files changed, 76 insertions(+), 145 deletions(-)
[...]
> diff --git a/target/s390x/translate.c b/target/s390x/translate.c
> index a0c834ebb9..f9a78c4304 100644
> --- a/target/s390x/translate.c
> +++ b/target/s390x/translate.c
> @@ -320,15 +320,6 @@ static inline void gen_trap(DisasContext *s)
>      gen_data_exception(0xff);
>  }
>  
> -#ifndef CONFIG_USER_ONLY
> -static void check_privileged(DisasContext *s)
> -{
> -    if (s->base.tb->flags & FLAG_MASK_PSTATE) {
> -        gen_program_exception(s, PGM_PRIVILEGED);
> -    }
> -}
> -#endif
> -
>  static TCGv_i64 get_address(DisasContext *s, int x2, int b2, int d2)
>  {
>      TCGv_i64 tmp = tcg_temp_new_i64();
> @@ -1119,6 +1110,7 @@ typedef struct {
>  #define IF_HFP3     0x0004      /* r3 points at fp reg for HFP instructions 
> */
>  #define IF_BFP      0x0008      /* binary floating point instruction */
>  #define IF_DFP      0x0010      /* decimal floating point instruction */
> +#define IF_PRIV     0x0020      /* priviledged instruction */

s/priviledged/privileged/

Apart from that nit, sounds like a good idea to me! (but I did not check
each and every instruction here, so no Reviewed-by yet)

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]