KVM: x86: Propagate fpu_alloc errors

Memory allocation may fail. Propagate such errors.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Jan Kiszka
2010-05-25 16:01:50 +02:00
committed by Avi Kivity
parent 6dc696d4dd
commit 10ab25cd6b
4 changed files with 19 additions and 5 deletions

View File

@@ -2659,7 +2659,9 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)
msr |= MSR_IA32_APICBASE_BSP;
kvm_set_apic_base(&vmx->vcpu, msr);
fx_init(&vmx->vcpu);
ret = fx_init(&vmx->vcpu);
if (ret != 0)
goto out;
seg_setup(VCPU_SREG_CS);
/*