Skip to content

Commit

Permalink
powerpc/pseries/vas: Don't print an error when VAS is unavailable
Browse files Browse the repository at this point in the history
KVM does not support VAS so guests always print a useless error on boot

    vas: HCALL(398) error -2, query_type 0, result buffer 0x57f2000

Change this to only print the message if the error is not H_FUNCTION.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211126052133.1664375-1-npiggin@gmail.com
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Dec 16, 2021
1 parent 6ed05a8 commit 0a006ac
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions arch/powerpc/platforms/pseries/vas.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,15 @@ int h_query_vas_capabilities(const u64 hcall, u8 query_type, u64 result)
if (rc == H_SUCCESS)
return 0;

pr_err("HCALL(%llx) error %ld, query_type %u, result buffer 0x%llx\n",
hcall, rc, query_type, result);
/* H_FUNCTION means HV does not support VAS so don't print an error */
if (rc != H_FUNCTION) {
pr_err("%s error %ld, query_type %u, result buffer 0x%llx\n",
(hcall == H_QUERY_VAS_CAPABILITIES) ?
"H_QUERY_VAS_CAPABILITIES" :
"H_QUERY_NX_CAPABILITIES",
rc, query_type, result);
}

return -EIO;
}
EXPORT_SYMBOL_GPL(h_query_vas_capabilities);
Expand Down

0 comments on commit 0a006ac

Please sign in to comment.