Re: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind operations

From: Xiaoyao Li

Date: Wed Oct 28 2026 - 22:38:27 EST


On 10/27/2026 4:58 PM, Duan, Zhenzhong wrote:
>> Btw, for TDX specific tdx_devsec_unlock(), the WARN_ON() is not proper
>> IMHO.
>> the failure can happen for various reasons, and the WARN can be treated as
>> fatal
>> when panic_on_warn is true. I think pr_warn_ratelimit() would suffice?
> OK, but unlock() isn't a loop operation, I prefer to use pr_warn().

I think guest userspace can invoke unlock() in a writing sysfs loop?

If a device is not locked before, the unlock() will surely fail? If so, I think
we can drop the warn/WARN.