Lines Matching +full:host +full:- +full:only
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2012-2015 - ARM Ltd
7 #include <hyp/sysreg-sr.h>
18 * VHE: Host and guest must save mdscr_el1 and sp_el0 (and the PC and
21 * tpidr_el0 and tpidrro_el0 only need to be switched when going
22 * to host userspace or a different VCPU. EL1 registers only need to be
54 * kvm_vcpu_load_sysregs_vhe - Load guest system registers to the physical CPU
58 * Load system registers that do not affect the host's execution, for
59 * example EL1 system registers on a VHE system where the host kernel
66 struct kvm_cpu_context *guest_ctxt = &vcpu->arch.ctxt; in kvm_vcpu_load_sysregs_vhe()
69 host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt; in kvm_vcpu_load_sysregs_vhe()
75 * We must restore the 32-bit state before the sysregs, thanks in kvm_vcpu_load_sysregs_vhe()
76 * to erratum #852523 (Cortex-A57) or #853709 (Cortex-A72). in kvm_vcpu_load_sysregs_vhe()
82 vcpu->arch.sysregs_loaded_on_cpu = true; in kvm_vcpu_load_sysregs_vhe()
88 * kvm_vcpu_put_sysregs_vhe - Restore host system registers to the physical CPU
92 * Save guest system registers that do not affect the host's execution, for
93 * example EL1 system registers on a VHE system where the host kernel
100 struct kvm_cpu_context *guest_ctxt = &vcpu->arch.ctxt; in kvm_vcpu_put_sysregs_vhe()
103 host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt; in kvm_vcpu_put_sysregs_vhe()
110 /* Restore host user state */ in kvm_vcpu_put_sysregs_vhe()
113 vcpu->arch.sysregs_loaded_on_cpu = false; in kvm_vcpu_put_sysregs_vhe()