[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [qemu-s390x] [PATCH v3 7/9] s390x/tcg: handle privilege
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [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
- Re: [Qemu-devel] [qemu-s390x] [PATCH v3 2/9] s390x/tcg: factor out and fix DATA exception injection, (continued)
- [Qemu-devel] [PATCH v3 3/9] s390x/tcg: store in the TB flags if AFP is enabled, David Hildenbrand, 2018/09/17
- [Qemu-devel] [PATCH v3 4/9] s390x/tcg: support flags for instructions, David Hildenbrand, 2018/09/17
- [Qemu-devel] [PATCH v3 5/9] s390x/tcg: add instruction flags for floating point instructions, David Hildenbrand, 2018/09/17
- [Qemu-devel] [PATCH v3 6/9] s390x/tcg: check for AFP-register, BFP and DFP data exceptions, David Hildenbrand, 2018/09/17
- [Qemu-devel] [PATCH v3 7/9] s390x/tcg: handle privileged instructions via flags, David Hildenbrand, 2018/09/17
- Re: [Qemu-devel] [qemu-s390x] [PATCH v3 7/9] s390x/tcg: handle privileged instructions via flags,
Thomas Huth <=
- [Qemu-devel] [PATCH v3 8/9] s390x/tcg: fix FP register pair checks, David Hildenbrand, 2018/09/17
- [Qemu-devel] [PATCH v3 9/9] s390x/tcg: refactor specification checking, David Hildenbrand, 2018/09/17