Received: by 10.223.176.5 with SMTP id f5csp700982wra; Fri, 9 Feb 2018 05:56:31 -0800 (PST) X-Google-Smtp-Source: AH8x225edabYnZpe73o/Y62I3/JRYs+DutQYFbcmdLqDw4/1191kiWC4gIU5B9jWdK4xaGwUT/Yh X-Received: by 10.98.147.209 with SMTP id r78mr2993580pfk.204.1518184591758; Fri, 09 Feb 2018 05:56:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518184591; cv=none; d=google.com; s=arc-20160816; b=zMC8nM+31X6yKOSFWKob8kcxuyERLK6MXbJdr8lP3WjDluRAblKh59fhc/KMXrnIRk 4/n7AJ1DxYBsAcIQEQ1jXMVzpUUj/4ZqGiP4vp0BWCAsmUkeOEDsr5+bVKtnjsnwBupd K+0TlSMGL1cq1qdoLkZQL7xIdOS6oPABb5c7hAJx6YGP8QF339u6nmJr2sYwUiuZkdHM gCAQ1oKgUxq60swILJ4vKiDZRzDBU5oordpZbsliqIzSqp8UWRTfC29Xu5kqjf11LNGl i939IviOja3KLDfi9VL9xhrgIhBiaapK42n6y3/V4a4OvkaWGNyvnG1yZDBwiymXPbQT cHXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=8py0D4bXUY56fIiZV+vGc0EnkOWzmxlXjFIrjBRCDQo=; b=YYBzbwBS+uHQH9tN/3h/y0NjC9ut/e4PAMoEN+dig5hM2jFA9R4reFW0gl64/5ZQDY nX8HVBBX1jI6JbU0pcdz4vZ1+76hKrDbb2tGe85iA3f9U5sMNMcGY4oKdgPfXeh14qIO fssgRg/jwdAJDRijkGXKl2AsuWm/kbMkIgMNFMarBCJtntI+fEMyhDCJo/swYPqc20P+ oB8baOvscZYRs6y4qKMnndZKcL8O6uKguxTjISp1dDSkgzAtuj1+kwZRnqIQ7MMohl70 qmbbCpblGBf5sxwOqgze6XEKKZxrG2Y7kcoItZv27a778QmTGIs6hdtoukRqXlRaD8P9 dpDA== ARC-Authentication-Results: i=1; mx.google.com; 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 d189si1409115pgc.664.2018.02.09.05.56.17; Fri, 09 Feb 2018 05:56: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; 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 S1753710AbeBINyt (ORCPT + 99 others); Fri, 9 Feb 2018 08:54:49 -0500 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:52720 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbeBINyr (ORCPT ); Fri, 9 Feb 2018 08:54:47 -0500 X-IronPort-AV: E=Sophos;i="5.46,483,1511827200"; d="scan'208";a="67618866" Subject: Re: [PATCH 00/31 v2] PTI support for x86_32 To: Joerg Roedel , Juergen Gross CC: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , , , , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , , , , , Andrea Arcangeli , Waiman Long , Pavel Machek , References: <1518168340-9392-1-git-send-email-joro@8bytes.org> <35f19c79-7277-3ad8-50bf-8def929377b6@suse.com> <20180209133507.GD16484@8bytes.org> From: Andrew Cooper Message-ID: <9ca8429b-4ae4-e009-69b0-c4945be41e65@citrix.com> Date: Fri, 9 Feb 2018 13:54:44 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180209133507.GD16484@8bytes.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/18 13:35, Joerg Roedel wrote: > Hi Juergen, > > On Fri, Feb 09, 2018 at 01:11:42PM +0100, Juergen Gross wrote: >> On 09/02/18 10:25, Joerg Roedel wrote: >>> XENPV is also untested from my side, but I added checks to >>> not do the stack switches in the entry-code when XENPV is >>> enabled, so hopefully it works. But someone should test it, >>> of course. >> That's unfortunate. 32 bit XENPV kernel is vulnerable to Meltdown, too. >> I'll have a look whether 32 bit XENPV is still working, though. >> >> Adding support for KPTI with Xen PV should probably be done later. :-) > Not sure how much is missing to make it work there, one point is > certainly to write the right stack into tss.sp0 for xenpv on 32bit. This > write has a check to only happen for !xenpv. > > But let's first test the code as-is on XENPV and see if it still boots > :) IMO, the only sensible way to do KPTI + Xen PV is to have Xen to do the pagetable switch for 32bit like we already do for 64bit guests.  All context switches already pass through the hypervisor, and it saves the guest having to make the updates itself (which will trap for auditing) or having to juggle the set_stack_base() semantics. ~Andrew