Re: [PATCH][v2 3/3] KVM: x86: Use FPU API

From: Avi Kivity
Date: Mon May 17 2010 - 05:38:21 EST

On 05/17/2010 12:08 PM, Sheng Yang wrote:
Convert KVM to use generic FPU API.

void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
if (vcpu->guest_fpu_loaded)
@@ -5156,7 +5134,7 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)

vcpu->guest_fpu_loaded = 1;
- kvm_fx_restore(&vcpu->arch.guest_fx_image);
+ fpu_restore_checking(&vcpu->arch.guest_fpu);

Do we need to do something on error here?

I think an error can only occur if userspace sets bad fpu state, so maybe do the check in the ioctl.

In any case, unrelated to this patch.

Do not meddle in the internals of kernels, for they are subtle and quick to panic.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at