qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: liuzhiwei <zhiwei_liu@c-sky.com>,
	qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: peter.maydell@linaro.org, palmer@sifive.com,
	sagark@eecs.berkeley.edu, kbastian@mail.uni-paderborn.de,
	riku.voipio@iki.fi, laurent@vivier.eu, Alistair.Francis@wdc.com,
	alex.bennee@linaro.org, aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1
Date: Tue, 3 Sep 2019 07:21:10 -0700	[thread overview]
Message-ID: <7eaaf1cf-6e9c-62d1-773a-4ad09a404877@linaro.org> (raw)
In-Reply-To: <39fe5b33-86b1-cb42-9733-5d8e1ea08127@c-sky.com>

On 9/2/19 2:43 AM, liuzhiwei wrote:
>> This is most definitely not the correct way to implement first-fault.
>>
>> You need to have a look at target/arm/sve_helper.c, e.g. sve_ldff1_r,
>> where we test pages for validity with tlb_vaddr_to_host.
> Why should  test pages for validity? If there is a page fault in running time,
> it just the case why it must use the fault-only-first instruction.

So that the helper does not fault for the Nth access, N > 1.

You test to see if the page has a mapping, and if it doesn't,
you end the instruction, without going through the exception
path that I have objections to.

Except for gather loads, you don't have to test for every
access, only at page boundaries.  And then you may also arrange
to use direct host access to the pages that you've validated.

Again, have a look at sve_ldff1_r.

> A single array is a good idea. But vreg[] will be better for understanding as it preserve the register concepts. 

A function access to the registers would be just as good for that.


r~


  reply	other threads:[~2019-09-03 14:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1566959818-38369-1-git-send-email-zhiwei_liu@c-sky.com>
2019-08-28  9:08 ` [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1 Alex Bennée
2019-08-28 16:39   ` Richard Henderson
2019-08-29 13:35   ` liuzhiwei
2019-08-28 18:54 ` Richard Henderson
2019-08-28 20:43   ` Richard Henderson
2019-08-29 12:45     ` liuzhiwei
2019-08-29 15:09       ` Richard Henderson
2019-09-02  7:45         ` liuzhiwei
2019-09-03 14:38           ` Richard Henderson
2019-09-02  9:43   ` liuzhiwei
2019-09-03 14:21     ` Richard Henderson [this message]
2019-12-19  9:11   ` LIU Zhiwei
2019-12-19 20:38     ` Richard Henderson
2019-12-25  9:36       ` LIU Zhiwei
2019-12-28  1:14         ` Richard Henderson
2019-12-30  8:11           ` LIU Zhiwei
2020-01-05 20:19             ` Richard Henderson
2019-08-28 21:34 ` Alistair Francis
2019-08-29 12:00   ` liuzhiwei
2019-08-29 15:14     ` Richard Henderson
2019-09-02  6:54       ` liuzhiwei
2019-08-29 21:50     ` Alistair Francis
2019-08-30  9:06       ` Alex Bennée
2019-08-30 18:39         ` Alistair Francis
2019-09-02  6:36       ` liuzhiwei
     [not found] ` <CAL1e-=iHangj7w+HgJ+FM=iqRLmaY-_CYeUv0gx+c8bpScb9RQ@mail.gmail.com>
     [not found]   ` <46ade3da-d642-bd19-7975-7dc228d401e4@c-sky.com>
2019-08-29 18:32     ` Aleksandar Markovic
     [not found] ` <CAEiOBXXofjrY2=sjuMDb9dTV2fk9yUVKnr+qmf+7mg9vki6OCw@mail.gmail.com>
2019-09-02  8:17   ` [Qemu-devel] [Qemu-riscv] " liuzhiwei

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=7eaaf1cf-6e9c-62d1-773a-4ad09a404877@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=Alistair.Francis@wdc.com \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=laurent@vivier.eu \
    --cc=palmer@sifive.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=sagark@eecs.berkeley.edu \
    --cc=zhiwei_liu@c-sky.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).