From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [Patch 2/4] Refining Xsave/Xrestore support Date: Thu, 28 Oct 2010 18:11:40 -0700 Message-ID: <4CCA1F4C.8010704@goop.org> References: <4CC85D7E.2010201@goop.org> <4CC9A242.5040202@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Haitao Shan Cc: xen-devel@lists.xensource.com, "Han, Weidong" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 10/28/2010 05:57 PM, Haitao Shan wrote: > Then what about the approach that Jan uses in 2.6.27 tree, which is > reading CPUID-OSXSAVE? If supported, Xen will always set CR4.OSXSAVE. Sure, if CR4.OSXSAVE is set iff xsave is available, then it should work fine if we test that. J > Shan Haitao > > 2010/10/29 Jeremy Fitzhardinge : >> On 10/27/2010 07:57 PM, Haitao Shan wrote: >>> Hi, Jeremy, >>> >>> My approach is based an old PV-OPS kernel source. Kernel tries to set >>> CR4.OSXSAVE and read it back to determine whether Xsave is actually >>> available. >>> Could you still use that? >> No, because some older versions of Xen kill the domain when they try to >> set unknown bits in CR4. >> >> J >> >>> Shan Haitao >>> >>> 2010/10/28 Jeremy Fitzhardinge : >>>> On 10/27/2010 12:04 AM, Haitao Shan wrote: >>>>> Hi, Keir, >>>>> >>>>> This is patch #2, which adds PV guest Xsave support. >>>> How does a PV guest know whether Xsave support is available? Previous >>>> versions of Xen left the xsave cpu feature flag set even though xsave >>>> wasn't usable by the domain, so I had to forceably mask it from the >>>> cpuid features within the domain. Given that a PV domain can't rely on >>>> X86_FEATURE_XSAVE, how can it tell that the feature is actually usable? >>>> >>>> Thanks, >>>> J >>>> >>