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()
88 set_bit(KVM_ARCH_FLAG_GUEST_HAS_SVE, &vcpu->kvm->arch.flags); 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()
171 * kvm_reset_vcpu - sets core registers and sys_regs to reset value
175 * architecturally defined reset values, except for registers whose reset is
182 * on the memory-backed values of system registers, we want to do a full put if
194 spin_lock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
195 reset_state = vcpu->arch.reset_state; in kvm_reset_vcpu()
196 vcpu->arch.reset_state.reset = false; in kvm_reset_vcpu()
197 spin_unlock(&vcpu->arch.mp_state_lock); in kvm_reset_vcpu()
199 /* Reset PMU outside of the non-preemptible section */ in kvm_reset_vcpu()
203 loaded = (vcpu->cpu != -1); in kvm_reset_vcpu()
223 memset(&vcpu->arch.ctxt.fp_regs, 0, sizeof(vcpu->arch.ctxt.fp_regs)); in kvm_reset_vcpu()
224 vcpu->arch.ctxt.spsr_abt = 0; in kvm_reset_vcpu()
225 vcpu->arch.ctxt.spsr_und = 0; in kvm_reset_vcpu()
226 vcpu->arch.ctxt.spsr_irq = 0; in kvm_reset_vcpu()
227 vcpu->arch.ctxt.spsr_fiq = 0; in kvm_reset_vcpu()
228 vcpu_gp_regs(vcpu)->pstate = pstate; in kvm_reset_vcpu()
290 * Check with ARMv8.5-GTG that our PAGE_SIZE is supported at in kvm_set_ipa_limit()
291 * Stage-2. If not, things will stop very quickly. in kvm_set_ipa_limit()
295 kvm_err("PAGE_SIZE not supported at Stage-2, giving up\n"); in kvm_set_ipa_limit()
296 return -EINVAL; in kvm_set_ipa_limit()
298 kvm_debug("PAGE_SIZE supported at Stage-2 (default)\n"); in kvm_set_ipa_limit()
301 kvm_debug("PAGE_SIZE supported at Stage-2 (advertised)\n"); in kvm_set_ipa_limit()
305 return -EINVAL; in kvm_set_ipa_limit()