[Devel] [PATCH vz10 21/32] ve: compile the CPUID override propagation only on x86
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Aug 21 19:37:07 MSK 2026
From: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
ve_setup_task() arms TIF_CPUID_OVERRIDE for tasks of a Container whenever
/proc/vz/cpuid_override is in use. Both cpuid_override_on() and the
thread flag are x86-only, so generic kernel/ve/ve.c does not compile on
an architecture without them - User Mode Linux, for one:
kernel/ve/ve.c: error: implicit declaration of function
'cpuid_override_on'
kernel/ve/ve.c: error: 'TIF_CPUID_OVERRIDE' undeclared
Guard the propagation with CONFIG_X86. There is no CPUID to fake
elsewhere, so nothing is lost.
Feature: x86: cpu pools (cpuid override)
https://virtuozzo.atlassian.net/browse/VSTOR-134732
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
kernel/ve/ve.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 3a9f3841fe55..0f0e1a424953 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -1852,8 +1852,10 @@ void ve_setup_task(struct task_struct *task, struct ve_struct *ve)
ve_set_task_start_time(ve, task);
+#ifdef CONFIG_X86
if (cpuid_override_on())
set_tsk_thread_flag(task, TIF_CPUID_OVERRIDE);
+#endif
}
EXPORT_SYMBOL(ve_setup_task);
--
2.47.1
More information about the Devel
mailing list