Lines Matching +full:preserved +full:- +full:memory +full:- +full:map
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2015 - ARM Ltd
9 #include <linux/arm-smccc.h>
26 #include <asm/debug-monitors.h>
41 * - TGE: we want the guest to use EL1, which is incompatible with
44 * - API/APK: they are already accounted for by vcpu_load(), and can
47 * - FIEN: no way we let a guest have access to the RAS "Common Fault
54 u64 guest_hcr, hcr = vcpu->arch.hcr_el2; in __compute_hcr()
63 * that sucker. PSTATE.M will get fixed-up on exit. in __compute_hcr()
79 * use the config-driven RES1 bits. in __compute_hcr()
83 write_sysreg_s(vcpu->arch.ctxt.vncr_array, SYS_VNCR_EL2); in __compute_hcr()
92 va |= __vcpu_sys_reg(vcpu, VNCR_EL2) & GENMASK(PAGE_SHIFT - 1, 0); in __compute_hcr()
113 struct timer_map map; in __activate_traps() local
115 get_timer_map(vcpu, &map); in __activate_traps()
119 * values from memory now that TGE is clear. in __activate_traps()
121 if (map.direct_ptimer == vcpu_ptimer(vcpu)) in __activate_traps()
123 if (map.direct_ptimer == vcpu_hptimer(vcpu)) in __activate_traps()
126 if (map.direct_ptimer) { in __activate_traps()
147 struct timer_map map; in __deactivate_traps() local
150 get_timer_map(vcpu, &map); in __deactivate_traps()
154 * to memory and apply the offset now that TGE is set. in __deactivate_traps()
157 if (map.direct_ptimer == vcpu_ptimer(vcpu)) in __deactivate_traps()
159 if (map.direct_ptimer == vcpu_hptimer(vcpu)) in __deactivate_traps()
164 if (map.direct_ptimer && offset) { in __deactivate_traps()
211 host_data_ptr(host_ctxt)->__hyp_running_vcpu = vcpu; in kvm_vcpu_load_vhe()
215 __load_stage2(vcpu->arch.hw_mmu, vcpu->arch.hw_mmu->arch); in kvm_vcpu_load_vhe()
223 host_data_ptr(host_ctxt)->__hyp_running_vcpu = NULL; in kvm_vcpu_put_vhe()
289 val -= timer_get_offset(vcpu_hptimer(vcpu)); in kvm_hyp_handle_timer()
385 int ret = -EINVAL; in kvm_hyp_handle_tlbi_el2()
424 atomic_read(&vcpu->kvm->arch.vncr_map_count)) in kvm_hyp_handle_tlbi_el2()
508 vcpu->arch.fault.esr_el2 = FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_SYS64) | in kvm_hyp_handle_impdef()
537 * invariant that the guest's HYP context status is preserved in fixup_guest_exit()
572 guest_ctxt = &vcpu->arch.ctxt; in __kvm_vcpu_run_vhe()
657 vcpu = host_ctxt->__hyp_running_vcpu; in __hyp_call_panic()