From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V7] arm: mm: Modify pte_write and pmd_write logic for LPAE
Date: Thu, 3 Jul 2014 17:02:45 +0100 [thread overview]
Message-ID: <20140703160245.GE14305@arm.com> (raw)
In-Reply-To: <1404402296-11173-1-git-send-email-steve.capper@linaro.org>
On Thu, Jul 03, 2014 at 04:44:56PM +0100, Steve Capper wrote:
> For LPAE, we have the following means for encoding writable or dirty
> ptes:
> L_PTE_DIRTY L_PTE_RDONLY
> !pte_dirty && !pte_write 0 1
> !pte_dirty && pte_write 0 1
> pte_dirty && !pte_write 1 1
> pte_dirty && pte_write 1 0
>
> So we can't distinguish between writeable clean ptes and read only
> ptes. This can cause problems with ptes being incorrectly flagged as
> read only when they are writeable but not dirty.
>
> This patch renumbers L_PTE_RDONLY from AP[2] to a software bit #58,
> and adds additional logic to set AP[2] whenever the pte is read only
> or not dirty. That way we can distinguish between clean writeable ptes
> and read only ptes.
>
> HugeTLB pages will use this new logic automatically.
>
> We need to add some logic to Transparent HugePages to ensure that they
> correctly interpret the revised pgprot permissions (L_PTE_RDONLY has
> moved and no longer matches PMD_SECT_AP2). In the process of revising
> THP, the names of the PMD software bits have been prefixed with L_ to
> make them easier to distinguish from their hardware bit counterparts.
>
> Signed-off-by: Steve Capper <steve.capper@linaro.org>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Will
prev parent reply other threads:[~2014-07-03 16:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 12:06 [PATCH V6 0/2] PTE fixes for ARM LPAE Steve Capper
2014-07-03 12:06 ` [PATCH V6 1/2] arm: mm: Introduce {pte, pmd}_isset and {pte, pmd}_isclear Steve Capper
2014-07-03 16:01 ` [PATCH V6 1/2] arm: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear Will Deacon
2014-07-03 12:06 ` [PATCH V6 2/2] arm: mm: Modify pte_write and pmd_write logic for LPAE Steve Capper
2014-07-03 12:18 ` Russell King - ARM Linux
2014-07-03 13:47 ` Steve Capper
2014-07-03 15:44 ` [PATCH V7] " Steve Capper
2014-07-03 16:02 ` Will Deacon [this message]
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=20140703160245.GE14305@arm.com \
--to=will.deacon@arm.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 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.