arm/arm64: KVM: Implement Stage-2 page aging
Until now, KVM/arm didn't care much for page aging (who was swapping anyway?), and simply provided empty hooks to the core KVM code. With server-type systems now being available, things are quite different. This patch implements very simple support for page aging, by clearing the Access flag in the Stage-2 page tables. On access fault, the current fault handling will write the PTE or PMD again, putting the Access flag back on. It should be possible to implement a much faster handling for Access faults, but that's left for a later patch. With this in place, performance in VMs is degraded much more gracefully. Signed-off-by:Marc Zyngier <marc.zyngier@arm.com> Acked-by:
Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by:
Christoffer Dall <christoffer.dall@linaro.org>
Showing
- arch/arm/include/asm/kvm_arm.h 1 addition, 0 deletionsarch/arm/include/asm/kvm_arm.h
- arch/arm/include/asm/kvm_host.h 2 additions, 11 deletionsarch/arm/include/asm/kvm_host.h
- arch/arm/kvm/mmu.c 64 additions, 1 deletionarch/arm/kvm/mmu.c
- arch/arm/kvm/trace.h 33 additions, 0 deletionsarch/arm/kvm/trace.h
- arch/arm64/include/asm/esr.h 1 addition, 0 deletionsarch/arm64/include/asm/esr.h
- arch/arm64/include/asm/kvm_arm.h 1 addition, 0 deletionsarch/arm64/include/asm/kvm_arm.h
- arch/arm64/include/asm/kvm_host.h 2 additions, 11 deletionsarch/arm64/include/asm/kvm_host.h
Please register or sign in to comment