All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: kvm list <kvm@vger.kernel.org>
Subject: Re: Problem with KVM when using XSAVES in host
Date: Sun, 14 Dec 2014 16:55:47 +0100	[thread overview]
Message-ID: <548DB303.9070707@redhat.com> (raw)
In-Reply-To: <3F0E7E55-133E-42E7-9B5B-AAEDD259B992@gmail.com>



On 14/12/2014 15:31, Nadav Amit wrote:
> This behaviour hurts the “equivalence property” - the VM does not behave as
> bare-metal system. Moreover, it may hurt the VM performance if the VM uses
> XSAVEOPT (and not XSAVES), has MXCSR with value different than the reset
> value of 1F80H and has all SSE registers set to zero. In such case, the VM
> would save/restore SSE registers unnecessarily. I don’t know whether such
> scenario happens in real workloads.
> 
> tl;dr - hypervisors which use XSAVES (and XSAVEC) mess the VM state and may
> hurt VM performance. Perhaps KVM should use XSAVE/XSAVEOPT instead.

Unfortunately KVM uses whatever the kernel uses.  KVM does not
save/restore itself the FPU state.

The same problem above can happen if the kernel uses XSAVES/XRSTORS and
userspace uses XSAVEOPT.  So it's a processor bug.

Paolo

      reply	other threads:[~2014-12-14 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-14 14:31 Problem with KVM when using XSAVES in host Nadav Amit
2014-12-14 15:55 ` Paolo Bonzini [this message]

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=548DB303.9070707@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=nadav.amit@gmail.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.