On 4/25/2025 10:18 AM, Saurabh Singh Sengar wrote:
On 4/25/2025 2:14 AM, Saurabh Singh Sengar wrote:
On Thu, Apr 24, 2025 at 02:57:46PM -0700, Roman Kisel wrote:
To start an application processor in SNP-isolated guest, a hypercall
is used that takes a virtual processor index. The hv_snp_boot_ap()
function uses that START_VP hypercall but passes as VP ID to it what
it receives as a wakeup_secondary_cpu_64 callback: the APIC ID.
As those two aren't generally interchangeable, that may lead to hung
APs if VP IDs and APIC IDs don't match, e.g. APIC IDs might be
sparse whereas VP IDs never are.
Update the parameter names to avoid confusion as to what the
parameter is. Use the APIC ID to VP ID conversion to provide correct
input to the hypercall.
Cc: sta...@vger.kernel.org
Fixes: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP
guest")
Signed-off-by: Roman Kisel <rom...@linux.microsoft.com>
Applied to hyperv-fixes.
This patch will break the builds.
Roman,
Have you tested this patch on the latest linux-next ?
Thanks for your help! Only on hyperv-next, looking how to repro and fix on
linux-next. The kernel robot was happy, or I am missing some context about
how the robot works...
What was your kernel configuration, or just anything that enables Hyper-V?
I thought the the linux-next tree would be a subset of hyper-next so should
work, realizing that have to check, likely there might be changes from other
trees.
hyperv-fixes is broken too, here's the log for your ref:
https://dashboard.kernelci.org/log-viewer?itemId=microsoft%3A20250425085833916790&o=microsoft&type=build&url=https%3A%2F%2Flisalogsb15850d3.blob.core.windows.net%2Flisa-logs%2Fdefault_default%2F20250425%2F20250425-085110-393%2Fkernel_installer%2Fbuild.log%3Fst%3D2025-04-25T09%253A09%253A35Z%26se%3D2025-05-02T09%253A09%253A35Z%26sp%3Dr%26sv%3D2024-11-04%26sr%3Db%26skoid%3D14b53b1d-f4fc-442e-a437-4989376b1754%26sktid%3D72f988bf-86f1-41af-91ab-2d7cd011db47%26skt%3D2025-04-25T09%253A09%253A35Z%26ske%3D2025-05-02T09%253A09%253A35Z%26sks%3Db%26skv%3D2024-11-04%26sig%3DZHfA7%2FC174KR6HT8zhchCb47NE1aceqw8h0APzKxsII%253D
The hv_snp_boot_ap() function in arch/x86/hyperv/ivm.c currently fails to
compile.
It looks like the function's argument was changed from 'cpu' to 'apic_id', but
internal
references to cpu were not updated accordingly.
This might have gone unnoticed during your testing if CONFIG_AMD_MEM_ENCRYPT
was disabled, in which case this function wouldn't have been compiled.
Must be the case! I did run the command to merge the CVM specific config
options but I didn't check the result.
Yep, I see the issue. Will resend the patch.
Regards,
Saurabh
--
Thank you,
Roman