From: Suresh Siddha Subject: Re: [PATCH 1/2] x86: eliminate TS_XSAVE Date: Tue, 04 May 2010 11:03:29 -0700 Message-ID: <1272996209.2833.1.camel@sbs-t61.sc.intel.com> References: <1272812038-32484-1-git-send-email-avi@redhat.com> <1272812038-32484-2-git-send-email-avi@redhat.com> Reply-To: Suresh Siddha Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: "Cui, Dexuan" , Sheng Yang , Ingo Molnar , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" To: Avi Kivity Return-path: In-Reply-To: <1272812038-32484-2-git-send-email-avi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Sun, 2010-05-02 at 07:53 -0700, Avi Kivity wrote: > The fpu code currently uses current->thread_info->status & TS_XSAVE as > a way to distinguish between XSAVE capable processors and older processors. > The decision is not really task specific; instead we use the task status to > avoid a global memory reference - the value should be the same across all > threads. > > Eliminate this tie-in into the task structure by using an alternative > instruction keyed off the XSAVE cpu feature; this results in shorter and > faster code, without introducing a global memory reference. > > Signed-off-by: Avi Kivity Acked-by: Suresh Siddha