Skip to content

Commit e792d84

Browse files
tialaliuw
authored andcommitted
x86/hyperv: Fix check of return value from snp_set_vmsa()
snp_set_vmsa() returns 0 as success result and so fix it. Cc: stable@vger.kernel.org Fixes: 44676bb ("x86/hyperv: Add smp support for SEV-SNP guest") Signed-off-by: Tianyu Lan <tiala@microsoft.com> Reviewed-by: Michael Kelley <mhklinux@outlook.com> Link: https://lore.kernel.org/r/20250313085217.45483-1-ltykernel@gmail.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20250313085217.45483-1-ltykernel@gmail.com>
1 parent 07b7419 commit e792d84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/hyperv/ivm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ int hv_snp_boot_ap(u32 cpu, unsigned long start_ip)
338338
vmsa->sev_features = sev_status >> 2;
339339

340340
ret = snp_set_vmsa(vmsa, true);
341-
if (!ret) {
341+
if (ret) {
342342
pr_err("RMPADJUST(%llx) failed: %llx\n", (u64)vmsa, ret);
343343
free_page((u64)vmsa);
344344
return ret;

0 commit comments

Comments
 (0)