[PATCH v2 07/12] ARM: split off core mapping logic from create_mapping

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Nov 16 11:45:28 PST 2015


On Mon, Nov 16, 2015 at 08:01:03PM +0100, Ard Biesheuvel wrote:
> On 16 November 2015 at 19:55, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> > I'm slightly worried about this.  Generally, these functions setup
> > global mappings.  If you're wanting to have a private set of page
> > tables for UEFI, and those private page tables contain global
> > mappings which are different from the mappings in the kernel's page
> > tables, then you need careful break-TLBflush-make handling when
> > switching from the kernel's page tables to the private UEFI ones,
> > and vice versa.
> >
> > Has this aspect been considered?
> 
> Yes. The UEFI mappings are all below 1 GB, and the top kernel end is
> reused as we do for ordinary userland page tables. The switch to the
> UEFI page tables performs a full TLB flush. What it does not do is
> break before make, as far as I can tell, so any pointers regarding how
> to implement that would be appreciated (this is implemented in 11/12)

What matters is whether they are global mappings or not.  If they are,
when the TLB can contain conflicting entries.  If they are non-global
mappings, they will be tagged with the ASID which makes them unique
to each mm.

The simple solution is to ensure that they're non-global, and then you
don't need to even worry about flushing the TLB when switching.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.



More information about the linux-arm-kernel mailing list