From patchwork Fri Mar 29 09:39:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 10876725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23D6D1575 for ; Fri, 29 Mar 2019 09:41:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 114E528A28 for ; Fri, 29 Mar 2019 09:41:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05063290D4; Fri, 29 Mar 2019 09:41:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AF4DA28A28 for ; Fri, 29 Mar 2019 09:41:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9nzQ-0005IL-F4; Fri, 29 Mar 2019 09:39:56 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h9nzO-0005IG-Ri for xen-devel@lists.xenproject.org; Fri, 29 Mar 2019 09:39:54 +0000 X-Inumbo-ID: 9904ec0a-5206-11e9-ba00-5778f07547e8 Received: from prv1-mh.provo.novell.com (unknown [137.65.248.33]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 9904ec0a-5206-11e9-ba00-5778f07547e8; Fri, 29 Mar 2019 09:39:50 +0000 (UTC) Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Fri, 29 Mar 2019 03:39:49 -0600 Message-Id: <5C9DE7E40200007800222BA7@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.1.0 Date: Fri, 29 Mar 2019 03:39:48 -0600 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Content-Disposition: inline Subject: [Xen-devel] [PATCH] x86emul: suppress general register update upon AVX gather failures X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: George Dunlap , Andrew Cooper , Wei Liu , Juergen Gross , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP While destination and mask registers may indeed need updating in this case, the rIP update in particular needs to be avoided, as well as e.g. raising a single step trap. Reported-by: George Dunlap Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- This is surely a stable tree candidate, unless it could still make it into 4.12 before the release. --- Obviously I'm folding the same change into the AVX512F gather and scatter patches as well as the AVX512PF one. --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -8547,6 +8547,9 @@ x86_emulate( invoke_stub("", "", "+m" (mask) : "a" (&mask)); put_stub(stub); + if ( rc != X86EMUL_OKAY ) + goto done; + state->simd_size = simd_none; break; }