[Devel] [PATCH hci-8.1 v6 2/5] x86/ve: enable CPUID faulting at once when the current task enters a VE

Konstantin Khorenko khorenko at virtuozzo.com
Thu Oct 8 16:38:07 MSK 2026


On 10/8/26 12:18, Vasileios Almpanis wrote:
>> ve_setup_task() only sets TIF_CPUID_OVERRIDE. The MSR follows the flag
>> in __switch_to_xtra(), so a task that enters a VE through unshare() or
>> setns() keeps executing CPUID natively until it is scheduled out for the
>> first time and sees the host values instead of the override table.
>>
>> Add set_cpuid_override(), which sets the flag and, like disable_cpuid(),
>> flips the CPU state synchronously when the task is the current one.
>> Tasks set up through clone() are not running yet and are still handled
>> at their first switch-in.
>>
>> https://virtuozzo.atlassian.net/browse/VSTOR-148843
>>
>> Feature: x86: cpu pools (cpuid override)
> NIT: Fixes tag? Should be the same as patch 4 no?

Not exactly, it's for another commit, so i will add during the commit:
Fixes: 50d388697a2c ("x86: make ARCH_[SET|GET]_CPUID friends with /proc/vz/cpuid_override")




More information about the Devel mailing list