On Wed, 8 Jul 2020 17:25:46 +0100, Will Deacon wrote:
PAGE_HYP_DEVICE is intended to encode attribute bits for an EL2 stage-1 pte mapping a device. Unfortunately, it includes PROT_DEVICE_nGnRE which encodes attributes for EL1 stage-1 mappings such as UXN and nG, which are RES0 for EL2, and DBM which is meaningless as TCR_EL2.HD is not set.
Fix the definition of PAGE_HYP_DEVICE so that it doesn't set RES0 bits at EL2.
Applied to arm64 (for-next/fixes), thanks!
[1/1] KVM: arm64: Fix definition of PAGE_HYP_DEVICE https://git.kernel.org/arm64/c/68cf617309b5
Cheers,