linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: FF <figure1802@126.com>
To: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: A quick question about ASID on KPTI
Date: Tue, 3 Mar 2020 09:08:00 +0800 (CST)	[thread overview]
Message-ID: <c427a03.eed.1709def7541.Coremail.figure1802@126.com> (raw)


hi  folks,

i am look at some patches about the KPTI on ARM64, a quick question about the ASDI on KPTI:
On KPIT, it will allocate a pairs ASID for a process, when the process running on kernel space, it will set the even ASID into TTBR1 register in tramp_map_kernel function, when the process running on User space, it will set the odd ASID into the TTBR1 register in tramp_unmap_kernel function.
my question is, when the process running in kernel space, if the process want to access the userspace address by copy_to/from_user(), the CPU will look-up the TLB with even ASID or odd ASID? if it use even ASID to look-up  TLB for userspace, it will always TLB miss, that will be performance impact. is it right? pls correct me if i am wrong.

Best
Ben
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2020-03-03  1:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  1:08 FF [this message]
2020-03-03  9:45 ` A quick question about ASID on KPTI Catalin Marinas

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=c427a03.eed.1709def7541.Coremail.figure1802@126.com \
    --to=figure1802@126.com \
    --cc=linux-arm-kernel@lists.infradead.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).