qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: ruixin.bao@ibm.com, jonathan.albrecht@linux.vnet.ibm.com,
	cohuck@redhat.com, qemu-s390x@nongnu.org
Subject: Re: [PATCH 3/5] target/s390x: Improve s390_cpu_dump_state vs cc_op
Date: Tue, 15 Jun 2021 09:51:12 +0200	[thread overview]
Message-ID: <981545c6-4804-6e8f-1f96-306fcd653cf7@redhat.com> (raw)
In-Reply-To: <20210615030744.1252385-4-richard.henderson@linaro.org>

On 15.06.21 05:07, Richard Henderson wrote:
> Use s390_cpu_get_psw_mask so that we print the correct
> architectural value of psw.mask.  Do not print cc_op
> unless tcg_enabled.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/s390x/helper.c | 12 +++++++-----
>   1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/target/s390x/helper.c b/target/s390x/helper.c
> index 559fc3573f..1445b74451 100644
> --- a/target/s390x/helper.c
> +++ b/target/s390x/helper.c
> @@ -338,12 +338,14 @@ void s390_cpu_dump_state(CPUState *cs, FILE *f, int flags)
>       CPUS390XState *env = &cpu->env;
>       int i;
>   
> -    if (env->cc_op > 3) {
> -        qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %15s\n",
> -                     env->psw.mask, env->psw.addr, cc_name(env->cc_op));
> +    qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64,
> +                 s390_cpu_get_psw_mask(env), env->psw.addr);
> +    if (!tcg_enabled()) {
> +        qemu_fprintf(f, "\n");
> +    } else if (env->cc_op > 3) {
> +        qemu_fprintf(f, " cc %15s\n", cc_name(env->cc_op));
>       } else {
> -        qemu_fprintf(f, "PSW=mask %016" PRIx64 " addr %016" PRIx64 " cc %02x\n",
> -                     env->psw.mask, env->psw.addr, env->cc_op);
> +        qemu_fprintf(f, " cc %02x\n", env->cc_op);
>       }

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2021-06-15  7:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15  3:07 [PATCH 0/5] linux-user/s390x: Fix psw.mask handling in signals Richard Henderson
2021-06-15  3:07 ` [PATCH 1/5] target/s390x: Expose load_psw and get_psw_mask to cpu.h Richard Henderson
2021-06-15  7:47   ` David Hildenbrand
2021-06-15  8:57   ` Alex Bennée
2021-06-15  3:07 ` [PATCH 2/5] target/s390x: Do not modify cpu state in s390_cpu_get_psw_mask Richard Henderson
2021-06-15  7:49   ` David Hildenbrand
2021-06-15  3:07 ` [PATCH 3/5] target/s390x: Improve s390_cpu_dump_state vs cc_op Richard Henderson
2021-06-15  7:51   ` David Hildenbrand [this message]
2021-06-15  3:07 ` [PATCH 4/5] target/s390x: Use s390_cpu_{set_psw, get_psw_mask} in gdbstub Richard Henderson
2021-06-15  7:52   ` David Hildenbrand
2021-06-15  3:07 ` [PATCH 5/5] linux-user/s390x: Save and restore psw.mask properly Richard Henderson
2021-06-15  7:59   ` David Hildenbrand
2021-06-15  9:02 ` [PATCH 0/5] linux-user/s390x: Fix psw.mask handling in signals Christian Borntraeger
2021-06-16 15:00   ` Cornelia Huck
2021-06-15  9:27 ` Alex Bennée
2021-06-15  9:51   ` Alex Bennée
2021-06-16 10:38   ` Cornelia Huck
2021-06-16 14:48     ` Richard Henderson
2021-06-16 14:59       ` Cornelia Huck
2021-06-15 18:03 ` jonathan.albrecht
2021-06-16 15:01   ` Cornelia Huck
2021-06-16 15:22     ` jonathan.albrecht
2021-06-17  8:33 ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=981545c6-4804-6e8f-1f96-306fcd653cf7@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jonathan.albrecht@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=ruixin.bao@ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).