From: David Hildenbrand <david@redhat.com>
To: qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>, Cornelia Huck <cohuck@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1 1/8] s390x/tcg: factor out and fix DATA exception injection
Date: Fri, 24 Aug 2018 10:39:39 +0200 [thread overview]
Message-ID: <35c20d87-b036-151b-d3f7-f9d149b378a5@redhat.com> (raw)
In-Reply-To: <20180822075750.12399-2-david@redhat.com>
On 22.08.2018 09:57, David Hildenbrand wrote:
> The DXC is to be stored in the low core, and only in the FPC in case AFP
> is enabled in CR0.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> target/s390x/cpu.h | 1 +
> target/s390x/excp_helper.c | 28 ++++++++++++++++++++++++++++
> target/s390x/fpu_helper.c | 13 +++----------
> target/s390x/helper.h | 1 +
> target/s390x/tcg_s390x.h | 2 ++
> target/s390x/translate.c | 19 +++++++++----------
> 6 files changed, 44 insertions(+), 20 deletions(-)
>
> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
> index 6f8861e554..5e50c3a303 100644
> --- a/target/s390x/cpu.h
> +++ b/target/s390x/cpu.h
> @@ -322,6 +322,7 @@ extern const struct VMStateDescription vmstate_s390_cpu;
> #define CR0_LOWPROT 0x0000000010000000ULL
> #define CR0_SECONDARY 0x0000000004000000ULL
> #define CR0_EDAT 0x0000000000800000ULL
> +#define CR0_AFP 0x0000000000040000ULL
> #define CR0_EMERGENCY_SIGNAL_SC 0x0000000000004000ULL
> #define CR0_EXTERNAL_CALL_SC 0x0000000000002000ULL
> #define CR0_CKC_SC 0x0000000000000800ULL
> diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
> index f0ce60cff2..f5cab94ec5 100644
> --- a/target/s390x/excp_helper.c
> +++ b/target/s390x/excp_helper.c
> @@ -21,11 +21,13 @@
> #include "qemu/osdep.h"
> #include "cpu.h"
> #include "internal.h"
> +#include "exec/helper-proto.h"
> #include "qemu/timer.h"
> #include "exec/exec-all.h"
> #include "exec/cpu_ldst.h"
> #include "hw/s390x/ioinst.h"
> #include "exec/address-spaces.h"
> +#include "tcg_s390x.h"
> #ifndef CONFIG_USER_ONLY
> #include "sysemu/sysemu.h"
> #include "hw/s390x/s390_flic.h"
> @@ -48,6 +50,32 @@
> do { } while (0)
> #endif
>
> +void QEMU_NORETURN tcg_s390_data_exception(CPUS390XState *env, uint32_t dxc,
> + uintptr_t ra)
> +{
> + CPUState *cs = CPU(s390_env_get_cpu(env));
> +
> + g_assert(!(dxc & ~0xff));
> +#if !defined(CONFIG_USER_ONLY)
> + /* Store the DXC into the lowcore */
> + stw_phys(cs->as, env->psa + offsetof(LowCore, data_exc_code), dxc);
> +#endif
Just tested this, this has to be a stl_phys, then it works correctly
(tested with CRTG)
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2018-08-24 8:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-22 7:57 [Qemu-devel] [PATCH v1 0/8] s390x/tcg: instruction flags and AFP registers David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 1/8] s390x/tcg: factor out and fix DATA exception injection David Hildenbrand
2018-08-22 16:31 ` Richard Henderson
2018-08-22 16:52 ` David Hildenbrand
2018-08-22 17:26 ` David Hildenbrand
2018-08-24 8:39 ` David Hildenbrand [this message]
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 2/8] s390x/tcg: store in the TB flags if AFP is enabled David Hildenbrand
2018-08-22 16:41 ` Richard Henderson
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 3/8] s390x/tcg: support flags for instructions David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 4/8] s390x/tcg: add instruction flags for floating point instructions David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 5/8] s390x/tcg: check for AFP-register, BFP and DFP data exceptions David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 6/8] s390x/tcg: handle privileged instructions via flags David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 7/8] s390x/tcg: fix FP register pair checks David Hildenbrand
2018-08-22 7:57 ` [Qemu-devel] [PATCH v1 8/8] s390x/tcg: refactor specification checking David Hildenbrand
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=35c20d87-b036-151b-d3f7-f9d149b378a5@redhat.com \
--to=david@redhat.com \
--cc=agraf@suse.de \
--cc=cohuck@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.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).