[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWFyBbuxqQnnQhg0h_TkBZ666iDHiCVb6-X_yXFm-v7pQ@mail.gmail.com>
Date: Tue, 12 Nov 2019 07:37:11 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Linus Torvalds <torvalds@...uxfoundation.org>,
Andy Lutomirski <luto@...nel.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Willy Tarreau <w@....eu>, Juergen Gross <jgross@...e.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [patch V2 04/16] x86/tss: Fix and move VMX BUILD_BUG_ON()
On Mon, Nov 11, 2019 at 2:35 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> The BUILD_BUG_ON(IO_BITMAP_OFFSET - 1 == 0x67) in the VMX code is bogus in
> two aspects:
>
> 1) This wants to be in generic x86 code simply to catch issues even when
> VMX is disabled in Kconfig.
>
> 2) The IO_BITMAP_OFFSET is not the right thing to check because it makes
> asssumptions about the layout of tss_struct. Nothing requires that the
> I/O bitmap is placed right after x86_tss, which is the hardware mandated
> tss structure. It pointlessly makes restrictions on the struct
> tss_struct layout.
>
> The proper thing to check is:
>
> - Offset of x86_tss in tss_struct is 0
> - Size of x86_tss == 0x68
>
> Move it to the other build time TSS checks and make it do the right thing.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
Acked-by: Andy Lutomirski <luto@...nel.org>
Powered by blists - more mailing lists