From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbdKNCZt (ORCPT ); Mon, 13 Nov 2017 21:25:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:57376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbdKNCZq (ORCPT ); Mon, 13 Nov 2017 21:25:46 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0599621912 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: AGs4zMar2U3Wmh3l1B2R+jraF38ovVn/yIvnepFk2XtbkZumilaxTNOhKUKodbG8x+l7D6IecsGkxEKx0CLzavyvIqM= MIME-Version: 1.0 In-Reply-To: References: <5b424fefa9230917995d0584b40bc539a9bd9224.1510371795.git.luto@kernel.org> <3e2bdf66-cbd4-4e78-ead1-e5c99d2a6d08@intel.com> From: Andy Lutomirski Date: Mon, 13 Nov 2017 18:25:24 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC 6/7] x86/asm: Remap the TSS into the cpu entry area To: Linus Torvalds Cc: Dave Hansen , Andy Lutomirski , X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 13, 2017 at 11:36 AM, Linus Torvalds wrote: > On Mon, Nov 13, 2017 at 11:22 AM, Dave Hansen wrote: >> >> Aha, and here's the place that you need sizeof(tss_struct) to be nice >> and page-aligned. > > No, it should _not_ be page-aligned. It should fit _within_ a page, > but it 'struct tss_struct' now has something else in front of it, then > page-aliging that is actually pointless. > > I forget what the actual size is, but aligning the hardware TSS struct > to 128 bytes might be sufficient. It's not that big. 104 bytes, so it's probably already fine. For anything except an actual task switch, only the first 12 or so bytes matter.