qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Dave Hansen <dave.hansen@intel.com>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Cc: imammedo@redhat.com, kvm@vger.kernel.org, mst@redhat.com,
	gleb@kernel.org, mtosatti@redhat.com, qemu-devel@nongnu.org,
	stefanha@redhat.com, dan.j.williams@intel.com, rth@twiddle.net,
	"Yu, Yu-cheng" <yu-cheng.yu@intel.com>,
	"Wang, Yong Y" <yong.y.wang@intel.com>,
	"virt-intel-list@redhat.com" <virt-intel-list@redhat.com>,
	"Kasten, Robert A" <robert.a.kasten@intel.com>,
	"Lai, Paul C" <paul.c.lai@intel.com>,
	"Xiao, Guangrong" <guangrong.xiao@intel.com>,
	"ruwang@redhat.com" <ruwang@redhat.com>,
	"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>
Subject: Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)
Date: Mon, 9 May 2016 15:44:57 +0200	[thread overview]
Message-ID: <57309459.8080501@redhat.com> (raw)
In-Reply-To: <5728E5A7.9020709@intel.com>



On 03/05/2016 19:53, Dave Hansen wrote:
> The guest's use of XSAVES is completely independent of what instructions
> the host (kernel) uses for its xsave buffer.
> 
> For instance, just because the kernel doesn't use XSAVES to context
> switch Processor Trace, it does not make Processor Trace unusable to a
> guest.  Guests are still free to do what they want with it (including
> using XSAVES for its MSRs too btw...).

True.  In addition, there are other considerations to make:

1) right now, KVM is *not* planning to use XSAVES to marshal/unmarshal
MSRs out of the hypervisor and back in.  Instead it will use
KVM_GET_MSR/KVM_SET_MSR.  This is for at least two reasons.  First,
because KVM_GET_XSAVE/KVM_SET_XSAVE is still using the non-compacted
XSAVE/XSAVEOPT format and there's simply no room (as far as I
understasnd) for supervisor state save components in the non-compacted
format.  Second, because QEMU anway doesn't like treating the XSAVE area
as a black box so we'd be parsing the fields around
KVM_GET_XSAVE/KVM_SET_XSAVE.

2) KVM doesn't yet expose any XSAVES state save component, and the only
one defined in Skylake (processor tracing) probably will block migration
and will have to be added separately.


Item number 1 means that it is particularly easy to re-enable XSAVES for
guests only (and Dave's proposal later in the threaad sounds great).

Item number 2 on the other hand means that it's okay to add Skylake CPU
models without XSAVES.  Because of the large number of kernels in the
wild that block XSAVES, I'm inclined to do that.

Thanks,

Paolo

  parent reply	other threads:[~2016-05-09 13:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-27  8:13 [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode Xiao Guangrong
2016-04-27 11:56 ` Eduardo Habkost
2016-04-28 17:34 ` Eduardo Habkost
2016-05-03  6:38   ` Xiao Guangrong
2016-05-03 16:11     ` [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode) Eduardo Habkost
2016-05-03 17:44       ` Xiao Guangrong
2016-05-03 17:53         ` Dave Hansen
2016-05-03 18:23           ` Eduardo Habkost
2016-05-03 18:29             ` Dave Hansen
2016-05-09 13:44           ` Paolo Bonzini [this message]
2016-05-12 12:03             ` Eduardo Habkost
2016-05-12 12:06               ` Paolo Bonzini
2016-05-20 21:39                 ` [Qemu-devel] [QEMU PATCH v2] target-i386: Add Skylake-Client CPU model Eduardo Habkost
2016-05-23 13:46                   ` Paolo Bonzini
2016-06-03  3:50                     ` Xiao Guangrong
2016-06-03 17:27                       ` Eduardo Habkost
2016-04-29  3:11 ` [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode Huang, Kai
2016-04-29  3:28   ` Xiao Guangrong

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=57309459.8080501@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=ehabkost@redhat.com \
    --cc=fenghua.yu@intel.com \
    --cc=gleb@kernel.org \
    --cc=guangrong.xiao@intel.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=paul.c.lai@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=robert.a.kasten@intel.com \
    --cc=rth@twiddle.net \
    --cc=ruwang@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=virt-intel-list@redhat.com \
    --cc=yong.y.wang@intel.com \
    --cc=yu-cheng.yu@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;
as well as URLs for NNTP newsgroup(s).