Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752424AbdFUIDS (ORCPT ); Wed, 21 Jun 2017 04:03:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:47984 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751128AbdFUIDP (ORCPT ); Wed, 21 Jun 2017 04:03:15 -0400 Date: Wed, 21 Jun 2017 10:03:14 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: x86@kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Linus Torvalds , Andrew Morton , Mel Gorman , "linux-mm@kvack.org" , Nadav Amit , Rik van Riel , Dave Hansen , Arjan van de Ven , Peter Zijlstra Subject: Re: [PATCH v3 02/11] x86/ldt: Simplify LDT switching logic In-Reply-To: <2a859ac01245f9594c58f9d0a8b2ed8a7cd2507e.1498022414.git.luto@kernel.org> Message-ID: References: <2a859ac01245f9594c58f9d0a8b2ed8a7cd2507e.1498022414.git.luto@kernel.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 650 Lines: 15 On Tue, 20 Jun 2017, Andy Lutomirski wrote: > When we redo lazy mode to stop flush IPIs without switching to > init_mm, though, the current logic would become incorrect: it will > be possible to have real_prev == next but nonetheless have a stale > LDT descriptor. > > Simplify the code to update LDTR if either the previous or the next > mm has an LDT, i.e. effectively restore the historical logic.. > While we're at it, clean up the code by moving all the ifdeffery to > a header where it belongs. > > Acked-by: Rik van Riel > Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner