From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Zhuojia Shen <chaosdefinition@hotmail.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-arm@nongnu.org
Subject: Re: [PATCH v4 1/2] target/arm: allow DC CVA[D]P in user mode emulation
Date: Fri, 2 Jun 2023 12:27:22 +0200 [thread overview]
Message-ID: <a48e823c-38ea-d5a3-af67-dc93dd6507ff@linaro.org> (raw)
In-Reply-To: <DS7PR12MB6309408A6BB4A469862CCA34AC49A@DS7PR12MB6309.namprd12.prod.outlook.com>
On 2/6/23 00:11, Zhuojia Shen wrote:
> DC CVAP and DC CVADP instructions can be executed in EL0 on Linux,
> either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see
> user_cache_maint_handler() in arch/arm64/kernel/traps.c).
>
> This patch enables execution of the two instructions in user mode
> emulation.
>
> Signed-off-by: Zhuojia Shen <chaosdefinition@hotmail.com>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/helper.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
> -#ifndef CONFIG_USER_ONLY
> static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque,
> uint64_t value)
> {
> @@ -7420,6 +7419,7 @@ static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque,
> /* This won't be crossing page boundaries */
> haddr = probe_read(env, vaddr, dline_size, mem_idx, GETPC());
> if (haddr) {
> +#ifndef CONFIG_USER_ONLY
This ifdef'ry placement is odd. Is it to silent a
unused-but-set-variable warning?
> ram_addr_t offset;
> MemoryRegion *mr;
> @@ -7430,6 +7430,7 @@ static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque,
> if (mr) {
> memory_region_writeback(mr, offset, dline_size);
> }
> +#endif /*CONFIG_USER_ONLY*/
> }
> }
>
> @@ -7448,7 +7449,6 @@ static const ARMCPRegInfo dcpodp_reg[] = {
> .fgt = FGT_DCCVADP,
> .accessfn = aa64_cacheop_poc_access, .writefn = dccvap_writefn },
> };
> -#endif /*CONFIG_USER_ONLY*/
next prev parent reply other threads:[~2023-06-02 10:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 21:53 [PATCH v4 0/2] target/arm: allow DC CVA[D]P in user mode emulation Zhuojia Shen
2023-06-01 22:11 ` [PATCH v4 1/2] " Zhuojia Shen
2023-06-02 10:27 ` Philippe Mathieu-Daudé [this message]
2023-06-02 17:11 ` Zhuojia Shen
[not found] ` <20230601221158.48705-1-chaosdefinition@hotmail.com>
2023-06-01 22:11 ` [PATCH v4 2/2] tests/tcg/aarch64: add DC CVA[D]P tests Zhuojia Shen
2023-06-01 22:34 ` Zhuojia Shen
2023-06-03 3:32 ` [PATCH v4 0/2] target/arm: allow DC CVA[D]P in user mode emulation Richard Henderson
2023-06-05 16:01 ` Peter Maydell
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=a48e823c-38ea-d5a3-af67-dc93dd6507ff@linaro.org \
--to=philmd@linaro.org \
--cc=chaosdefinition@hotmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).