lkml.org 
[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] KVM: SVM: Add xsetbv intercept
On Tue, Dec 07, 2010 at 04:34:33AM -0500, Avi Kivity wrote:
> On 12/06/2010 07:48 PM, Roedel, Joerg wrote:
> > On Mon, Dec 06, 2010 at 11:10:46AM -0500, Avi Kivity wrote:
> > > On 12/03/2010 06:42 PM, Joerg Roedel wrote:
> > > > This patch implements the xsetbv intercept to the AMD part
> > > > of KVM. This makes AVX usable in a save way for the guest on
> > > > AVX capable AMD hardware.
> > > > The patch is tested by using AVX in the guest and host in
> > > > parallel and checking for data corruption. I also used the
> > > > KVM xsave unit-tests and they all pass.
> > > >
> > >
> > > That is really strange. You didn't need to do anything to get cpuid.avx
> > > recognized. So running an older kvm on newer hardware will happily
> > > expose avx even though it's not supported.
> > >
> > > We screwed up - we should have made cpuid.avx dependent on vendor support.
> >
> > Hmm, right. The set_supported_cpuid arch-callback should basically
> > disable xsave on AMD for all KVM versions which do not handle the xsetbv
> > intercept.
> >
>
> Please post a patch to do that, and update this patch to undo the
> change. We'll backport the first patch to -stable so that people
> running older kernels don't get a nasty surprise when they upgrade their
> hardware (and use -cpu host).

Ok, I'll post them soon.

--
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632



\
 
 \ /
  Last update: 2010-12-07 17:15    [W:0.075 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site