]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Obey RES0/1 reserved bits when setting CPTR_EL2
authorDave Martin <Dave.Martin@arm.com>
Tue, 19 Jan 2016 16:20:18 +0000 (16:20 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Sun, 24 Jan 2016 21:55:58 +0000 (21:55 +0000)
commit4025780acf141daae1165b82d4170759eea3b74c
tree7529af0368e5df69e650d5fda9ba73b6667406c7
parent62acd320a43c2485bf9e87bf3e6c5ef3dd2f7112
arm64: KVM: Obey RES0/1 reserved bits when setting CPTR_EL2

Some bits in CPTR are defined as RES1 in the architecture.  Setting
these bits to zero may unintentionally enable future architecture
extensions, allowing guests to use them without supervision by the host.

This would be bad: for forwards compatibility, this patch makes
sure the affected bits are always written with 1, not 0.

This patch only addresses CPTR_EL2.  Initialisation of other system
registers may still need review.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/hyp/switch.c