diff options
| author | Nuno Das Neves <nunodasneves@linux.microsoft.com> | 2025-02-21 22:56:33 +0300 |
|---|---|---|
| committer | Wei Liu <wei.liu@kernel.org> | 2025-02-22 05:21:45 +0300 |
| commit | 9d8731a1757bef8630cb47e5ae3a1abbcf863e90 (patch) | |
| tree | 09ebca58f585bcb8d456bb5ca0aa1f445eec680e /include | |
| parent | 3a7f7785eae7cf012af128ca9e383c91e4955354 (diff) | |
| download | linux-9d8731a1757bef8630cb47e5ae3a1abbcf863e90.tar.xz | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/mshyperv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-generic/mshyperv.h b/include/asm-generic/mshyperv.h index 7adc10a4fa3e..3f115e2bcdaa 100644 --- a/include/asm-generic/mshyperv.h +++ b/include/asm-generic/mshyperv.h @@ -297,6 +297,7 @@ static inline int cpumask_to_vpset_skip(struct hv_vpset *vpset, return __cpumask_to_vpset(vpset, cpus, func); } +int hv_result_to_errno(u64 status); void hyperv_report_panic(struct pt_regs *regs, long err, bool in_die); bool hv_is_hyperv_initialized(void); bool hv_is_hibernation_supported(void); |
