hyperv: Convert hypercall statuses to linux error codes
authorNuno Das Neves <nunodasneves@linux.microsoft.com>
Fri, 21 Feb 2025 19:56:33 +0000 (11:56 -0800)
committerWei Liu <wei.liu@kernel.org>
Sat, 22 Feb 2025 02:21:45 +0000 (02:21 +0000)
commit9d8731a1757bef8630cb47e5ae3a1abbcf863e90
tree09ebca58f585bcb8d456bb5ca0aa1f445eec680e
parent3a7f7785eae7cf012af128ca9e383c91e4955354
hyperv: Convert hypercall statuses to linux error codes

Return linux-friendly error codes from hypercall helper functions,
which allows them to be used more flexibly.

Introduce hv_result_to_errno() for this purpose, which also handles
the special value U64_MAX returned from hv_do_hypercall().

Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/1740167795-13296-2-git-send-email-nunodasneves@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <1740167795-13296-2-git-send-email-nunodasneves@linux.microsoft.com>
drivers/hv/hv_common.c
drivers/hv/hv_proc.c
include/asm-generic/mshyperv.h