From: Michal Marek <mmarek@suse.com>
To: Richard Henderson <rth@twiddle.net>, Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org, Miroslav Benes <mbenes@suse.cz>,
Eric Bischoff <ebischoff@suse.com>
Subject: Re: [Qemu-devel] [PATCH] target-s390x: Implement stfl and stfle
Date: Sat, 25 Feb 2017 21:39:51 +0100 [thread overview]
Message-ID: <a76250b9-ec10-1444-03aa-00ffb8c17fda@suse.com> (raw)
In-Reply-To: <a634716c-c998-c422-6802-946a283f8837@twiddle.net>
Dne 25.2.2017 v 01:05 Richard Henderson napsal(a):
> On 02/25/2017 12:44 AM, Michal Marek wrote:
>> +DEF_HELPER_1(stfl, void, env)
>
> DEF_HELPER_FLAGS_1(stfl, TCG_CALL_NO_RWG, void, env)
>
> since this touches no registers, and only writes to lomem which afaik
> cannot fault in kernel mode.
OK.
>> +static int do_stfle(CPUS390XState *env, uint64_t addr, int len)
>> +{
>> + S390CPU *cpu = s390_env_get_cpu(env);
>> + uint8_t data[64];
>
> S390FeatBitmap or S390FeatInit? Or even a sizeof?
> Hard coding 64 certainly doesn't seem right.
I will change it to something more sensible.
>> + memset(data, 0, sizeof(data));
>> + res = s390_fill_feat_block(cpu->model->features,
>> S390_FEAT_TYPE_STFL, data);
>> + cpu_physical_memory_write(addr, data, MIN(res, len));
>
> No, not physical memory, you need to write to virtual memory, at least
> for STFLE. Which, as you'll recall can be used from user-mode.
Oh, I did not realize that STFLE is not a privileged instruction.
Thanks for the review!
Michal
next prev parent reply other threads:[~2017-02-25 20:40 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 [this message]
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
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=a76250b9-ec10-1444-03aa-00ffb8c17fda@suse.com \
--to=mmarek@suse.com \
--cc=agraf@suse.de \
--cc=ebischoff@suse.com \
--cc=mbenes@suse.cz \
--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).