remarkable-linux/arch/powerpc/kvm
Aneesh Kumar K.V d19469e841 power/mm: update pte_write and pte_wrprotect to handle savedwrite
We use pte_write() to check whethwer the pte entry is writable.  This is
mostly used to later mark the pte read only if it is writable.  The other
use of pte_write() is to check whether the pte_entry is writable so that
hardware page table entry can be marked accordingly.  This is used in kvm
where we look at qemu page table entry and update hardware hash page table
for the guest with correct write enable bit.

With the above, for the first usage we should also check the savedwrite
bit so that we can correctly clear the savedwite bit.  For the later, we
add a new variant __pte_write().

With this we can revert write_protect_page part of 595cd8f256 ("mm/ksm:
handle protnone saved writes when making page write protect").  But I left
it as it is as an example code for savedwrite check.

Fixes: c137a2757b ("powerpc/mm/autonuma: switch ppc64 to its own implementation of saved write")
Link: http://lkml.kernel.org/r/1488203787-17849-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-09 17:01:09 -08:00
..
book3s.c KVM: PPC: Book3S HV: Page table construction and page faults for radix guests 2017-01-31 19:11:49 +11:00
book3s.h
book3s_32_mmu.c KVM: PPC: Book3S PR: Ratelimit copy data failure error messages 2017-02-17 14:03:35 +11:00
book3s_32_mmu_host.c
book3s_32_sr.S
book3s_64_mmu.c KVM: PPC: Book3S PR: Ratelimit copy data failure error messages 2017-02-17 14:03:35 +11:00
book3s_64_mmu_host.c powerpc/mm: Move hash table ops to a separate structure 2016-07-21 18:59:09 +10:00
book3s_64_mmu_hv.c power/mm: update pte_write and pte_wrprotect to handle savedwrite 2017-03-09 17:01:09 -08:00
book3s_64_mmu_radix.c KVM: PPC: Book3S HV: Fix software walk of guest process page tables 2017-03-01 11:53:45 +11:00
book3s_64_slb.S
book3s_64_vio.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
book3s_64_vio_hv.c KVM: PPC: Book3S: Move prototypes for KVM functions into kvm_ppc.h 2016-12-01 14:03:46 +11:00
book3s_emulate.c KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register 2016-09-27 15:14:29 +10:00
book3s_exports.c
book3s_hv.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/stat.h> 2017-03-02 08:42:34 +01:00
book3s_hv_builtin.c mm: cma_alloc: allow to specify GFP mask 2017-02-24 17:46:55 -08:00
book3s_hv_hmi.c powerpc: move hmi.c to arch/powerpc/kvm/ 2016-09-09 16:18:07 +10:00
book3s_hv_interrupts.S
book3s_hv_ras.c KVM: PPC: Book3S: Move prototypes for KVM functions into kvm_ppc.h 2016-12-01 14:03:46 +11:00
book3s_hv_rm_mmu.c power/mm: update pte_write and pte_wrprotect to handle savedwrite 2017-03-09 17:01:09 -08:00
book3s_hv_rm_xics.c Merge remote-tracking branch 'remotes/powerpc/topic/ppc-kvm' into kvm-ppc-next 2017-02-08 19:35:34 +11:00
book3s_hv_rmhandlers.S KVM: PPC: Book3S HV: Don't use ASDR for real-mode HPT faults on POWER9 2017-03-01 11:54:10 +11:00
book3s_interrupts.S
book3s_mmu_hpte.c sched/headers: Prepare to use <linux/rcuupdate.h> instead of <linux/rculist.h> in <linux/sched.h> 2017-03-02 08:42:38 +01:00
book3s_paired_singles.c
book3s_pr.c KVM: PPC: Book3S PR: Refactor program interrupt related code into separate function 2017-01-27 20:34:28 +11:00
book3s_pr_papr.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
book3s_rmhandlers.S
book3s_rtas.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
book3s_segment.S KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts 2017-01-31 19:07:39 +11:00
book3s_xics.c KVM: PPC: Book 3S: XICS: Don't lock twice when checking for resend 2017-01-27 10:27:21 +11:00
book3s_xics.h KVM: PPC: Book 3S: XICS: Implement ICS P/Q states 2017-01-27 10:27:02 +11:00
booke.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
booke.h
booke_emulate.c
booke_interrupts.S
bookehv_interrupts.S
e500.c
e500.h
e500_emulate.c
e500_mmu.c KVM: PPC: e500: Rename jump labels in kvmppc_e500_tlb_init() 2016-09-13 14:32:47 +10:00
e500_mmu_host.c sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
e500_mmu_host.h
e500mc.c
emulate.c KVM: PPC: Book3S PR: Fix illegal opcode emulation 2016-06-20 14:11:25 +10:00
emulate_loadstore.c
fpu.S
irq.h
Kconfig KVM: PPC: select IRQ_BYPASS_MANAGER 2016-09-09 16:26:19 +10:00
Makefile KVM: PPC: Book3S HV: Add basic infrastructure for radix guests 2017-01-31 19:11:48 +11:00
mpic.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
powerpc.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
timing.c
timing.h
trace.h
trace_book3s.h
trace_booke.h
trace_hv.h KVM: PPC: Book3S HV: Comment style and print format fixups 2016-11-28 11:48:47 +11:00
trace_pr.h