From: Julien Grall <julien.grall@arm.com>
To: Iain Hunter <drhunter95@gmail.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [Xen-users] Xen 4.8.3 running on BeagleBoard X-15 - problem with paging
Date: Fri, 16 Feb 2018 10:27:20 +0000 [thread overview]
Message-ID: <e98e4bbf-274b-2bc0-0228-26241774fb4c@arm.com> (raw)
In-Reply-To: <CALC81-tCG3jDjaxaSA7xv7WmAujCnmgUOJkokP39N6Jsdhtk4w@mail.gmail.com>
(Moving that to xen-devel + Stefano)
On 16/02/18 09:23, Iain Hunter wrote:
> Hi Julian,
Hi,
> The patch I applied is below. I have no idea if it is AM572x/DRA7xx
> specific or just specific to the 2017.01 u-boot I was using.
Thank you for sending the patch. Indeed we don't know the state of the
TLBs when turning the MMU on. So, it is necessary to flush the TLBs.
On a side note, it looks like the Arm64 side has the same issue.
Can you submit the patch to xen-devel with a commit message and CC
Stefano and I?
>
> From 36e6bc81803a002637c9b854f2694bc655679e85 Mon Sep 17 00:00:00 2001
> From: Iain Hunter <iain@hunterembedded.co.uk
> <mailto:iain@hunterembedded.co.uk>>
> Date: Thu, 1 Feb 2018 14:45:27 +0000
> Subject: [PATCH] for AM572x need to flush TLBs before enabling MMU
>
> ---
> xen/arch/arm/arm32/head.S | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 2df9a98..b153eeb 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -347,6 +347,17 @@ virtphys_clash:
> b fail
>
> 1:
> + /*
> + * Flush the TLB before enabling MMU
> + */
> + dsb /* Ensure any page table updates
> made above
> + * have occurred. */
> + isb
The dsb/isb here is not necessary. As you have MMU disabled, the TLBs
will not get speculated.
> + mov r0, #1
> + mcr CP32(r0, TLBIALLH) /* Flush hypervisor TLB */
> + dsb /* Ensure completion of TLB flush */
You want to use dsb nsh here.
> + isb
This is not necessary, you can rely on the ISB after enabling the MMU.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
parent reply other threads:[~2018-02-16 10:27 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CALC81-tCG3jDjaxaSA7xv7WmAujCnmgUOJkokP39N6Jsdhtk4w@mail.gmail.com>]
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=e98e4bbf-274b-2bc0-0228-26241774fb4c@arm.com \
--to=julien.grall@arm.com \
--cc=drhunter95@gmail.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 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).