Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1331821imu; Wed, 16 Jan 2019 17:25:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN7YRpOOBd8th0CQpjwQCvP8MFC5Wn/DZ0LHVWT4KFHUnHRMWRBmLiTXaMhEZ9+aVdt5TW5p X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr13039248pls.315.1547688331168; Wed, 16 Jan 2019 17:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547688331; cv=none; d=google.com; s=arc-20160816; b=dmeY7JUFhZdXsdqA8orH3PTq0fPpi2P12T503n4d08/THiy+1dGHJzx2701GxxlMnV MGDs35eQAuZEAOexFbJHAXB2Nlw69zXd4lgvfSFd7jSAZmKcJcxxfsueLcZ22e0hlmpq Af5puock/RZl33R70RQihnT6xnt3wtHuhGrlPHh6mxdaKT/Bc4j+3empCjUywQ62DsvC +0g4bYgYGs5BRVODPPcFiuc7yDPqz9dqQQ0hZbbFL5PWRcw/dXZ+zvqy70d8J8kF2DXk Xm00lf/05HCyAzSL1DZUafBHSHwcBwB6qG/nFvNsj+Dzy8vIYOZm16PKUOpVyiRh9jmZ jL1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MFxsYUng8SebaN97J3RA5nlKB2oMATKqK62CL+6gVag=; b=dGcokAhlEpzL7faD/i6/Q4GANR10thVPAcClQOqF1IpNILYtJct1Vq32RcOoCtso0L +SUIlfCOATAwUta0QyPxBDApbQDL8aqzkhN6TjiTHCVhjhRrrj7+WPtv6Ab2mNDoYOjE HPnCttZUql/fIPnGzvNFA08VLOneA5+PNwud8nE4jNPdTORbVkSnyUuUxJKI1/Hk7/0J D0LkBFVFyVlmSDsVZLgfw6fcj+vE6bwYhQDOAaUYSydTRgCcpzpkYsBJ/Jq+if7+WxGy O6vFiz5luNxtZUS64dCQBzniyvkVwOhnhNOE7+GuhQcujZf2XboBGa0UDQI8grVqmzGS AKWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kzHLYyMR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 97si49960ple.389.2019.01.16.17.25.12; Wed, 16 Jan 2019 17:25:31 -0800 (PST) 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=@kernel.org header.s=default header.b=kzHLYyMR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbfAQAKG (ORCPT + 99 others); Wed, 16 Jan 2019 19:10:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:48140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbfAQAKF (ORCPT ); Wed, 16 Jan 2019 19:10:05 -0500 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 127A120866 for ; Thu, 17 Jan 2019 00:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547683805; bh=MFxsYUng8SebaN97J3RA5nlKB2oMATKqK62CL+6gVag=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kzHLYyMRVdQI5UJHHd5c0F5Pao9V4HZRVs8JfYrhcrV/VdsVSTHma6pnOxBI2oZL0 s//ilvyNW+BvFD37z+ceF7Y1gIXRM3g3PYJn89JyqU4Sc1MH9VXr1OoTbxin9GAljV bw+wT16K7HfhWlFX7az2FpypQIjn6HX6DgbTAud8= Received: by mail-wr1-f54.google.com with SMTP id r10so8976500wrs.10 for ; Wed, 16 Jan 2019 16:10:05 -0800 (PST) X-Gm-Message-State: AJcUukcqAEjgahmvUlHcSRR7WVVUp3UN4ZDKwkMcGG6GsjzENr2KdnIh 9JcmISbhcii7GHB5SPNh83lAJKNsE4lb9bTtJ+Zg3Q== X-Received: by 2002:adf:e08c:: with SMTP id c12mr9145353wri.199.1547683803556; Wed, 16 Jan 2019 16:10:03 -0800 (PST) MIME-Version: 1.0 References: <5AF03EBD02000078001C1303@prv1-mh.provo.novell.com> <5AF03EBD02000000000F91D6@prv1-mh.provo.novell.com> <5AF03EBD02000078001FE590@prv1-mh.provo.novell.com> <5C3E1128020000780020DFAD@prv1-mh.provo.novell.com> In-Reply-To: <5C3E1128020000780020DFAD@prv1-mh.provo.novell.com> From: Andy Lutomirski Date: Wed, 16 Jan 2019 16:09:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] x86-64/Xen: fix stack switching To: Jan Beulich Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Andrew Lutomirski , xen-devel , Boris Ostrovsky , Juergen Gross , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 8:58 AM Jan Beulich wrote: > > While in the native case entry into the kernel happens on the trampoline > stack, PV Xen kernels get entered with the current thread stack right > away. Hence source and destination stacks are identical in that case, > and special care is needed. > > Other than in sync_regs() the copying done on the INT80 path isn't > NMI / #MC safe, as either of these events occurring in the middle of the > stack copying would clobber data on the (source) stack. > > I'm not altering the similar code in interrupt_entry() and nmi(), as > those code paths are unreachable afaict when running PV Xen guests. Acked-by: Andy Lutomirski