public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Amit Shah <amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: KVM: SVM: Disable Lazy FPU optimization because of regressions
Date: Sun, 18 Nov 2007 19:28:56 +0200	[thread overview]
Message-ID: <47407658.1010803@qumranet.com> (raw)
In-Reply-To: <200711182244.51689.amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

Amit Shah wrote:
> >From 76204eda7e03035c16702105e78724137ecad24b Mon Sep 17 00:00:00 2001
> From: Amit Shah <amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
> Date: Sun, 18 Nov 2007 22:42:47 +0530
> Subject: [PATCH] KVM: SVM: Disable Lazy FPU optimization because of 
> regressions
>
> Host FPU state is leaked into the guest FPU state. This happens
> because of the lazy FPU optimization, so just reload the FPU
> each time there's a VM exit/entry.
>
> The real fix should follow soon.
>
>   
Applied, thanks, and:

> diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
> index ea2cb83..d7c9b92 100644
> --- a/drivers/kvm/svm.c
> +++ b/drivers/kvm/svm.c
> @@ -1600,11 +1600,11 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu, 
> unsigned long root)
>  	svm->vmcb->save.cr3 = root;
>  	force_new_asid(vcpu);
>  
> -	if (vcpu->fpu_active) {
> -		svm->vmcb->control.intercept_exceptions |= (1 << NM_VECTOR);
> -		svm->vmcb->save.cr0 |= X86_CR0_TS;
> -		vcpu->fpu_active = 0;
> -	}
> +/* 	if (vcpu->fpu_active) { */
> +/* 		svm->vmcb->control.intercept_exceptions |= (1 << NM_VECTOR); */
> +/* 		svm->vmcb->save.cr0 |= X86_CR0_TS; */
> +/* 		vcpu->fpu_active = 0; */
> +/* 	} */
>  }
>  
>  static void svm_inject_page_fault(struct kvm_vcpu *vcpu,
>   

Changed those into a #if 0.  Those comments were unsightly.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2007-11-18 17:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 17:14 KVM: SVM: Disable Lazy FPU optimization because of regressions Amit Shah
     [not found] ` <200711182244.51689.amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-18 17:28   ` Avi Kivity [this message]
     [not found]     ` <47407658.1010803-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-18 17:32       ` Amit Shah
2007-11-18 18:19   ` Mike Lampard
     [not found]     ` <200711190449.39313.mike-pBbpZId3k0Zx3z9c7Zyw2w@public.gmane.org>
2007-11-18 18:47       ` Amit Shah

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=47407658.1010803@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=amit.shah-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox