public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xudong Hao <xudong.hao@intel.com>
Cc: avi@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH v5] kvm/fpu: Enable fully eager restore kvm FPU
Date: Tue, 20 Nov 2012 20:00:17 -0200	[thread overview]
Message-ID: <20121120220017.GA29005@amt.cnet> (raw)
In-Reply-To: <1352253671-1262-1-git-send-email-xudong.hao@intel.com>

On Wed, Nov 07, 2012 at 10:01:11AM +0800, Xudong Hao wrote:
> Romove fpu lazy restore logic, using eager restore totally.
> 
> v5 changes from v4:
> - remove lazy fpu restore totally, fpu eager restore does not have performance
> regression and simple the code.
> 
> v4 changes from v3:
> - Wrap up some confused code with a clear function lazy_fpu_allowed()
> - Update fpu while update cr4 too.
> 
> v3 changes from v2:
> - Make fpu active explicitly while guest xsave is enabling and non-lazy xstate
> bit exist.
> 
> v2 changes from v1:
> - Expand KVM_XSTATE_LAZY to 64 bits before negating it.
> 
> Signed-off-by: Xudong Hao <xudong.hao@intel.com>
> ---
>  arch/x86/kvm/vmx.c       | 9 ++-------
>  arch/x86/kvm/x86.c       | 8 +-------
>  include/linux/kvm_host.h | 1 -
>  3 files changed, 3 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 6599e45..c1fd2e1 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -1197,7 +1197,7 @@ static void update_exception_bitmap(struct kvm_vcpu *vcpu)
>  	u32 eb;
>  
>  	eb = (1u << PF_VECTOR) | (1u << UD_VECTOR) | (1u << MC_VECTOR) |
> -	     (1u << NM_VECTOR) | (1u << DB_VECTOR);
> +	     (1u << DB_VECTOR);
>  	if ((vcpu->guest_debug &
>  	     (KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP)) ==
>  	    (KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_SW_BP))

Please remove the code entirely, including:

        if (is_no_device(intr_info)) {
                vmx_fpu_activate(vcpu);
                return 1;
        }

and clts handling.

fpu_active/fpu_deactivate callbacks become unused, don't they?
Also remove fpu_active variable.


  reply	other threads:[~2012-11-20 22:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-07  2:01 [PATCH v5] kvm/fpu: Enable fully eager restore kvm FPU Xudong Hao
2012-11-20 22:00 ` Marcelo Tosatti [this message]
2012-11-21  3:30   ` Hao, Xudong

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=20121120220017.GA29005@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=xudong.hao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox