Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp618942ybx; Wed, 6 Nov 2019 23:48:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxt4LiDRunLNtmsMS8FK3G+wkaHwq0aXFHH2U6gOKm9IP42kvmVSwJ54LEavNlp3PSNHtd1 X-Received: by 2002:aa7:cd69:: with SMTP id ca9mr2076584edb.129.1573112929974; Wed, 06 Nov 2019 23:48:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573112929; cv=none; d=google.com; s=arc-20160816; b=FFQe6eq37K2uoYvn84OnBaIo6LKCgGEi1c6ldcNSM1Hhw/Y35yAE8h/dkz1myDQIhV Q06dhwnOUbpYOW7qj4mM9LJ3oSU8xzmy9dqqew42Jsq20TpgRTtWln6wAnOa7RJCGeNM UXgft4dB06iTrUoULHy4UnCMifeueHnFyPmWJZdNqvcIYvmNNIgSj9jFQL2rhgh1p3kg pqZbnv+cPbAW4eFS4j+XCt9xtKwJGUwr3+4l0dVIF0H/jQI5pUXWSBB7AsPvF8CFpjSa 5o/WB/w9d/OG9gaQoNXPu5yeTiZShtcUE0LRtZPUmwd9LdAMCINc7ongqk5cxKOU4SjD uCBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=SWMtH0m3sUQxC9e77RkgRG5TNGyuHaa3vwULUxcpm/o=; b=jLFYkcudIzMr+0QUlKO1zDf3C9PqOhmGTzD4VZ2TdDuegbwlHIxMXBYn4kW8lSPwe4 pv6jwNsgooB9eZ2PIIj9DKqqJcycAv9hSXZW/BoPm+cV9gs5zOZZW37f7maHRLvIiE9Q 2zZkkyE0d6q3WeXc4zPH61EIp8iEi7FlIfBjOEy1E38Ub1XT8hHf2zFvfx5bEkizIoyb BqslNgFew4DrlZYiLtxoEOr1l13rxfYQkW1LCx2soYU3+7IQhbOpykMGgNJLG3j6E9A9 6mTwvmVr2C8PVOe6UM68nqzTUmv9U+cST5Naq14gOkci+pLp1nJQFDUvpOb2cpKiqIB/ Jupg== 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 s17si882473ejr.229.2019.11.06.23.48.27; Wed, 06 Nov 2019 23:48:49 -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 S1727120AbfKGHpg (ORCPT + 99 others); Thu, 7 Nov 2019 02:45:36 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:46349 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbfKGHpg (ORCPT ); Thu, 7 Nov 2019 02:45:36 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iScU0-0000UI-FP; Thu, 07 Nov 2019 08:45:32 +0100 Date: Thu, 7 Nov 2019 08:45:26 +0100 (CET) From: Thomas Gleixner To: Ingo Molnar cc: LKML , x86@kernel.org, Stephen Hemminger , Willy Tarreau , Juergen Gross , Sean Christopherson , Linus Torvalds , "H. Peter Anvin" Subject: Re: [patch 5/9] x86/ioport: Reduce ioperm impact for sane usage further In-Reply-To: <20191107073719.GD30739@gmail.com> Message-ID: References: <20191106193459.581614484@linutronix.de> <20191106202806.241007755@linutronix.de> <20191107073719.GD30739@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1692257517-1573112732=:1869" X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1692257517-1573112732=:1869 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 7 Nov 2019, Ingo Molnar wrote: > * Thomas Gleixner wrote: > > /* > > - * The extra 1 is there because the CPU will access an > > - * additional byte beyond the end of the IO permission > > - * bitmap. The extra byte must be all 1 bits, and must > > - * be within the limit. > > + * The extra 1 is there because the CPU will access an additional > > + * byte beyond the end of the I/O permission bitmap. The extra byte > > + * must have all bits set and must be within the TSS limit. > > */ > > unsigned long io_bitmap[IO_BITMAP_LONGS + 1]; > > } __aligned(PAGE_SIZE); > > Note that on 32-bit kernels this blows up our CPU area calculations: > > ./include/linux/compiler.h:350:38: error: call to ‘__compiletime_assert_181’ declared with attribute error: BUILD_BUG_ON failed: CPU_ENTRY_AREA_PAGES * PAGE_SIZE < CPU_ENTRY_AREA_MAP_SIZE > ./include/linux/compiler.h:331:4: note: in definition of macro ‘__compiletime_assert’ > ./include/linux/compiler.h:350:2: note: in expansion of macro ‘_compiletime_assert’ > ./include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ > ./include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ > arch/x86/mm/cpu_entry_area.c:181:2: note: in expansion of macro ‘BUILD_BUG_ON’ > make[2]: *** [scripts/Makefile.build:265: arch/x86/mm/cpu_entry_area.o] Error 1 Duh. /me goes investigate. --8323329-1692257517-1573112732=:1869--