From: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
bmeng@tinylab.org, liweiwei@iscas.ac.cn,
zhiwei_liu@linux.alibaba.com,
Christoph Muellner <cmuellner@linux.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>
Subject: Re: [PATCH v6 2/4] target/riscv: implement Zicboz extension
Date: Wed, 22 Feb 2023 06:37:17 -0300 [thread overview]
Message-ID: <4247ca1b-aa4c-9494-e634-c8114758bfcd@ventanamicro.com> (raw)
In-Reply-To: <4e3ac25e-6443-9365-66e4-ebd903aa29b9@linaro.org>
On 2/18/23 16:35, Richard Henderson wrote:
> On 2/17/23 23:28, Daniel Henrique Barboza wrote:
>> "A cache-block zero instruction is permitted to access the specified cache block whenever
>> a store instruction is permitted to access the corresponding physical addresses and when
>> the PMAs indicate that cache-block zero instructions are a supported access type. If access
>> to the cache block is not permitted, a cache-block zero instruction raises a store page fault
>> or store guest-page fault exception if address translation does not permit write access or
>> raises a store access fault exception otherwise. During address translation, the instruction
>> also checks the accessed and dirty bits and may either raise an exception or set the bits as
>> required."
>
> By the way, I think the documentation should specify what happens if the page is *not* accessible. Is badaddr = {rN, aligned(rN), unspecified, but somewhere in the block}?
>
Do you mean that the doc should tell whether the address to be returned in the store
access fault should be aligned and whatnot?
Yeah, this is not mentioned in the docs. I think you're wondering if we should do like
ARM does, like you're mentioned in the previous version:
=======
While re-reading the ARM code, I remembered that the ARM dc.zva instruction is required
to produce original unmasked address on a page fault, thus the little dance with two
calls to probe_write.
=======
By reading target/riscv code it seems that all store acess faults are being fired via
raise_mmu_exception(), which is only called in riscv_cpu_tlb_fill(), which in turn
doesn't do any thing special with the address before firing the exception. So I guess
we can assume that badddr = aligned?
Daniel
>
> r~
next prev parent reply other threads:[~2023-02-22 9:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 20:34 [PATCH v6 0/4] riscv: Add support for Zicbo[m,z,p] instructions Daniel Henrique Barboza
2023-02-17 20:34 ` [PATCH v6 1/4] accel/tcg: Add probe_access_range_flags interface Daniel Henrique Barboza
2023-02-17 20:34 ` [PATCH v6 2/4] target/riscv: implement Zicboz extension Daniel Henrique Barboza
2023-02-18 3:44 ` Richard Henderson
2023-02-18 9:28 ` Daniel Henrique Barboza
2023-02-18 19:35 ` Richard Henderson
2023-02-22 9:37 ` Daniel Henrique Barboza [this message]
2023-02-22 17:59 ` Richard Henderson
2023-02-18 13:20 ` weiwei
2023-02-17 20:34 ` [PATCH v6 3/4] target/riscv: implement Zicbom extension Daniel Henrique Barboza
2023-02-18 3:46 ` Richard Henderson
2023-02-17 20:34 ` [PATCH v6 4/4] target/riscv: add Zicbop cbo.prefetch{i, r, m} placeholder Daniel Henrique Barboza
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=4247ca1b-aa4c-9494-e634-c8114758bfcd@ventanamicro.com \
--to=dbarboza@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=bmeng@tinylab.org \
--cc=cmuellner@linux.com \
--cc=liweiwei@iscas.ac.cn \
--cc=philipp.tomsich@vrull.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhiwei_liu@linux.alibaba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.