On Wed, Jun 25, 2025 at 11:55:05AM +0800, Xiaoyao Li wrote:
> Date: Wed, 25 Jun 2025 11:55:05 +0800
> From: Xiaoyao Li <xiaoyao...@intel.com>
> Subject: [PATCH] i386/tdx: Remove task->watch only when it's valid
> X-Mailer: git-send-email 2.43.0
> 
> In some case (e.g., failed to connect to QGS socket),
> tdx_generate_quote_cleanup() is called with task->watch invalid. It
> triggers assertion of
> 
>   qemu-system-x86_64: GLib: g_source_remove: assertion 'tag > 0' failed
> 
> Fix it by checking task->watch.
> 
> Fixes: 40da501d8989 ("i386/tdx: handle TDG.VP.VMCALL<GetQuote>")
> Signed-off-by: Xiaoyao Li <xiaoyao...@intel.com>
> ---
>  target/i386/kvm/tdx-quote-generator.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Zhao Liu <zhao1....@intel.com>


Reply via email to