From: Julien Grall <julien.grall@arm.com>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
nd <nd@arm.com>, Andrii Anisov <Andrii_Anisov@epam.com>,
"Oleksandr_Tyshchenko@epam.com" <Oleksandr_Tyshchenko@epam.com>
Subject: Re: [Xen-devel] [PATCH v2 4/7] xen/arm: page: Clarify the Xen TLBs helpers name
Date: Mon, 10 Jun 2019 22:03:30 +0100 [thread overview]
Message-ID: <091bcd75-6a83-cedd-c0c1-8c5559ccf57c@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1906101347270.8691@sstabellini-ThinkPad-T480s>
Hi Stefano,
On 6/10/19 9:51 PM, Stefano Stabellini wrote:
> On Mon, 20 May 2019, Julien Grall wrote:
>> On 20/05/2019 22:01, Stefano Stabellini wrote:
>>> On Fri, 10 May 2019, Julien Grall wrote:
>>>> Feel free to suggest an in-code comment so we can discuss on the worthiness.
>>>
>>> I suggest something like the following:
>>>
>>> /*
>>> * Flush all hypervisor mappings from the TLB of the local processor. Note
>>> * that instruction cache maintenance might also be required when self
>>> * modifying Xen code, see D5-2522 in ARM DDI 0487D.a and B3.11.2 in ARM
>>> * DDI 0406C.c.
>>> */
>>
>> This looks quite out-of-context, what is the relation between
>> self-modifying code and TLB flush?
>
> "Flush all hypervisor mappings from the TLB of the local processor" is
> the description of the function below (it cannot be seen here but it's
> the function on top of which this comment is supposed to be on,
> flush_xen_data_tlb_local). The rest of the comment is informative
> regarding difficult cases such as self-modifying code, which was present
> in the previous version of the code and I would like to retain. The
> relation is that there is a good chance you need to do both.
Sorry but this doesn't make sense to me. You are unlikely going to
modify mapping when using self-modifying. And if you were, then because
instructions caches are implementing the IVIPT extension (assuming we
forbid IVIVT cache as suggested by patch #1 for Arm32) there are no need
to modifying the cache because the physical address would be different.
All the self-modifying code in Xen (i.e alternative, livepatch) don't
requires a TLB maintenance. I also can't see when the two would be
necessary at the same.
Can you please give a concrete example where it would be necessary?
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-06-10 21:03 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 16:15 [PATCH v2 0/7] xen/arm: TLB flush helpers rework Julien Grall
2019-05-08 16:15 ` [Xen-devel] " Julien Grall
2019-05-08 16:15 ` [PATCH v2 1/7] xen/arm: mm: Consolidate setting SCTLR_EL2.WXN in a single place Julien Grall
2019-05-08 16:15 ` [Xen-devel] " Julien Grall
2019-05-09 19:52 ` Stefano Stabellini
2019-05-09 19:52 ` [Xen-devel] " Stefano Stabellini
2019-05-08 16:15 ` [PATCH v2 2/7] xen/arm: Remove flush_xen_text_tlb_local() Julien Grall
2019-05-08 16:15 ` [Xen-devel] " Julien Grall
2019-05-09 20:03 ` Stefano Stabellini
2019-05-09 20:03 ` [Xen-devel] " Stefano Stabellini
2019-05-09 20:17 ` Julien Grall
2019-05-09 20:17 ` [Xen-devel] " Julien Grall
2019-05-08 16:15 ` [PATCH v2 3/7] xen/arm: tlbflush: Clarify the TLB helpers name Julien Grall
2019-05-08 16:15 ` [Xen-devel] " Julien Grall
2019-05-09 20:05 ` Stefano Stabellini
2019-05-09 20:05 ` [Xen-devel] " Stefano Stabellini
2019-05-08 16:16 ` [PATCH v2 4/7] xen/arm: page: Clarify the Xen TLBs " Julien Grall
2019-05-08 16:16 ` [Xen-devel] " Julien Grall
2019-05-09 20:13 ` Stefano Stabellini
2019-05-09 20:13 ` [Xen-devel] " Stefano Stabellini
2019-05-09 20:32 ` Julien Grall
2019-05-09 20:32 ` [Xen-devel] " Julien Grall
2019-05-09 21:46 ` Julien Grall
2019-05-09 21:46 ` [Xen-devel] " Julien Grall
2019-05-10 14:38 ` Julien Grall
2019-05-10 14:38 ` [Xen-devel] " Julien Grall
2019-05-10 17:57 ` Stefano Stabellini
2019-05-10 17:57 ` [Xen-devel] " Stefano Stabellini
2019-05-10 18:35 ` Julien Grall
2019-05-10 18:35 ` [Xen-devel] " Julien Grall
2019-05-20 21:01 ` Stefano Stabellini
2019-05-20 21:01 ` [Xen-devel] " Stefano Stabellini
2019-05-20 21:59 ` Julien Grall
2019-05-20 21:59 ` [Xen-devel] " Julien Grall
2019-06-10 20:51 ` Stefano Stabellini
2019-06-10 21:03 ` Julien Grall [this message]
2019-06-11 18:15 ` Stefano Stabellini
2019-05-08 16:16 ` [PATCH v2 5/7] xen/arm: Gather all TLB flush helpers in tlbflush.h Julien Grall
2019-05-08 16:16 ` [Xen-devel] " Julien Grall
2019-05-09 20:17 ` Stefano Stabellini
2019-05-09 20:17 ` [Xen-devel] " Stefano Stabellini
2019-05-08 16:16 ` [PATCH v2 6/7] xen/arm: tlbflush: Rework TLB helpers Julien Grall
2019-05-08 16:16 ` [Xen-devel] " Julien Grall
2019-05-09 20:32 ` Stefano Stabellini
2019-05-09 20:32 ` [Xen-devel] " Stefano Stabellini
2019-05-09 20:43 ` Julien Grall
2019-05-09 20:43 ` [Xen-devel] " Julien Grall
2019-05-09 21:37 ` Stefano Stabellini
2019-05-09 21:37 ` [Xen-devel] " Stefano Stabellini
2019-05-08 16:16 ` [PATCH v2 7/7] xen/arm: mm: Flush the TLBs even if a mapping failed in create_xen_entries Julien Grall
2019-05-08 16:16 ` [Xen-devel] " Julien Grall
2019-05-09 20:40 ` Stefano Stabellini
2019-05-09 20:40 ` [Xen-devel] " Stefano Stabellini
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=091bcd75-6a83-cedd-c0c1-8c5559ccf57c@arm.com \
--to=julien.grall@arm.com \
--cc=Andrii_Anisov@epam.com \
--cc=Oleksandr_Tyshchenko@epam.com \
--cc=nd@arm.com \
--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 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.