From nobody Tue Feb 10 05:44:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565276329; cv=none; d=zoho.com; s=zohoarc; b=IGPeisU48YqM7ZTQeeunhsYpcb7wDJu/QUm8BmAAytj0Ku+J9QhllzNcFaWkjd0SOLd6wQ9wI0wc2dSwyu32U6nTVH6Of9l6J/H6Cy5SxvrQMDQPJDPPnAJnZC3a3nZVgFzLBv2mJnziq8G9Z/ec66EpvJwaCR8VwIlvBTdwozg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565276329; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XGPaMitpVfSAMFbNcUM9j7zFh8t1BjUseLji2E0k9O0=; b=gGfd3JgKKc5hKLdJy8Qk08A3kjAt3f17gmE5tCuxqJahzlojNB5ub0pcqykMLYnq3pX8VPDZEhsABcMK0gHeJUci1sQkWKgJjgElh3hzZKCKVOw1hO04sQSEtrQeUOth5N5y/F8wltoEiSAF5xALks9EkNxtYm7W7tzSnMKdwFc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565276329876464.7985514234092; Thu, 8 Aug 2019 07:58:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB823970EC; Thu, 8 Aug 2019 14:58:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BE0860600; Thu, 8 Aug 2019 14:58:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4DCCB180BAA4; Thu, 8 Aug 2019 14:58:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x78EudJv022954 for ; Thu, 8 Aug 2019 10:56:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8BCFE5C219; Thu, 8 Aug 2019 14:56:39 +0000 (UTC) Received: from localhost (ovpn-112-57.ams2.redhat.com [10.36.112.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id 29EF45C205; Thu, 8 Aug 2019 14:56:33 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Thu, 8 Aug 2019 18:54:58 +0400 Message-Id: <20190808145514.20789-8-marcandre.lureau@redhat.com> In-Reply-To: <20190808145514.20789-1-marcandre.lureau@redhat.com> References: <20190808145514.20789-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [libvirt] [PATCH v2 07/23] qemu: reset VM id after external devices stop X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 08 Aug 2019 14:58:49 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau pid filenames (from swtpm and other helpers from this series) are based on VM shortname, which is derived from VM id. If the id is reset to early, the state filenames will not be found. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michal Privoznik --- src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1ed56457b1..f8d740979d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7400,8 +7400,6 @@ void qemuProcessStop(virQEMUDriverPtr driver, =20 qemuProcessBuildDestroyMemoryPaths(driver, vm, NULL, false); =20 - vm->def->id =3D -1; - if (virAtomicIntDecAndTest(&driver->nactive) && driver->inhibitCallbac= k) driver->inhibitCallback(false, driver->inhibitOpaque); =20 @@ -7477,6 +7475,8 @@ void qemuProcessStop(virQEMUDriverPtr driver, =20 qemuExtDevicesStop(driver, vm); =20 + vm->def->id =3D -1; + /* Stop autodestroy in case guest is restarted */ qemuProcessAutoDestroyRemove(driver, vm); =20 --=20 2.23.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list