Re: [PATCH v5 07/22] coco/tdx-host: Implement firmware upload sysfs ABI for TDX module updates
From: Chao Gao
Date: Wed Mar 18 2026 - 04:32:40 EST
>> Signed-off-by: Chao Gao <chao.gao@xxxxxxxxx>
>> Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>
>
>Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
Thanks a lot for your reviews.
<snip>
>> static int seamldr_init(struct device *dev)
>> {
>> + const struct tdx_sys_info *tdx_sysinfo = tdx_get_sysinfo();
>> + struct fw_upload *tdx_fwl;
>> + int ret;
>> +
>> + if (WARN_ON_ONCE(!tdx_sysinfo))
>> + return -EIO;
>> +
>> + if (!tdx_supports_runtime_update(tdx_sysinfo))
>> + return 0;
>
>Hm. Do we still want to register seamldr_group for this case?
seamldr_group currently serves only module updates, so registering it when
updates aren't supported seems unnecessary.
>
>Maybe move it up before the check?
If new use cases emerge and need seamldr version etc, we can do the
changes.
FWIW, seamldr_group visibility does matter in one case: it must be
hidden on CPUs with an erratum (see
https://lore.kernel.org/kvm/20260315135920.354657-19-chao.gao@xxxxxxxxx/)