Re: [PATCH RFC v1 06/11] x86/fpu/mpx: Remove MPX xstate component support

From: Chang S. Bae
Date: Thu Mar 20 2025 - 19:47:23 EST


On 2/27/2025 7:12 PM, Chang S. Bae wrote:
On 2/27/2025 11:12 AM, Ingo Molnar wrote:

So can this patch be moved further up in the series (without breaking
anything), to make it easier to review the impact of the APX changes?

Will do it.

If the xfeature_noncompact_order[] table is dynamically populated at boot time, the kernel should be able to maintain the order list flexibly enough without dropping MPX bits.

So, I posted V2 [1] with this patch removed -- after observing MPX being exposed to a KVM guest when running this version on an Skylake machine and confirming that APX support passed self-tests on an APX-emulated system.

I also considered handling MPX removal up to the KVM code in a separate series, which would eliminate about 220 lines. However, given previous discussions like [2], posting that cleanup now might appear to disregard those concerns. Perhaps it’s something to revisit in five years or more.

In the meantime, kernel memory usage could be improved by treating MPX as VCPU-only, aligning with the ongoing supervisor CET state handling work [3].

Thanks,
Chang

[1] https://lore.kernel.org/lkml/20250320234301.8342-1-chang.seok.bae@xxxxxxxxx/
[2] https://lore.kernel.org/lkml/CALMp9eTD+GeiKK9E5_JUOy7YXPTq9z2f2LcyXZL5ypQ6vBHrHg@xxxxxxxxxxxxxx/
[3] https://lore.kernel.org/lkml/20250318153316.1970147-1-chao.gao@xxxxxxxxx/