mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: gleb@redhat.com
Subject: [PATCH v2 0/3] KVM: prepare for future XSAVE extensions
Date: Mon, 16 Sep 2013 16:26:28 +0200	[thread overview]
Message-ID: <1379341591-6538-1-git-send-email-pbonzini@redhat.com> (raw)

As soon as the kernel will support the XSAVE extensions in Skylake
processors, we will want both userspace and the hypervisor to run
guests without showing any trace of the new features (because
support for them in the hypervisor will come later).

This series does exactly this.  Patches 1 and 3 ensures that userspace
does not get access to features not supported in the hypervisor.
Patch 2 does the same for the guest.

The effect of these patches is already visible if you use the QEMU
patches posted last week together with a command line such as
"-cpu SandyBridge,-avx".  Previously, AVX state was always sent
by QEMU during migration.  If both the QEMU and hypervisor changes are
applied, instead, disabling AVX will also prevent the AVX state from
being transferred.

Paolo

v1->v2: new patches 1 and 3, patch 2 mostly rewritten

Paolo Bonzini (3):
  KVM: x86: mask unsupported XSAVE entries from leaf 0Dh index 0
  KVM: x86: prevent setting unsupported XSAVE states
  KVM: x86: only copy XSAVE state for the supported features

 arch/x86/include/asm/kvm_host.h |  2 ++
 arch/x86/kvm/cpuid.c            | 37 ++++++++++++++++++++++++++++++++++++-
 arch/x86/kvm/x86.c              | 26 ++++++++++++++++++++------
 arch/x86/kvm/x86.h              |  1 +
 4 files changed, 59 insertions(+), 7 deletions(-)

-- 
1.8.3.1


             reply	other threads:[~2013-09-16 14:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-16 14:26 Paolo Bonzini [this message]
2013-09-16 14:26 ` [PATCH v2 1/3] KVM: x86: mask unsupported XSAVE entries from leaf 0Dh index 0 Paolo Bonzini
2013-09-16 14:26 ` [PATCH v2 2/3] KVM: x86: prevent setting unsupported XSAVE states Paolo Bonzini
2013-09-22  9:33   ` Gleb Natapov
2013-09-23 10:22     ` Paolo Bonzini
2013-09-23 15:09       ` Gleb Natapov
2013-09-23 15:24         ` Paolo Bonzini
2013-09-16 14:26 ` [PATCH v2 3/3] KVM: x86: only copy XSAVE state for the supported features Paolo Bonzini

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=1379341591-6538-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gleb@redhat.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®