qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Michal Marek <mmarek@suse.com>,
	Richard Henderson <rth@twiddle.net>,
	Alexander Graf <agraf@suse.de>
Cc: Eric Bischoff <ebischoff@suse.com>,
	Miroslav Benes <mbenes@suse.cz>,
	qemu-devel@nongnu.org, David Hildenbrand <david@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3] target-s390x: Implement stfl and stfle
Date: Mon, 27 Feb 2017 08:30:16 +0100	[thread overview]
Message-ID: <ae4dba44-c634-062c-d412-201d1f10be32@redhat.com> (raw)
In-Reply-To: <f0b31c30-6b3e-fe9e-5f60-7a117456b595@suse.com>

On 26.02.2017 19:57, Michal Marek wrote:
> Dne 26.2.2017 v 12:22 Thomas Huth napsal(a):
>> On 26.02.2017 00:38, Michal Marek wrote:
>>> The implementation is partially cargo cult based, but it works for the
>>> linux kernel use case.
>>>
>>> Signed-off-by: Michal Marek <mmarek@suse.com>
>>> ---
>>> v3:
>>>  - Initialize the buffer in do_stfle()
>>> v2:
>>>  - STFLE is not a privileged instruction, go through the MMU to store the
>>>    result
>>>  - annotate the stfl helper with TCG_CALL_NO_RWG
>>>  - Use a large enough buffer to hold the feature bitmap
>>>  - Fix coding style of the stfle helper
>>> ---
>>>  target/s390x/cpu_features.c |  6 ++++--
>>>  target/s390x/cpu_features.h |  2 +-
>>>  target/s390x/helper.h       |  2 ++
>>>  target/s390x/insn-data.def  |  2 ++
>>>  target/s390x/misc_helper.c  | 36 ++++++++++++++++++++++++++++++++++++
>>>  target/s390x/translate.c    | 17 +++++++++--------
>>>  6 files changed, 54 insertions(+), 11 deletions(-)
[...]
>>> +uint64_t HELPER(stfle)(CPUS390XState *env, uint64_t a0, uint64_t r0)
>>> +{
>>> +    int need, len = r0 & 0xff;
>>
>> According to the POP spec, the address "must be designated on a
>> doubleword boundary; otherwise, a specification exception is recognized."
>> Could you please add this check here (or in translate.c)?
> 
> Dumb question, but how do I signal a specification exception?
> s390_cpu_do_interrupt() does not seem to be prepared for it.

Not sure, but I think something like

 program_interrupt(env, PGM_SPECIFICATION, 4);

should do the job here.

 Thomas

  reply	other threads:[~2017-02-27  7:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 13:44 [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle Michal Marek
2017-02-24 14:51 ` no-reply
2017-02-24 15:22   ` Michal Marek
2017-02-24 16:28     ` David Hildenbrand
2017-02-25  0:05 ` Richard Henderson
2017-02-25 20:39   ` Michal Marek
2017-02-25 23:30     ` Michal Marek
2017-02-25 23:16   ` [Qemu-devel] [PATCH v2] " Michal Marek
2017-02-25 23:38     ` [Qemu-devel] [PATCH v3] " Michal Marek
2017-02-26 11:22       ` Thomas Huth
2017-02-26 18:57         ` Michal Marek
2017-02-27  7:30           ` Thomas Huth [this message]
2017-02-27 10:18         ` [Qemu-devel] [PATCH v4] " Michal Marek
2017-02-28 22:11           ` Richard Henderson
2017-03-01  8:00             ` Thomas Huth
2017-03-01 19:30               ` Richard Henderson
2017-03-01 20:20                 ` Thomas Huth
2017-03-02 13:09                 ` David Hildenbrand
2017-03-02 10:53             ` Michal Marek
2017-03-02 13:12               ` 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=ae4dba44-c634-062c-d412-201d1f10be32@redhat.com \
    --to=thuth@redhat.com \
    --cc=agraf@suse.de \
    --cc=david@redhat.com \
    --cc=ebischoff@suse.com \
    --cc=mbenes@suse.cz \
    --cc=mmarek@suse.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).