From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: peter.maydell@linaro.org, richard.henderson@linaro.org,
"Beata Michalska" <beata.michalska@linaro.org>,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Cc: quintela@redhat.com, dgilbert@redhat.com,
shameerali.kolothum.thodi@huawei.com, eric.auger@redhat.com,
qemu-arm@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH v2 4/4] target/arm: Add support for DC CVAP & DC CVADP ins
Date: Tue, 28 Nov 2023 12:24:02 +0100 [thread overview]
Message-ID: <95cc7c22-939f-4ce0-aecd-d0ff7b0e7c9c@linaro.org> (raw)
In-Reply-To: <20191105234100.22052-5-beata.michalska@linaro.org>
Hi,
On 6/11/19 00:41, Beata Michalska wrote:
> ARMv8.2 introduced support for Data Cache Clean instructions
> to PoP (point-of-persistence) - DC CVAP and PoDP (point-of-deep-persistence)
> - DV CVADP. Both specify conceptual points in a memory system where all writes
> that are to reach them are considered persistent.
> The support provided considers both to be actually the same so there is no
> distinction between the two. If none is available (there is no backing store
> for given memory) both will result in Data Cache Clean up to the point of
> coherency. Otherwise sync for the specified range shall be performed.
>
> Signed-off-by: Beata Michalska <beata.michalska@linaro.org>
> ---
> linux-user/elfload.c | 2 ++
> target/arm/cpu.h | 10 ++++++++++
> target/arm/cpu64.c | 1 +
> target/arm/helper.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 69 insertions(+)
> +#ifndef CONFIG_USER_ONLY
> +static void dccvap_writefn(CPUARMState *env, const ARMCPRegInfo *opaque,
> + uint64_t value)
> +{
> + ARMCPU *cpu = env_archcpu(env);
> + /* CTR_EL0 System register -> DminLine, bits [19:16] */
> + uint64_t dline_size = 4 << ((cpu->ctr >> 16) & 0xF);
> + uint64_t vaddr_in = (uint64_t) value;
> + uint64_t vaddr = vaddr_in & ~(dline_size - 1);
> + void *haddr;
> + int mem_idx = cpu_mmu_index(env, false);
> +
> + /* This won't be crossing page boundaries */
> + haddr = probe_read(env, vaddr, dline_size, mem_idx, GETPC());
> + if (haddr) {
> +
> + ram_addr_t offset;
> + MemoryRegion *mr;
> +
> + /* RCU lock is already being held */
> + mr = memory_region_from_host(haddr, &offset);
> +
> + if (mr) {
> + memory_region_do_writeback(mr, offset, dline_size);
> + }
> + }
> +}
> +#ifndef CONFIG_USER_ONLY
> + /* Data Cache clean instructions up to PoP */
> + if (cpu_isar_feature(aa64_dcpop, cpu)) {
Am I correct understanding this is a TCG-only feature?
> + define_one_arm_cp_reg(cpu, dcpop_reg);
> +
> + if (cpu_isar_feature(aa64_dcpodp, cpu)) {
> + define_one_arm_cp_reg(cpu, dcpodp_reg);
> + }
> + }
> +#endif /*CONFIG_USER_ONLY*/
> #endif
>
> /*
next prev parent reply other threads:[~2023-11-28 11:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 23:40 [PATCH v2 0/4] target/arm: Support for Data Cache Clean up to PoP Beata Michalska
2019-11-05 23:40 ` [PATCH v2 1/4] tcg: cputlb: Add probe_read Beata Michalska
2019-11-05 23:40 ` [PATCH v2 2/4] Memory: Enable writeback for given memory region Beata Michalska
2019-11-06 12:19 ` Richard Henderson
2019-11-07 14:41 ` Beata Michalska
2019-11-07 16:57 ` Alex Bennée
2019-11-07 16:59 ` Peter Maydell
2019-11-05 23:40 ` [PATCH v2 3/4] migration: ram: Switch to ram block writeback Beata Michalska
2019-11-06 14:18 ` Alex Bennée
2019-11-05 23:41 ` [PATCH v2 4/4] target/arm: Add support for DC CVAP & DC CVADP ins Beata Michalska
2019-11-06 12:37 ` Richard Henderson
2023-11-28 11:24 ` Philippe Mathieu-Daudé [this message]
2023-11-28 11:34 ` Peter Maydell
2023-11-28 11:44 ` Philippe Mathieu-Daudé
2023-11-28 18:07 ` Richard Henderson
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=95cc7c22-939f-4ce0-aecd-d0ff7b0e7c9c@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=beata.michalska@linaro.org \
--cc=dgilbert@redhat.com \
--cc=eric.auger@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=shameerali.kolothum.thodi@huawei.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).