From patchwork Thu Mar 10 07:39:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 8554351 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC8409F7CA for ; Thu, 10 Mar 2016 07:42:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5EDD202E6 for ; Thu, 10 Mar 2016 07:42:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F026E202E5 for ; Thu, 10 Mar 2016 07:42:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1advBp-00085D-1J; Thu, 10 Mar 2016 07:39:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1advBo-000857-EV for xen-devel@lists.xenproject.org; Thu, 10 Mar 2016 07:39:20 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id B3/05-14951-7A421E65; Thu, 10 Mar 2016 07:39:19 +0000 X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1457595557!10771201!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8322 invoked from network); 10 Mar 2016 07:39:18 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-10.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 Mar 2016 07:39:18 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Thu, 10 Mar 2016 00:39:16 -0700 Message-Id: <56E132B402000078000DB110@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Thu, 10 Mar 2016 00:39:16 -0700 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Cc: Andrew Cooper , Keir Fraser Subject: [Xen-devel] [PATCH] x86/xstate: undo bogus adjustment to xsave() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts an unintended change in commit 879b44b041 ("x86/fpu: add a per-domain field to set the width of FIP/FDP"), which I had done intermediately while fixing the build issue: After having reverted that adjustment I must have forgotten to "git add" the adjustment. Signed-off-by: Jan Beulich x86/xstate: undo bogus adjustment to xsave() This reverts an unintended change in commit 879b44b041 ("x86/fpu: add a per-domain field to set the width of FIP/FDP"), which I had done intermediately while fixing the build issue: After having reverted that adjustment I must have forgotten to "git add" the adjustment. Signed-off-by: Jan Beulich --- a/xen/arch/x86/xstate.c +++ b/xen/arch/x86/xstate.c @@ -292,7 +292,7 @@ void xsave(struct vcpu *v, uint64_t mask) XSAVE("0x48,"); - if ( !(ptr->xsave_hdr.xstate_bv & XSTATE_FP) || + if ( !(mask & ptr->xsave_hdr.xstate_bv & XSTATE_FP) || /* * AMD CPUs don't save/restore FDP/FIP/FOP unless an exception * is pending. Reviewed-by: Andrew Cooper --- a/xen/arch/x86/xstate.c +++ b/xen/arch/x86/xstate.c @@ -292,7 +292,7 @@ void xsave(struct vcpu *v, uint64_t mask) XSAVE("0x48,"); - if ( !(ptr->xsave_hdr.xstate_bv & XSTATE_FP) || + if ( !(mask & ptr->xsave_hdr.xstate_bv & XSTATE_FP) || /* * AMD CPUs don't save/restore FDP/FIP/FOP unless an exception * is pending.