diff options
author | Tianyu Lan <tiala@microsoft.com> | 2025-03-13 11:52:17 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2025-03-21 00:23:03 +0300 |
commit | e792d843aa3c9d039074cdce728d5803262e57a7 (patch) | |
tree | 6aad5083402ed7eb30fd04076a1f05eb4bdf1e90 /arch/x86/hyperv | |
parent | 07b74192e6170571892c09bf5c4352a85db22557 (diff) | |
download | linux-e792d843aa3c9d039074cdce728d5803262e57a7.tar.xz |
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>
Diffstat (limited to 'arch/x86/hyperv')
-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; |