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
78 vcpu->arch.sve_max_vl = kvm_sve_max_vl; in kvm_vcpu_enable_sve()
90 * vcpu->arch.sve_state as necessary.
99 vl = vcpu->arch.sve_max_vl; in kvm_vcpu_finalize_sve()
104 * set_sve_vls(). Double-check here just to be sure: in kvm_vcpu_finalize_sve()
108 return -EIO; in kvm_vcpu_finalize_sve()
113 return -ENOMEM; in kvm_vcpu_finalize_sve()
121 vcpu->arch.sve_state = buf; in kvm_vcpu_finalize_sve()
131 return -EINVAL; in kvm_arm_vcpu_finalize()
134 return -EPERM; in kvm_arm_vcpu_finalize()
139 return -EINVAL; in kvm_arm_vcpu_finalize()
152 void *sve_state = vcpu->arch.sve_state; in kvm_arm_vcpu_destroy()
159 kfree(vcpu->arch.ccsidr); in kvm_arm_vcpu_destroy()
165 memset(vcpu->arch.sve_state, 0, vcpu_sve_state_size(vcpu)); in kvm_vcpu_reset_sve()
174 * kvm_reset_vcpu - sets core registers and sys_regs to reset value
178 * architecturally defined reset values, except for registers whose reset is
185 * on the memory-backed values of system registers, we want to do a full put if
197 spin_lock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
198 reset_state = vcpu->arch.reset_state; in kvm_reset_vcpu()
199 vcpu->arch.reset_state.reset = false; in kvm_reset_vcpu()
200 spin_unlock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
202 /* Reset PMU outside of the non-preemptible section */ in kvm_reset_vcpu()
206 loaded = (vcpu->cpu != -1); in kvm_reset_vcpu()
230 memset(&vcpu->arch.ctxt.fp_regs, 0, sizeof(vcpu->arch.ctxt.fp_regs)); in kvm_reset_vcpu()
231 vcpu->arch.ctxt.spsr_abt = 0; in kvm_reset_vcpu()
232 vcpu->arch.ctxt.spsr_und = 0; in kvm_reset_vcpu()
233 vcpu->arch.ctxt.spsr_irq = 0; in kvm_reset_vcpu()
234 vcpu->arch.ctxt.spsr_fiq = 0; in kvm_reset_vcpu()
235 vcpu_gp_regs(vcpu)->pstate = pstate; in kvm_reset_vcpu()
291 * Check with ARMv8.5-GTG that our PAGE_SIZE is supported at in kvm_set_ipa_limit()
292 * Stage-2. If not, things will stop very quickly. in kvm_set_ipa_limit()
296 kvm_err("PAGE_SIZE not supported at Stage-2, giving up\n"); in kvm_set_ipa_limit()
297 return -EINVAL; in kvm_set_ipa_limit()
299 kvm_debug("PAGE_SIZE supported at Stage-2 (default)\n"); in kvm_set_ipa_limit()
302 kvm_debug("PAGE_SIZE supported at Stage-2 (advertised)\n"); in kvm_set_ipa_limit()
306 return -EINVAL; in kvm_set_ipa_limit()