]> git.itanic.dy.fi Git - linux-stable/commit
x86/hyperv: Use per cpu initial stack for vtl context
authorSaurabh Sengar <ssengar@linux.microsoft.com>
Sun, 3 Mar 2024 08:01:36 +0000 (00:01 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:30 +0000 (18:17 -0400)
commit53c3716d17da4ac0f7c4bf9447e593f4e49aa965
treef3cb6d97ef19c86c310dbb914960c84ee45009af
parent6595eae98ab5363e7aa2ef2592b6ce72231894fe
x86/hyperv: Use per cpu initial stack for vtl context

[ Upstream commit 2b4b90e053a29057fb05ba81acce26bddce8d404 ]

Currently, the secondary CPUs in Hyper-V VTL context lack support for
parallel startup. Therefore, relying on the single initial_stack fetched
from the current task structure suffices for all vCPUs.

However, common initial_stack risks stack corruption when parallel startup
is enabled. In order to facilitate parallel startup, use the initial_stack
from the per CPU idle thread instead of the current task.

Fixes: 3be1bc2fe9d2 ("x86/hyperv: VTL support for Hyper-V")
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1709452896-13342-1-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1709452896-13342-1-git-send-email-ssengar@linux.microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/hyperv/hv_vtl.c
drivers/hv/Kconfig