[PATCH v5 01/10] hyperv: Convert Hyper-V status codes to strings
Roman Kisel
romank at linux.microsoft.com
Thu Feb 27 09:02:09 PST 2025
On 2/26/2025 3:07 PM, Nuno Das Neves wrote:
[...]
> +
> +const char *hv_result_to_string(u64 hv_status)
> +{
> + switch (hv_result(hv_status)) {
[...]
> + return "HV_STATUS_VTL_ALREADY_ENABLED";
> + default:
> + return "Unknown";
> + };
> + return "Unknown";
> +}
> +EXPORT_SYMBOL_GPL(hv_result_to_string);
Should we remove this and output the hexadecimal error code in ~3 places
this function is used?
The "Unknown" part would make debugging harder actually when something
fails. I presume that the mainstream scenarios all work, and it is the
edge cases that might fail, and these are likelier to produce "Unknown".
Folks who actually debug failed hypercalls rarely have issues with
looking up the error code, and printing "Unknown" to the log is worse
than a hexadecimal. Like even the people who wrote the code got nothing
to say about what is going on.
--
Thank you,
Roman
More information about the linux-arm-kernel
mailing list