diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2013-08-06 00:34:16 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-08-13 15:25:06 -0400 |
commit | 8947c09d05da9f0436f423518f449beaa5ea1bdc (patch) | |
tree | efb05ec3b49d2e452cb9257548514962ed4cbeb0 | |
parent | 4bfab2034bab9374eba1921cf7bd51fd8d48661b (diff) |
ARM: 7808/1: KVM: mm: Get rid of L_PTE_USER ref from PAGE_S2_DEVICE
THe L_PTE_USER actually has nothing to do with stage 2 mappings and the
L_PTE_S2_RDWR value sets the readable bit, which was what L_PTE_USER
was used for before proper handling of stage 2 memory defines.
Changelog:
[v3]: Drop call to kvm_set_s2pte_writable in mmu.c
[v2]: Change default mappings to be r/w instead of r/o, as per Marc
Zyngier's suggestion.
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/include/asm/pgtable.h | 2 | ||||
-rw-r--r-- | arch/arm/kvm/mmu.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 04aeb02d2e11..be956dbf6bae 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -100,7 +100,7 @@ extern pgprot_t pgprot_s2_device; | |||
100 | #define PAGE_HYP _MOD_PROT(pgprot_kernel, L_PTE_HYP) | 100 | #define PAGE_HYP _MOD_PROT(pgprot_kernel, L_PTE_HYP) |
101 | #define PAGE_HYP_DEVICE _MOD_PROT(pgprot_hyp_device, L_PTE_HYP) | 101 | #define PAGE_HYP_DEVICE _MOD_PROT(pgprot_hyp_device, L_PTE_HYP) |
102 | #define PAGE_S2 _MOD_PROT(pgprot_s2, L_PTE_S2_RDONLY) | 102 | #define PAGE_S2 _MOD_PROT(pgprot_s2, L_PTE_S2_RDONLY) |
103 | #define PAGE_S2_DEVICE _MOD_PROT(pgprot_s2_device, L_PTE_USER | L_PTE_S2_RDONLY) | 103 | #define PAGE_S2_DEVICE _MOD_PROT(pgprot_s2_device, L_PTE_S2_RDWR) |
104 | 104 | ||
105 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN | L_PTE_NONE) | 105 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT | L_PTE_RDONLY | L_PTE_XN | L_PTE_NONE) |
106 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) | 106 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | L_PTE_USER | L_PTE_XN) |
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index ca6bea4859b4..9583c95adbb7 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c | |||
@@ -495,7 +495,6 @@ int kvm_phys_addr_ioremap(struct kvm *kvm, phys_addr_t guest_ipa, | |||
495 | 495 | ||
496 | for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) { | 496 | for (addr = guest_ipa; addr < end; addr += PAGE_SIZE) { |
497 | pte_t pte = pfn_pte(pfn, PAGE_S2_DEVICE); | 497 | pte_t pte = pfn_pte(pfn, PAGE_S2_DEVICE); |
498 | kvm_set_s2pte_writable(&pte); | ||
499 | 498 | ||
500 | ret = mmu_topup_memory_cache(&cache, 2, 2); | 499 | ret = mmu_topup_memory_cache(&cache, 2, 2); |
501 | if (ret) | 500 | if (ret) |