summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/regmap.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2016-03-15 19:43:45 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2018-03-19 10:53:18 +0000
commitfc7563b3400ab925a32fce9e88db5dd3ddfc6bb0 (patch)
tree257cf013ce0972b3d95530c15ec5123f9798bcaa /arch/arm64/kvm/regmap.c
parent6d4bd909645359b0a7619598b9ca7a1353296207 (diff)
downloadlinux-stable-fc7563b3400ab925a32fce9e88db5dd3ddfc6bb0.tar.gz
linux-stable-fc7563b3400ab925a32fce9e88db5dd3ddfc6bb0.tar.bz2
linux-stable-fc7563b3400ab925a32fce9e88db5dd3ddfc6bb0.zip
KVM: arm64: Defer saving/restoring 64-bit sysregs to vcpu load/put on VHE
Some system registers do not affect the host kernel's execution and can therefore be loaded when we are about to run a VCPU and we don't have to restore the host state to the hardware before the time when we are actually about to return to userspace or schedule out the VCPU thread. The EL1 system registers and the userspace state registers only affecting EL0 execution do not need to be saved and restored on every switch between the VM and the host, because they don't affect the host kernel's execution. We mark all registers which are now deffered as such in the vcpu_{read,write}_sys_reg accessors in sys-regs.c to ensure the most up-to-date copy is always accessed. Note MPIDR_EL1 (controlled via VMPIDR_EL2) is accessed from other vcpu threads, for example via the GIC emulation, and therefore must be declared as immediate, which is fine as the guest cannot modify this value. The 32-bit sysregs can also be deferred but we do this in a separate patch as it requires a bit more infrastructure. Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/regmap.c')
0 files changed, 0 insertions, 0 deletions