Re: [PATCH v5 3/5] x86/tdx: Add tdx_mcall_extend_rtmr() interface
From: Dave Hansen
Date: Thu May 01 2025 - 13:51:17 EST
On 4/24/25 13:12, Cedric Xing wrote:
> + ret = __tdcall(TDG_MR_RTMR_EXTEND, &args);
> + if (ret) {
> + if (TDCALL_RETURN_CODE(ret) == TDCALL_INVALID_OPERAND)
> + return -ENXIO;
> + if (TDCALL_RETURN_CODE(ret) == TDCALL_OPERAND_BUSY)
> + return -EBUSY;
> + return -EIO;
> + }
This a pretty ugly switch statement. ;)
I assume there are more of these around, but it would be _nice_ if these
could eventually look like:
...
err = __tdcall(...);
return tdx_err_to_errno(err);