alistair23-linux/arch/mips
James Hogan e88643ba1a KVM: MIPS/MMU: Use generic dirty log & protect helper
MIPS hasn't up to this point properly supported dirty page logging, as
pages in slots with dirty logging enabled aren't made clean, and tlbmod
exceptions from writes to clean pages have been assumed to be due to
guest TLB protection and unconditionally passed to the guest.

Use the generic dirty logging helper kvm_get_dirty_log_protect() to
properly implement kvm_vm_ioctl_get_dirty_log(), similar to how ARM
does. This uses xchg to clear the dirty bits when reading them, rather
than wiping them out afterwards with a memset, which would potentially
wipe recently set bits that weren't caught by kvm_get_dirty_log(). It
also makes the pages clean again using the
kvm_arch_mmu_enable_log_dirty_pt_masked() architecture callback so that
further writes after the shadow memslot is flushed will trigger tlbmod
exceptions and dirty handling.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
2017-02-03 15:21:23 +00:00
..
alchemy clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
ar7
ath25
ath79
bcm47xx
bcm63xx
bmips
boot RTC for 4.10 2016-12-18 18:18:03 -08:00
cavium-octeon clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
cobalt
configs
dec Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
emma
fw
generic MIPS: generic: Fix KASLR for generic kernel. 2016-11-04 00:32:06 +01:00
include KVM: MIPS/MMU: Add GPA PT mkclean helper 2017-02-03 15:21:22 +00:00
jazz Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
jz4740 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
kernel Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
kvm KVM: MIPS/MMU: Use generic dirty log & protect helper 2017-02-03 15:21:23 +00:00
lantiq MIPS: Lantiq: Fix mask of GPE frequency 2016-12-11 11:20:25 +01:00
lasat
lib MIPS: dump_tlb: Fix printk continuations 2016-11-04 01:04:32 +01:00
loongson32 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
loongson64 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm MIPS: Export some tlbex internals for KVM to use 2017-02-03 15:19:01 +00:00
mti-malta clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
net
netlogic clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
oprofile Merge branch 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:05:56 -08:00
paravirt
pci
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sgi-ip27 clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
sgi-ip32 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sibyte Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
sni
txx9
vdso
vr41xx
xilfpga
Kbuild
Kbuild.platforms
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
Kconfig.debug
Makefile MIPS: Fix build of compressed image 2016-11-04 00:37:15 +01:00