diff options
author | Tianyu Lan <tiala@microsoft.com> | 2025-03-13 04:52:17 -0400 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2025-03-20 21:23:03 +0000 |
commit | e792d843aa3c9d039074cdce728d5803262e57a7 (patch) | |
tree | 6aad5083402ed7eb30fd04076a1f05eb4bdf1e90 | |
parent | 07b74192e6170571892c09bf5c4352a85db22557 (diff) |
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: 44676bb9d566 ("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>
-rw-r--r-- | arch/x86/hyperv/ivm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c index dd68d9ad9b22..c0039a90e9e0 100644 --- a/arch/x86/hyperv/ivm.c +++ b/arch/x86/hyperv/ivm.c @@ -338,7 +338,7 @@ int hv_snp_boot_ap(u32 cpu, unsigned long start_ip) vmsa->sev_features = sev_status >> 2; ret = snp_set_vmsa(vmsa, true); - if (!ret) { + if (ret) { pr_err("RMPADJUST(%llx) failed: %llx\n", (u64)vmsa, ret); free_page((u64)vmsa); return ret; |