Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4322777imm; Sat, 21 Jul 2018 16:20:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfy/68PGkwtKBuhQClTQJs1W7BWJ++AvTyOna2TNzMRj+WKddqw1ckkWni5sbaC/YOt8gsx X-Received: by 2002:a63:d10c:: with SMTP id k12-v6mr7127465pgg.49.1532215230245; Sat, 21 Jul 2018 16:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532215230; cv=none; d=google.com; s=arc-20160816; b=mK8EmPy5evFznWOq4MU/iykSPRMnQW2dhRo+WqZ0qF1YwGZsSDkbI8k+PP/X/beFlK RqKbwcV/VW+enSj+67ewVjjn322oyf+Kt2nMMeo4BDqoF3dfssEmy+bRp82JpBGKYGsh /W9WJv9KLb7I2pKLe0w0qehy1IcG8R7d8AAxUcRS6qi2WQO2AgocnBFTzzu8rhi4Xhj5 rfYf/EKAJA4ixAhYYc4ibQ323IQC9XmdXjkI8wCvsDq+O2Geb0NhLnkdou0DeopPtI64 CaejZw0iKN8Db3h7Lk4uqYrbaMH/J/OMccoLFyvSxaenz2aBQM6gb553jN7CE4OMHmzW DXtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=cNJypm2JBkDQZ8JoO4Ni3CqeeAAu/d0OXi0U0y0HQ0Q=; b=us1vKS3q6XDNld4yLwgga3p1OLixffQUCspjgwMNaDnqThe/LGzI3zyk9XOTT4xyQd 3RC0d3bqr9qc/BODqDT9q3TWWia+i8xThKVJHi1HE7+IiO0CG4Ub5OB9c88cM+Qn7dUv w3I9uRKRKWISO42dKFkeAxkhVYr8aQ0nMPErEePHHn7r4JRMD1/B5GIqFCxXGqc9RTEv M5H1cLah+sf6FrQD0ydJmtlKhc+ydHG3fhh3hleBkHAljwVaOylwXjeE4V2baVWHvba1 VaMKGkDg8eUx8pfoEhwEG0vg74NrgWZEkxCfppwFbZzTr1iQB+ZelUi43RpXLPKEZK4f f2Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@runbox.com header.s=rbselector1 header.b="GFIg3ui/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 95-v6si4418967plc.466.2018.07.21.16.20.15; Sat, 21 Jul 2018 16:20:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@runbox.com header.s=rbselector1 header.b="GFIg3ui/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728596AbeGVAN1 (ORCPT + 99 others); Sat, 21 Jul 2018 20:13:27 -0400 Received: from aibo.runbox.com ([91.220.196.211]:57406 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728159AbeGVAN1 (ORCPT ); Sat, 21 Jul 2018 20:13:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=cNJypm2JBkDQZ8JoO4Ni3CqeeAAu/d0OXi0U0y0HQ0Q=; b=GFIg3ui/Y679q0Ttvc+PMREI2Q m/mQQftLXoy8R4a8oTzYyG1BNVl5859g+tM89mCe/KSDHPR6hJzVbzQHJplSIRF+2EwN6LgviZQdO Y3JHx+VOZoIcdff5zdySOtkzIBjKo7d2Fff14fyA/vJNiMIyaT/AMwWXVFCIIFByZMiRtRGRQ37+C FyHWzHwZtnFxULiJEUDkeHtU5/nb5z/gT3ZZJXKkFHGSPmMUzTbTdzG9FrCtiTc9tJBRCgPyM32eN nd+t15Cw9wBybCoQTLe5c1vT7DXuGJBMmtDF9dyKoy1R13GqgraPhOE08ttB74veykfVuEFhYy1rm Mj1na4Hg==; Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fh19P-0000R2-Cj; Sun, 22 Jul 2018 01:18:59 +0200 Received: by mailfront11.runbox.com with esmtpsa (uid:769847 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1fh19C-0005gG-Uc; Sun, 22 Jul 2018 01:18:47 +0200 Subject: Re: [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen To: Boris Ostrovsky , linux-kernel@vger.kernel.org Cc: Dominik Brodowski , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Juergen Gross , xen-devel@lists.xenproject.org, x86@kernel.org, stable@vger.kernel.org References: <20180721194909.23903-1-m.v.b@runbox.com> <5a21b844-36a9-8fe4-c6cd-6fade3dfa941@oracle.com> From: "M. Vefa Bicakci" Message-ID: <6426e7a4-2da0-9a36-298a-89e956e98812@runbox.com> Date: Sat, 21 Jul 2018 19:18:42 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5a21b844-36a9-8fe4-c6cd-6fade3dfa941@oracle.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/21/2018 05:19 PM, Boris Ostrovsky wrote: > On 07/21/2018 03:49 PM, M. Vefa Bicakci wrote: >> diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S >> index c7449f377a77..96e8ff34129e 100644 >> --- a/arch/x86/entry/entry_64.S >> +++ b/arch/x86/entry/entry_64.S >> @@ -1129,7 +1129,7 @@ ENTRY(xen_failsafe_callback) >> addq $0x30, %rsp >> UNWIND_HINT_IRET_REGS >> pushq $-1 /* orig_ax = -1 => not a system call */ >> - PUSH_AND_CLEAR_REGS >> + PUSH_AND_CLEAR_REGS clear_rbx=0 > > > Do we need this at all? We are returning from the hypervisor here. > > -boris > >> ENCODE_FRAME_POINTER >> jmp error_exit >> END(xen_failsafe_callback) Hello Boris, If you are referring to the PUSH_AND_CLEAR_REGS macro itself, I am not sure; however, not clearing the RBX register seemed to resolve the issues mentioned in the commit message for me. Given Andy's comment though, I believe that the approach in this patch may not be correct. Thank you, Vefa