Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbeAQJCm (ORCPT + 1 other); Wed, 17 Jan 2018 04:02:42 -0500 Received: from 8bytes.org ([81.169.241.247]:53818 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750794AbeAQJCj (ORCPT ); Wed, 17 Jan 2018 04:02:39 -0500 Date: Wed, 17 Jan 2018 10:02:38 +0100 From: Joerg Roedel To: Boris Ostrovsky Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , jroedel@suse.de Subject: Re: [PATCH 02/16] x86/entry/32: Enter the kernel via trampoline stack Message-ID: <20180117090238.GH28161@8bytes.org> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-3-git-send-email-joro@8bytes.org> <476d7100-2414-d09e-abf1-5aa4d369a3b7@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <476d7100-2414-d09e-abf1-5aa4d369a3b7@oracle.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Boris, thanks for testing this :) On Tue, Jan 16, 2018 at 09:47:06PM -0500, Boris Ostrovsky wrote: > On 01/16/2018 11:36 AM, Joerg Roedel wrote: > >+.macro SWITCH_TO_KERNEL_STACK nr_regs=0 check_user=0 > > > This (and next patch's SWITCH_TO_ENTRY_STACK) need X86_FEATURE_PTI check. > > With those macros fixed I was able to boot 32-bit Xen PV guest. Hmm, on bare metal the stack switch happens regardless of the X86_FEATURE_PTI feature being set, because we always program tss.sp0 with the systenter stack. How is the kernel entry stack setup on xen-pv? I think something is missing there instead. Regards, Joerg