All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][v2 3/3] KVM: x86: Use FPU API
Date: Mon, 17 May 2010 12:37:29 +0300	[thread overview]
Message-ID: <4BF10E59.1090200@redhat.com> (raw)
In-Reply-To: <1274087308-26676-4-git-send-email-sheng@linux.intel.com>

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;
>   	unlazy_fpu(current);
> -	kvm_fx_restore(&vcpu->arch.guest_fx_image);
> +	fpu_restore_checking(&vcpu->arch.guest_fpu);
>   	trace_kvm_fpu(1);
>   }
>    

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.


  reply	other threads:[~2010-05-17  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17  9:08 [PATCH][v2 0/3] Convert KVM to use FPU API Sheng Yang
2010-05-17  9:08 ` [PATCH][v2 1/3] x86: Export FPU API for KVM use Sheng Yang
2010-05-17  9:19   ` Avi Kivity
2010-05-17  9:19     ` Sheng Yang
2010-05-17  9:24       ` Avi Kivity
2010-05-17  9:22     ` Sheng Yang
2010-05-17  9:08 ` [PATCH][v2 2/3] KVM: x86: Use unlazy_fpu() for host FPU Sheng Yang
2010-05-17  9:08 ` [PATCH][v2 3/3] KVM: x86: Use FPU API Sheng Yang
2010-05-17  9:37   ` Avi Kivity [this message]
2010-05-17  9:37 ` [PATCH][v2 0/3] Convert KVM to use " Avi Kivity
2010-05-19 16:17   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF10E59.1090200@redhat.com \
    --to=avi@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtosatti@redhat.com \
    --cc=sheng@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.