[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200407142002.jxzc3xcuyoznjgkh@two.firstfloor.org>
Date: Tue, 7 Apr 2020 07:20:03 -0700
From: Andi Kleen <andi@...stfloor.org>
To: Keno Fischer <keno@...iacomputing.com>
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andi Kleen <andi@...stfloor.org>,
Kyle Huey <khuey@...ehuey.com>,
Robert O'Callahan <robert@...llahan.org>
Subject: Re: [RFC PATCH v2] x86/arch_prctl: Add ARCH_SET_XCR0 to set XCR0
per-thread
> Thank you in advance for any review comments - I thought the comments
> on v1 were quite helpful. I understand this is a tall ask for mainline
> inclusion, but the feature is just too useful for me to give up ;).
> [1] https://lkml.org/lkml/2018/6/16/134
The rationale from that post should have been in this description.
You can already do what you want using the clearcpuid= boot flags using the
infrastructure in [1], which is in newer kernels.
So to disable AVX512 you would use clearcpuid=304 and the AVX feature
set should be the same as Haswell. To disable AVX2 you would use
clearcpuid=293 and you get the same feature set as Sandy Bridge.
A boot option is not as convenient as a run time setting, but has a lot
less weird corner cases.
-Andi
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/x86/kernel/cpu/cpuid-deps.c?id=0b00de857a648dafe7020878c7a27cf776f5edf4
-Andi
Powered by blists - more mailing lists