Patch "arm64: KVM: trap VM system registers until MMU and caches are ON" has been added to the 3.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
arm64: KVM: trap VM system registers until MMU and caches are ON
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-kvm-trap-vm-system-registers-until-mmu-and-caches-are-on.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4d44923b17bff283c002ed961373848284aaff1bMon Sep 17 00:00:00 2001
From: Marc Zyngier <[email protected]>
Date: Tue, 14 Jan 2014 18:00:55 +0000
Subject: arm64: KVM: trap VM system registers until MMU and caches are ON
From: Marc Zyngier <[email protected]>
commit 4d44923b17bff283c002ed961373848284aaff1b upstream.
In order to be able to detect the point where the guest enables its MMU and caches, trap all the VM related system registers.
Once we see the guest enabling both the MMU and the caches, we can go back to a saner mode of operation, which is to leave these registers in complete control of the guest.
--- arch/arm64/include/asm/kvm_arm.h | 3 - arch/arm64/include/asm/kvm_asm.h | 3 - arch/arm64/kvm/sys_regs.c | 90 +++++++++++++++++++++++++++++++++------ 3 files changed, 82 insertions(+), 14 deletions(-)
arch/arm64/include/asm/kvm_arm.h +2 -1
@@ -62,6 +62,7 @@* RW: 64bit by default, can be overriden for 32bit VMs * TAC: Trap ACTLR * TSC: Trap SMC +* TVM: Trap VM ops (until M+C set in SCTLR_EL1) * TSW: Trap cache operations by set/way * TWE: Trap WFE * TWI: Trap WFI
@@ -74,7 +75,7 @@* SWIO: Turn set/way invalidates into set/way clean+invalidate */ #define HCR_GUEST_FLAGS (HCR_TSC | HCR_TSW | HCR_TWE | HCR_TWI | HCR_VM | \ - HCR_BSU_IS | HCR_FB | HCR_TAC | \ + HCR_TVM | HCR_BSU_IS | HCR_FB | HCR_TAC | \ HCR_AMO | HCR_IMO | HCR_FMO | \ HCR_SWIO | HCR_TIDCP | HCR_RW)#define HCR_VIRT_EXCP_MASK (HCR_VA | HCR_VI | HCR_VF)
arch/arm64/include/asm/kvm_asm.h +2 -1
@@ -79,7 +79,8 @@#define c13_TID_URW (TPIDR_EL0 * 2)/* Thread ID, User R/W */ #define c13_TID_URO (TPIDRRO_EL0 * 2)/* Thread ID, User R/O */ #define c13_TID_PRIV (TPIDR_EL1 * 2)/* Thread ID, Privileged */ -#define c10_AMAIR (AMAIR_EL1 * 2)/* Aux Memory Attr Indirection Reg */ +#define c10_AMAIR0 (AMAIR_EL1 * 2)/* Aux Memory Attr Indirection Reg */ +#define c10_AMAIR1 (c10_AMAIR0 + 1)/* Aux Memory Attr Indirection Reg */ #define c14_CNTKCTL (CNTKCTL_EL1 * 2)/* Timer Control Register (PL1) */ #define NR_CP15_REGS (NR_SYS_REGS * 2)
arch/arm64/kvm/sys_regs.c +78 -12
153 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/kvm-arm-arm64-vgic-fix-gicd_icfgr-register-accesses.patch queue-3.14/arm-kvm-introduce-per-vcpu-hyp-configuration-register.patch queue-3.14/arm-kvm-fix-handling-of-trapped-64bit-coprocessor-accesses.patch queue-3.14/kvm-arm64-vgic-fix-hyp-panic-with-64k-pages-on-juno-platform.patch queue-3.14/arm64-kvm-force-cache-clean-on-page-fault-when-caches-are-off.patch queue-3.14/arm-kvm-introduce-kvm_p-d_addr_end.patch queue-3.14/arm64-kvm-flush-vm-pages-before-letting-the-guest-enable-caches.patch queue-3.14/arm-kvm-force-cache-clean-on-page-fault-when-caches-are-off.patch queue-3.14/arm-kvm-add-world-switch-for-amair-0-1.patch queue-3.14/kvm-arm-vgic-fix-the-overlap-check-action-about-setting-the-gicd-gicc-base-address.patch queue-3.14/arm64-kvm-use-inner-shareable-barriers-for-inner-shareable-maintenance.patch queue-3.14/arm64-kvm-allows-discrimination-of-aarch32-sysreg-access.patch queue-3.14/arm-kvm-trap-vm-system-registers-until-mmu-and-caches-are-on.patch queue-3.14/arm-kvm-fix-ordering-of-64bit-coprocessor-accesses.patch queue-3.14/arm64-kvm-trap-vm-system-registers-until-mmu-and-caches-are-on.patch