From nobody Sun Feb 8 21:25:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664185445; cv=none; d=zohomail.com; s=zohoarc; b=B+H4CPPTc3qunQgKBYIfptoQPYucAxVx8IG3AtYU9qMXj1S3J6RkMSCKDeShS9btAsfS8uzpNNzBjPFGuQ8B1t3bxO3ML5wTDK3rwAicRE8poN8V6zntZ5UuDwZ89SnqbPLHAd4ADtqCSN0b9NyX5vtlbtI9Zo4N/bSaqDPMIIM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664185445; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=DWw3dg3VXbYV6uaA7GSYz5BRlyQ6PXpGO3FLXpbCkjg=; b=h706TZHK9yriN58HODh7wQfWcvxnLyjX/wgOsP+jp6ngM9zhCeLcMVQ83EJ3c2li3LffWcl3b5YMFWL0pa80qicI4l381Fmg8Vu6eYW3kPqnm9zB1p/MNjwWYA9fd5U2PDmbQBW4WhfEvKd7iEqdVYEszvB0bQq10cfna+Aw1pg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1664185445964376.0132976699608; Mon, 26 Sep 2022 02:44:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-675-onyk-pQmPh69Ritn0Gyrzw-1; Mon, 26 Sep 2022 05:43:31 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D98C862FF1; Mon, 26 Sep 2022 09:43:29 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4BD32087440; Mon, 26 Sep 2022 09:43:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2E88C194658D; Mon, 26 Sep 2022 09:43:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AA4461946586 for ; Mon, 26 Sep 2022 09:43:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7AF6C492CA5; Mon, 26 Sep 2022 09:43:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7392D492CA2 for ; Mon, 26 Sep 2022 09:43:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4F621101CC6D for ; Mon, 26 Sep 2022 09:43:23 +0000 (UTC) Received: from cmccmta1.chinamobile.com (cmccmta1.chinamobile.com [221.176.66.79]) by relay.mimecast.com with ESMTP id us-mta-554-TwmSvSbaOR-tYBofhzxfXA-1; Mon, 26 Sep 2022 05:43:17 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.19]) by rmmx-syy-dmz-app04-12004 (RichMail) with SMTP id 2ee46331743269f-fa0ff; Mon, 26 Sep 2022 17:43:14 +0800 (CST) Received: from LAPTOP-CDJ95CPL (unknown[223.108.79.103]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea63317431872-81c0f; Mon, 26 Sep 2022 17:43:14 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664185444; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=DWw3dg3VXbYV6uaA7GSYz5BRlyQ6PXpGO3FLXpbCkjg=; b=DvLr/1CgKBATDY4IHyrBEf0YpZhFFRv43+K/64e2NkfQDWn7XBM5nGRiTZsouICA2AoWbA /oxk/Z2FqGlKZk2SPM4MkF6quo+fH7BKLBkIOOkYrDv8QFZlbSY+zRyIQmKNcvxNVxHKNX GBc/DqKg8QwrtRH5Y3yWETdeL/VP75k= X-MC-Unique: onyk-pQmPh69Ritn0Gyrzw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: TwmSvSbaOR-tYBofhzxfXA-1 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee46331743269f-fa0ff X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2eea63317431872-81c0f MIME-Version: 1.0 x-PcFlag: 7f3cd496-83e1-413e-b6c7-a13ffd875795_5_31480 Date: 26 Sep 2022 17:43:13 +0800 From: =?utf-8?B?5LiB5Li95pWP?= To: =?utf-8?B?UGV0ZXIgS3JlbXBh?= Subject: [PATCH v2] Log alarms should be generated even if the QEMU process is not stopped Message-ID: <20220926174313549960014@cmss.chinamobile.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/Alternative; boundary="----=_001_NextPart549960014_=----" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664185447898100001 This is a multi-part message in MIME format. ------=_001_NextPart549960014_=---- Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" If the qemu process is shutdown and flag is set to VIR_QEMU_PROCESS_KIL= L_NOWAIT, a log alarm is generated even if the qemu process is not stopped= . Signed-off-by: dinglimin --- v1:ht= tps://www.mail-archive.com/libvir-list@redhat.com/msg232232.html diff to v= 1: - Add the patch 's description. - Change the code format. --- sr= c/qemu/qemu_process.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 del= etions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.= c index cbfdd3bda5..d876e345a0 100644 --- a/src/qemu/qemu_process.c +++ = b/src/qemu/qemu_process.c @@ -8006,9 +8006,11 @@ qemuProcessKill(virDomain= Obj *vm, unsigned int flags) } if (flags & VIR_QEMU_PROC= ESS_KILL_NOWAIT) { - virProcessKill(vm->pid, - = (flags & VIR_QEMU_PROCESS_KILL_FORCE) ? - SIG= KILL : SIGTERM); + if (virProcessKill(vm->pid, + = (flags & VIR_QEMU_PROCESS_KILL_FORCE) ? + = SIGKILL : SIGTERM);) { + VIR_DEBUG("Failed to terminate qe= mu process"); + } return 0; } -- 2.18.4 ------=_001_NextPart549960014_=---- Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
a log alarm is generated= even if the qemu process is not stopped.

Signed-off-by: di= nglimin <dinglimin@cmss.chinamobile.com>
---
v1:https://ww= w.mail-archive.com/libvir-list@redhat.com/msg232232.html
diff to v1:
- Add the patch 's description.
- Change the code format.
-= --

 src/qemu/qemu_process.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 dele= tions(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qe= mu_process.c
index cbfdd3bda5..d= 876e345a0 100644
--- a/src/qemu/= qemu_process.c
+++ b/src/qemu/qe= mu_process.c
@@ -8006,9 +8006,11= @@ qemuProcessKill(virDomainObj *vm, unsigned int flags)
     }

  &n= bsp;  if (flags & VIR_QEMU_PROCESS_KILL_NOWAIT) {
-        virProcessKill(vm-= >pid,
-       =                 (flags & VIR_QE= MU_PROCESS_KILL_FORCE) ?
-  = ;                     SIG= KILL : SIGTERM);
+    =    if (virProcessKill(vm->pid,
+                 &nbs= p;        (flags & VIR_QEMU_PROCESS_KILL_FORCE) ?
+         &nb= sp;                SIGKILL : SIGTER= M);) {
+       &n= bsp;    VIR_DEBUG("Failed to terminate qemu process");
+        }
         return 0;=
     }

-- 
2.18.4

------=_001_NextPart549960014_=------