diff options
author | James Morse <james.morse@arm.com> | 2018-01-08 15:38:03 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-13 10:44:04 +0000 |
commit | 32b03d1059667a39e089c45ee38ec9c16332430f (patch) | |
tree | 6cbdacd0a895bae32074a0e0a14f566d213edfdd /virt | |
parent | 3423cab3e05fe41d42d8905bb2b01d601a03626f (diff) | |
download | lwn-32b03d1059667a39e089c45ee38ec9c16332430f.tar.gz lwn-32b03d1059667a39e089c45ee38ec9c16332430f.zip |
KVM: arm64: Store vcpu on the stack during __guest_enter()
KVM uses tpidr_el2 as its private vcpu register, which makes sense for
non-vhe world switch as only KVM can access this register. This means
vhe Linux has to use tpidr_el1, which KVM has to save/restore as part
of the host context.
If the SDEI handler code runs behind KVMs back, it mustn't access any
per-cpu variables. To allow this on systems with vhe we need to make
the host use tpidr_el2, saving KVM from save/restoring it.
__guest_enter() stores the host_ctxt on the stack, do the same with
the vcpu.
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions