From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682AbdKJSl2 (ORCPT ); Fri, 10 Nov 2017 13:41:28 -0500 Received: from mga06.intel.com ([134.134.136.31]:7940 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753642AbdKJSl1 (ORCPT ); Fri, 10 Nov 2017 13:41:27 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,375,1505804400"; d="scan'208";a="3568928" Subject: Re: [PATCH 20/30] x86, mm: remove hard-coded ASID limit checks To: Peter Zijlstra References: <20171108194646.907A1942@viggo.jf.intel.com> <20171108194724.C0167D83@viggo.jf.intel.com> <20171110122030.5zyplbb3tnwpa2vu@hirez.programming.kicks-ass.net> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, moritz.lipp@iaik.tugraz.at, daniel.gruss@iaik.tugraz.at, michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, luto@kernel.org, torvalds@linux-foundation.org, keescook@google.com, hughd@google.com, x86@kernel.org From: Dave Hansen Message-ID: <52465ada-a7e9-ccb3-e946-5a7c8a0476c5@linux.intel.com> Date: Fri, 10 Nov 2017 10:41:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171110122030.5zyplbb3tnwpa2vu@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/2017 04:20 AM, Peter Zijlstra wrote: > On Wed, Nov 08, 2017 at 11:47:24AM -0800, Dave Hansen wrote: >> +#define CR3_HW_ASID_BITS 12 >> +#define NR_AVAIL_ASIDS ((1< That evaluates to 4095 > >> - VM_WARN_ON_ONCE(asid > 4094); >> + VM_WARN_ON_ONCE(asid > NR_AVAIL_ASIDS); > Not the same number I think this got fixed up in the next patch (the check becomes a >=), but I'll fix this to make it more clean and fix the intermediate breakage.