Re: [RFC PATCH v2] x86/arch_prctl: Add ARCH_SET_XCR0 to set XCR0 per-thread

From: Keno Fischer
Date: Tue Apr 07 2020 - 14:06:52 EST


Hi Andi,

> The rationale from that post should have been in this description.

Yes, sorry.

> You can already do what you want using the clearcpuid= boot flags using the
> infrastructure in [1], which is in newer kernels.

Yes, that it useful, but doesn't solve the problem where
we're trying to jointly replay traces with differing XCR0 values
(as mentioned before, this is useful for recordings from multiple
nodes of a distributed system). Even for the single trace
case, having to reboot the system or boot a virtual machine
manually for every bug report I get would be operationally
annoying. A potential solution to the operational problem would
be using the raw kvm API to get a very lightweight VM
with modified XCR0 but that has performance
and complexity concerns.