Drivers: hv: Use -ETIMEDOUT for HV_STATUS_TIME_OUT instead of -EIO
Subsystems (2)
PATCH 1/1 Drivers: hv: Use -ETIMEDOUT for HV_STATUS_TIME_OUT instead of -EIO
Use the -ETIMEDOUT errno value as the correct 1:1 match for the hypervisor timeout status
--- drivers/hv/hv_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hv/hv_common.c +1 -1
@@ -781,7 +781,7 @@ static const struct hv_status_info hv_status_infos[] = {_STATUS_INFO (HV_STATUS_INVALID_LP_INDEX , -EIO ),_STATUS_INFO (HV_STATUS_INVALID_REGISTER_VALUE , -EIO ),_STATUS_INFO (HV_STATUS_OPERATION_FAILED , -EIO ), -_STATUS_INFO (HV_STATUS_TIME_OUT , -EIO ), +_STATUS_INFO (HV_STATUS_TIME_OUT , -ETIMEDOUT ),_STATUS_INFO (HV_STATUS_CALL_PENDING , -EIO ),_STATUS_INFO (HV_STATUS_VTL_ALREADY_ENABLED , -EIO ), #undef _STATUS_INFO
Signature · 1 line
2.43.0
Quoted 14 lines · Easwar Hariharan
Use the
-ETIMEDOUTerrno value as the correct 1:1 match for the hypervisor timeout statusFixes 3817854ba89201 ("hyperv: Log hypercall status codes as strings")Signed-off-by Easwar Hariharan <[email protected]>--- drivers/hv/hv_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hv/hv_common.c +0
-0
drivers/hv/hv_common.c static const struct hv_status_info hv_status_infos[] = { · line 787
Quoted 8 lines
drivers/hv/hv_common.c +1
-1@@ -781,7 +781,7 @@ static const struct hv_status_info hv_status_infos[] = {_STATUS_INFO (HV_STATUS_INVALID_LP_INDEX , -EIO ),_STATUS_INFO (HV_STATUS_INVALID_REGISTER_VALUE , -EIO ),_STATUS_INFO (HV_STATUS_OPERATION_FAILED , -EIO ), -_STATUS_INFO (HV_STATUS_TIME_OUT , -EIO ), +_STATUS_INFO (HV_STATUS_TIME_OUT , -ETIMEDOUT ),_STATUS_INFO (HV_STATUS_CALL_PENDING , -EIO ),_STATUS_INFO (HV_STATUS_VTL_ALREADY_ENABLED , -EIO ), #undef _STATUS_INFO
Actually looking at the whole struct, it may be useful to also change at least some of
the following codes?
_STATUS_INFO(HV_STATUS_INVALID_ALIGNMENT, -EIO), -> EINVAL
_STATUS_INFO(HV_STATUS_ACCESS_DENIED, -EIO), -> EACCES
_STATUS_INFO(HV_STATUS_INVALID_PARTITION_STATE, -EIO), -> EINVAL
_STATUS_INFO(HV_STATUS_OPERATION_DENIED, -EIO), -> EACCES
_STATUS_INFO(HV_STATUS_PROPERTY_VALUE_OUT_OF_RANGE, -EIO), -> ERANGE
_STATUS_INFO(HV_STATUS_INSUFFICIENT_BUFFERS, -EIO), -> ENOBUFS
_STATUS_INFO(HV_STATUS_NOT_ACKNOWLEDGED, -EIO), -> EBUSY
_STATUS_INFO(HV_STATUS_INVALID_VP_STATE, -EIO), -> EINVAL
_STATUS_INFO(HV_STATUS_INVALID_LP_INDEX, -EIO), -> EINVAL
_STATUS_INFO(HV_STATUS_INVALID_REGISTER_VALUE, -EIO), -> EINVAL
_STATUS_INFO(HV_STATUS_VTL_ALREADY_ENABLED, -EIO), -> EBUSYNuno, Stas, others, what do you think?
Thanks,
Easwar (he/him)
Quoted 3 lines · Easwar Hariharan
Use the
-ETIMEDOUTerrno value as the correct 1:1 match for the hypervisor timeout status
The commit message should answer the question why this change is being made.
Is there a practical reason for this or is it only for consistensy?
Thanks,
Stanislav
Quoted 21 lines
Fixes 3817854ba89201 ("hyperv: Log hypercall status codes as strings")Signed-off-by Easwar Hariharan <[email protected]>--- drivers/hv/hv_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hv/hv_common.c +1
-1@@ -781,7 +781,7 @@ static const struct hv_status_info hv_status_infos[] = {_STATUS_INFO (HV_STATUS_INVALID_LP_INDEX , -EIO ),_STATUS_INFO (HV_STATUS_INVALID_REGISTER_VALUE , -EIO ),_STATUS_INFO (HV_STATUS_OPERATION_FAILED , -EIO ), -_STATUS_INFO (HV_STATUS_TIME_OUT , -EIO ), +_STATUS_INFO (HV_STATUS_TIME_OUT , -ETIMEDOUT ),_STATUS_INFO (HV_STATUS_CALL_PENDING , -EIO ),_STATUS_INFO (HV_STATUS_VTL_ALREADY_ENABLED , -EIO ), #undef _STATUS_INFOSignature · 1 line
2.43.0
Quoted 9 lines · Stanislav Kinsburskii
Quoted 3 lines · Easwar Hariharan
Use the
-ETIMEDOUTerrno value as the correct 1:1 match for the hypervisor timeout statusThe commit message should answer the question why this change is being made.
Is there a practical reason for this or is it only for consistensy?
<snip>
It's for consistency and because it's a better match. See my sibling response for other error codes that I can also fix in a v2.
Thanks,
Easwar (he/him)