Lines Matching +full:architecturally +full:- +full:defined
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2012,2013 - ARM Ltd
7 * Copyright (C) 2012 - Virtual Open Systems and Columbia University
81 vcpu->arch.sve_max_vl = kvm_sve_max_vl; in kvm_vcpu_enable_sve()
93 * vcpu->arch.sve_state as necessary.
102 vl = vcpu->arch.sve_max_vl; in kvm_vcpu_finalize_sve()
107 * set_sve_vls(). Double-check here just to be sure: in kvm_vcpu_finalize_sve()
111 return -EIO; in kvm_vcpu_finalize_sve()
116 return -ENOMEM; in kvm_vcpu_finalize_sve()
124 vcpu->arch.sve_state = buf; in kvm_vcpu_finalize_sve()
134 return -EINVAL; in kvm_arm_vcpu_finalize()
137 return -EPERM; in kvm_arm_vcpu_finalize()
142 return -EINVAL; in kvm_arm_vcpu_finalize()
155 void *sve_state = vcpu->arch.sve_state; in kvm_arm_vcpu_destroy()
161 kfree(vcpu->arch.ccsidr); in kvm_arm_vcpu_destroy()
167 memset(vcpu->arch.sve_state, 0, vcpu_sve_state_size(vcpu)); in kvm_vcpu_reset_sve()
176 * kvm_reset_vcpu - sets core registers and sys_regs to reset value
180 * architecturally defined reset values, except for registers whose reset is
187 * on the memory-backed values of system registers, we want to do a full put if
199 spin_lock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
200 reset_state = vcpu->arch.reset_state; in kvm_reset_vcpu()
201 vcpu->arch.reset_state.reset = false; in kvm_reset_vcpu()
202 spin_unlock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
204 /* Reset PMU outside of the non-preemptible section */ in kvm_reset_vcpu()
208 loaded = (vcpu->cpu != -1); in kvm_reset_vcpu()
232 memset(&vcpu->arch.ctxt.fp_regs, 0, sizeof(vcpu->arch.ctxt.fp_regs)); in kvm_reset_vcpu()
233 vcpu->arch.ctxt.spsr_abt = 0; in kvm_reset_vcpu()
234 vcpu->arch.ctxt.spsr_und = 0; in kvm_reset_vcpu()
235 vcpu->arch.ctxt.spsr_irq = 0; in kvm_reset_vcpu()
236 vcpu->arch.ctxt.spsr_fiq = 0; in kvm_reset_vcpu()
237 vcpu_gp_regs(vcpu)->pstate = pstate; in kvm_reset_vcpu()
299 * Check with ARMv8.5-GTG that our PAGE_SIZE is supported at in kvm_set_ipa_limit()
300 * Stage-2. If not, things will stop very quickly. in kvm_set_ipa_limit()
304 kvm_err("PAGE_SIZE not supported at Stage-2, giving up\n"); in kvm_set_ipa_limit()
305 return -EINVAL; in kvm_set_ipa_limit()
307 kvm_debug("PAGE_SIZE supported at Stage-2 (default)\n"); in kvm_set_ipa_limit()
310 kvm_debug("PAGE_SIZE supported at Stage-2 (advertised)\n"); in kvm_set_ipa_limit()
314 return -EINVAL; in kvm_set_ipa_limit()