From: Bertrand Marquis <Bertrand.Marquis@arm.com>
To: Julien Grall <julien@xen.org>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Julien Grall <jgrall@amazon.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC
Date: Mon, 22 Feb 2021 11:58:33 +0000 [thread overview]
Message-ID: <FC521246-BD88-4D8C-82B7-6C3EFC8B00D0@arm.com> (raw)
In-Reply-To: <20210220175413.14640-1-julien@xen.org>
Hi Julien,
> On 20 Feb 2021, at 17:54, Julien Grall <julien@xen.org> wrote:
>
> From: Julien Grall <jgrall@amazon.com>
>
> At the moment, flush_page_to_ram() is both cleaning and invalidate to
> PoC the page. However, the cache line can be speculated and pull in the
> cache right after as it is part of the direct map.
If we go further through this logic maybe all calls to
clean_and_invalidate_dcache_va_range could be transformed in a
clean_dcache_va_range.
>
> So it is pointless to try to invalidate the line in the data cache.
>
But what about processors which would not speculate ?
Do you expect any performance optimization here ?
If so it might be good to explain it as I am not quite sure I get it.
Cheers
Bertrand
> Signed-off-by: Julien Grall <jgrall@amazon.com>
> ---
> xen/arch/arm/mm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 59f8a3f15fd1..2f11d214e184 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -529,7 +529,7 @@ void flush_page_to_ram(unsigned long mfn, bool sync_icache)
> {
> void *v = map_domain_page(_mfn(mfn));
>
> - clean_and_invalidate_dcache_va_range(v, PAGE_SIZE);
> + clean_dcache_va_range(v, PAGE_SIZE);
> unmap_domain_page(v);
>
> /*
> --
> 2.17.1
>
>
next prev parent reply other threads:[~2021-02-22 11:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-20 17:54 [PATCH for-next] xen/arm: mm: flush_page_to_ram() only need to clean to PoC Julien Grall
2021-02-22 11:58 ` Bertrand Marquis [this message]
2021-02-22 13:37 ` Julien Grall
2021-02-22 13:48 ` Bertrand Marquis
2021-02-22 20:35 ` Stefano Stabellini
2021-02-22 20:50 ` Julien Grall
2021-02-23 1:22 ` Stefano Stabellini
2021-03-03 18:33 ` Julien Grall
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=FC521246-BD88-4D8C-82B7-6C3EFC8B00D0@arm.com \
--to=bertrand.marquis@arm.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=jgrall@amazon.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).