]> git.baikalelectronics.ru Git - kernel.git/commit
ARM/arm64: KVM: correct PTE uncachedness check
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 3 Dec 2015 08:25:22 +0000 (09:25 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 4 Dec 2015 16:30:17 +0000 (16:30 +0000)
commit00d5e198bd68f83463495be7d75d6de67f298560
tree8ca1061b90dd970afdb9054489a11d788a5b89c4
parent0b08058b179288ad9531c1919abb07b56998decc
ARM/arm64: KVM: correct PTE uncachedness check

Commit b47f5966f86b ("ARM/arm64: KVM: test properly for a PTE's
uncachedness") modified the logic to test whether a HYP or stage-2
mapping needs flushing, from [incorrectly] interpreting the page table
attributes to [incorrectly] checking whether the PFN that backs the
mapping is covered by host system RAM. The PFN number is part of the
output of the translation, not the input, so we have to use pte_pfn()
on the contents of the PTE, not __phys_to_pfn() on the HYP virtual
address or stage-2 intermediate physical address.

Fixes: b47f5966f86b ("ARM/arm64: KVM: test properly for a PTE's uncachedness")
Cc: stable@vger.kernel.org
Tested-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kvm/mmu.c