From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1574686868; cv=none; d=zohomail.com; s=zohoarc; b=lSZETn7pu9t9Di1CHSWINCdi5fu1dtoZbtZOBDWay1u9qfRKLPNLoe/cNERv/itLSjPVPbqITSIvgDEwqCFHtSDknkWGrvjvX5LIMBmKbMl+RGK0USDGZ1m/zO+3u5ULt8vUQiTUkWbNcoBhW+Dhy6Z3ss6WCymgDY7SqFGTcmU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686868; h=Content-Type:Content-Transfer-Encoding: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; bh=ZQOZ5mH3y8vZ5wRujgOnRMJPrauKMohKhvTBo5Nqi9Y=; b=DlLbGH0Ni5D/56eT01a/UI62AVKJ+fybs3VBTPmvRem+pv9xdpLIVMj5lcsnuOhl9B0sfSRaIoIx96oRCWcue2Bc8AK+UgELHJnplelp7uLUPxZi8s3cSHfLWEf6EMpowzraabB47ruOT6MlYZzzSr+nta7xSNEeB+LJXXArQ0k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1574686868265575.6528395062838; Mon, 25 Nov 2019 05:01:08 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-KKYlGYBkNZ2lMW8VUUHRoA-1; Mon, 25 Nov 2019 07:54:17 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EFC9C10950EB; Mon, 25 Nov 2019 12:54:12 +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 C69CF19C6A; Mon, 25 Nov 2019 12:54:12 +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 7FDDB18089CE; Mon, 25 Nov 2019 12:54:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCrwLf016628 for ; Mon, 25 Nov 2019 07:53:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id B66F8600CA; Mon, 25 Nov 2019 12:53:58 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EF27600C8 for ; Mon, 25 Nov 2019 12:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686867; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZQOZ5mH3y8vZ5wRujgOnRMJPrauKMohKhvTBo5Nqi9Y=; b=c8n6qKbbfinO4jlHT4owTvge9vGCx2MWH76onLc9XhcIC0eQcjgl2GsNuZep+U8eRVLd0z WmNFJEM8oOyUTVlO1zUTFmVUeVapObHPeHVUHB6VF9A6zKARN/1oj8aZa5YnoC8i3r62r8 mtdzxohZkfPglRy6WDLPF1tv/pEMfK8= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:46 +0100 Message-Id: <6960213af724f6cf19f8075cc7faf0e2649c1926.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/9] qemu: process: Make it obvious that virDomainDefPostParse is called with NULL opaque 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: KKYlGYBkNZ2lMW8VUUHRoA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Commit c90fb5a828a added explicit use of the private copy of the qemu capabilities to various places. The change to qemuProcessInit was bogus though as at the point where we re-initiate the post parse callbacks priv->qemuCaps is still NULL as we clear it after shutdown of the VM and don't initiate it until a later point. Using the value from priv->qemuCaps might mislead readers of the code into thinking that something useful is being passed at that point so go with an explicit NULL instead. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 161b3910e5..1b88c471f4 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5531,7 +5531,8 @@ qemuProcessInit(virQEMUDriverPtr driver, if (vm->def->postParseFailed) { VIR_DEBUG("re-running the post parse callback"); - if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, priv->= qemuCaps) < 0) + /* we don't have the private copy of qemuCaps at this point */ + if (virDomainDefPostParse(vm->def, caps, 0, driver->xmlopt, NULL) = < 0) goto cleanup; } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574686452; cv=none; d=zohomail.com; s=zohoarc; b=OHIow9SEpcqoBTRqJNk4Rhsj67L47p3K3mJHM6FgiL2z0aM52xalMZtJPP458KsVNtx/hUIK4kqp5itPeIf8SbfLrb+3DRrIEQXqhjI7aGvG5LyDvYecv06TYNYMdM0pYC/pzYnZiQnEX7AQ7kZeu/Tpm7abXkGg1CjYcz8eo2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686452; h=Content-Type:Content-Transfer-Encoding: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; bh=eytZNPAt44SPNFlqWEciPJjuYDgjxKMBbNmsfZmDb3w=; b=FnwwrCrbCkzWWw0mKmu2nmQ4m7p0lVax2Zc25Dm56/vor6MYoCA1oiGq5st5Qz4pDUz6fz0krLNqh4UOisQDW5CSwEJc4tAdrEvbP2xhEaqEsZ1T0we0iU5M5cCVpxT//fHjKCacFSY0NOS49BBCpmtCb/i50tvH0nBmgx8obgk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574686452222672.9389886605643; Mon, 25 Nov 2019 04:54:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-104-SMaqvpBINaa__2SI53T_xg-1; Mon, 25 Nov 2019 07:54:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C61F1094C14; Mon, 25 Nov 2019 12:54:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 306F6600C8; Mon, 25 Nov 2019 12:54:04 +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 D09E14E566; Mon, 25 Nov 2019 12:54:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCrxCk016633 for ; Mon, 25 Nov 2019 07:53:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 87672600CA; Mon, 25 Nov 2019 12:53:59 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EFCB600C8 for ; Mon, 25 Nov 2019 12:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686451; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eytZNPAt44SPNFlqWEciPJjuYDgjxKMBbNmsfZmDb3w=; b=DTVZHjSOb+WmNg2aNnfhw+qRm03pejhTYjJOX6PiWY1BOO0LhtIjiidS0RvDL5K2HSoo1j 69/T1X+Wb67Aq3hVUMbg18Kx/BWDrSygNS1CAtAihuz0JHpuXndqcQ/y/odSnKaiMjL+Fe JbWkuY+bea77cOeL21Iz/eNEfzvHOIA= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:47 +0100 Message-Id: <52eccadd8eaa3d2907dbacfb11860c2ced1208df.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/9] qemu: process: Don't try to redetect missing qemuCaps on reconnect 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: SMaqvpBINaa__2SI53T_xg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The redetection was originally added in 43c01d3838 as a way to recover from libvirtd upgrade from the time when we didn't persist the qemu capabilities in the status XML. Also this the oldest supported qemu by more than two years. Even if somebody would have a running VM running at least qemu 1.5 with such an old libvirt we certainly wouldn't do the right thing by redetecting the capabilities and then trying to communicate with qemu. For now it will be the best to just stop considering this scenario any more. Signed-off-by: Peter Krempa --- src/qemu/qemu_process.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1b88c471f4..a76a8da841 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8085,13 +8085,6 @@ qemuProcessReconnect(void *opaque) goto error; } - /* If upgrading from old libvirtd we won't have found any - * caps in the domain status, so re-query them - */ - if (!priv->qemuCaps && - (qemuDomainUpdateQEMUCaps(obj, driver->qemuCapsCache) < 0)) - goto error; - /* In case the domain shutdown while we were not running, * we need to finish the shutdown process. And we need to do it after * we have virQEMUCaps filled in. --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1574686562; cv=none; d=zohomail.com; s=zohoarc; b=RUT2pEoWAv4UqmGy9D+unPn7JHc285NZogBJGTZG/HBn9ahFEQNEIVMUjU0xxtGHoyeqX/xwz/TR4OqedJfYNwZ936TDK6ubK5BVHLzH5f1y1nindjndrdT0/eRT7Be5LVuRD347fxaBQEQOGtGfVZ3Gp0eGWeanbWvu1MUtcLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686562; h=Content-Type:Content-Transfer-Encoding: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; bh=40zgMitYBN3B55j4AM+ZzENpKGIswdmetG5SiYmkJ3w=; b=g1ljkZPOe7viN9OEhkmnKSbpl8NCztmAvtrWPMPDv+UIZNBcMYIxUhaXx85K7IthurKiZCOJCTqbvzuMZAsaurOnO80t5Yy1p2hIGrtdbL3ejGP43W2EGF2DdCTA7CiMppfxxlLQt/GBwMwc2Az9XUOd1gtXGYOcDh08f23haoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1574686562846824.615310754244; Mon, 25 Nov 2019 04:56:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-198-KqHNOVZ9M6yV4ToPP7ht9g-1; Mon, 25 Nov 2019 07:56:00 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E16A10CE7B8; Mon, 25 Nov 2019 12:55:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27F6E5D6BE; Mon, 25 Nov 2019 12:55:55 +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 DEA814BB65; Mon, 25 Nov 2019 12:55:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs0Dd016641 for ; Mon, 25 Nov 2019 07:54:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5977A600CA; Mon, 25 Nov 2019 12:54:00 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4F57600C8 for ; Mon, 25 Nov 2019 12:53:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686561; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=40zgMitYBN3B55j4AM+ZzENpKGIswdmetG5SiYmkJ3w=; b=bKyIEjfWc4nrOPuI8EaNljI2xa3PpRD+wlPcIy0ff4wE4M/T6pltR9qWRIGEq3DRA4ywIA fbpbxGuS7OcT6DIf4L4Ep43T67ymNODn7YM7mLMWJPVi5JTntvLY0qX+xUB9RLM03aKDmP tDA8A9aFdAYNmfc5XcuTj+eAvvLSBjk= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:48 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/9] qemu: Move and rename qemuDomainUpdateQEMUCaps 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: KqHNOVZ9M6yV4ToPP7ht9g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The function is now used only in qemu_process.c so move it there and name it 'qemuProcessPrepareQEMUCaps' which is more appropriate to what it's doing. The reworded comment now mentions that it will also post-process the caps for VM startup. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 26 -------------------------- src/qemu/qemu_domain.h | 4 ---- src/qemu/qemu_process.c | 30 +++++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 168e7464a9..abe1396e3a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -15022,32 +15022,6 @@ qemuDomainFixupCPUs(virDomainObjPtr vm, } -/** - * qemuDomainUpdateQEMUCaps: - * @vm: domain object - * @qemuCapsCache: cache of QEMU capabilities - * - * This function updates the used QEMU capabilities of @vm by querying - * the QEMU capabilities cache. - * - * Returns 0 on success, -1 on error. - */ -int -qemuDomainUpdateQEMUCaps(virDomainObjPtr vm, - virFileCachePtr qemuCapsCache) -{ - qemuDomainObjPrivatePtr priv =3D vm->privateData; - - virObjectUnref(priv->qemuCaps); - if (!(priv->qemuCaps =3D virQEMUCapsCacheLookupCopy(qemuCapsCache, - vm->def->virtType, - vm->def->emulator, - vm->def->os.machine)= )) - return -1; - return 0; -} - - char * qemuDomainGetMachineName(virDomainObjPtr vm) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index db45a932dc..f626d3a54c 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -1155,10 +1155,6 @@ int qemuDomainFixupCPUs(virDomainObjPtr vm, virCPUDefPtr *origCPU); -int -qemuDomainUpdateQEMUCaps(virDomainObjPtr vm, - virFileCachePtr qemuCapsCache); - char * qemuDomainGetMachineName(virDomainObjPtr vm); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a76a8da841..ad3129c7bd 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5486,6 +5486,34 @@ qemuProcessStartUpdateCustomCaps(virDomainObjPtr vm) } +/** + * qemuProcessPrepareQEMUCaps: + * @vm: domain object + * @qemuCapsCache: cache of QEMU capabilities + * + * Prepare the capabilities of a QEMU process for startup. This includes + * copying the caps to a static cache and potential post-processing depend= ing + * on the configuration of the VM and startup process. + * + * Returns 0 on success, -1 on error. + */ +static int +qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, + virFileCachePtr qemuCapsCache) +{ + qemuDomainObjPrivatePtr priv =3D vm->privateData; + + virObjectUnref(priv->qemuCaps); + if (!(priv->qemuCaps =3D virQEMUCapsCacheLookupCopy(qemuCapsCache, + vm->def->virtType, + vm->def->emulator, + vm->def->os.machine)= )) + return -1; + + return 0; +} + + /** * qemuProcessInit: * @@ -5537,7 +5565,7 @@ qemuProcessInit(virQEMUDriverPtr driver, } VIR_DEBUG("Determining emulator version"); - if (qemuDomainUpdateQEMUCaps(vm, driver->qemuCapsCache) < 0) + if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache) < 0) goto cleanup; if (flags & VIR_QEMU_PROCESS_START_STANDALONE) --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574686465; cv=none; d=zohomail.com; s=zohoarc; b=cfHeZXKebDtx8C6XKO5d3T6ZnLNTA8GhRQO+MckSpOu3ORgKH/NkQk3ULFhDxmU3xU952GSYdxUxKLiNYYh0OnX26fvuSCAvaT2lSVgpBxZyRYlrJaTFKXKrbhi4xaEPh4cwnDJmfD+7UJE0VuM5kyKt1o8irkt19u4CYIuQ/Ok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686465; h=Content-Type:Content-Transfer-Encoding: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; bh=fkRMyb+iYlhqE9pnf+VUqLXpoCdILsMclhzOj9MFRYc=; b=BQEsp4qow6w3lQvyh8IgEUljQ/1Derk4uzwxnwPTO6D+AmuWSNx7NnNUrCfDAETXk+VuzV/AYDDG8dZS8pEOlMFNM/s8K8HJ89jkkdq0FgA98n5Pkps4QL0hXUuYsIctRfcVwW6EqZBNDwFwiDlsr49FsS+wzEoF7F6L4iCH7P0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1574686465065245.3432866036461; Mon, 25 Nov 2019 04:54:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-e8bzTmc6P0OKHjYarMy5Sg-1; Mon, 25 Nov 2019 07:54:21 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79CB8803034; Mon, 25 Nov 2019 12:54:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4DC0D608BB; Mon, 25 Nov 2019 12:54:16 +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 07F524E56E; Mon, 25 Nov 2019 12:54:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs1cX016649 for ; Mon, 25 Nov 2019 07:54:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2AC79600CA; Mon, 25 Nov 2019 12:54:01 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6AC5600C8 for ; Mon, 25 Nov 2019 12:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686463; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fkRMyb+iYlhqE9pnf+VUqLXpoCdILsMclhzOj9MFRYc=; b=GDxOpDwQ6WMdQ9poEPq8ed89/8yGFRq6iKKxshO/IOb2ebidhMNGLXEqEN2M7AzXehO7M/ JbamMW3jcW+vQ+ycDUR5nvZRfZZaW0xJIUzlR7QpzJrErK5dl5qU3NGo9MGn7ikh1QxFYt pZYmGfsABfBRSkDGO9We7ITTITYOU9c= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:49 +0100 Message-Id: <7e09e860b70e55c007de1ea49925ccb1da406d72.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/9] qemu: process: Move clearing of the BLOCKDEV capability to qemuProcessPrepareQEMUCaps 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: , 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-MC-Unique: e8bzTmc6P0OKHjYarMy5Sg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Start aggregating all capability post-processing code in one place. The comment was modified while moving it as it was mentioning floppies which are no longer clearing the blockdev capability. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_process.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ad3129c7bd..f05c1d637f 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5502,6 +5502,7 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, virFileCachePtr qemuCapsCache) { qemuDomainObjPrivatePtr priv =3D vm->privateData; + size_t i; virObjectUnref(priv->qemuCaps); if (!(priv->qemuCaps =3D virQEMUCapsCacheLookupCopy(qemuCapsCache, @@ -5510,6 +5511,14 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, vm->def->os.machine)= )) return -1; + /* clear the 'blockdev' capability for VMs which have disks that need = -drive */ + for (i =3D 0; i < vm->def->ndisks; i++) { + if (qemuDiskBusNeedsDriveArg(vm->def->disks[i]->bus)) { + virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); + break; + } + } + return 0; } @@ -6273,14 +6282,6 @@ qemuProcessPrepareDomain(virQEMUDriverPtr driver, qemuProcessPrepareAllowReboot(vm); - /* clear the 'blockdev' capability for VMs which have disks that need - * -drive or which have floppies where we can't reliably get the QOM p= ath */ - for (i =3D 0; i < vm->def->ndisks; i++) { - if (qemuDiskBusNeedsDriveArg(vm->def->disks[i]->bus)) { - virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); - break; - } - } /* * Normally PCI addresses are assigned in the virDomainCreate --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1574686462; cv=none; d=zohomail.com; s=zohoarc; b=HY2jMtQuBakCAdTBox2VZibrhyiZlbDjzeVEvLRgQ+au/eqENGrDo5ymV8+nudSG/8XgyK7lZKAjB349gpCYG5O3YkCbNDHsm9dK16A6rCC7Mif0rqVaKhm1XeEl6EGJAcxLFIYySkMnAqp2L/ozTZ5+LhWXyu2fUnjQqZqT59c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686462; h=Content-Type:Content-Transfer-Encoding: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; bh=OqSt9jA0b8QlXvzImhGTmDPZ9rgBSAOcDZg02TKY3Gw=; b=c1Tkk6vwHAXvNW46PLIodJ72aD3huZ+dxJhpbIOluPQkKY5NDMv5q7Qtau6mK4cHLG1LsBPniIXIZeNcAmJJyw318wmTJKcC/J8Ne9RRdml0QyNc/IZbv7P7gEADyoZ0Nkt709nBZ11LjxaLXe7sW3joUYSFRv0/EAmSMiKn1O0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1574686462992586.7759859209866; Mon, 25 Nov 2019 04:54:22 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-3yHB8i3tOPKcpuqLXQqFsQ-1; Mon, 25 Nov 2019 07:54:18 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F273E1870631; Mon, 25 Nov 2019 12:54:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7E1F5C240; Mon, 25 Nov 2019 12:54:12 +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 810FA4E56D; Mon, 25 Nov 2019 12:54:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs1b7016654 for ; Mon, 25 Nov 2019 07:54:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id F10A3600CA; Mon, 25 Nov 2019 12:54:01 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77E3C600C8 for ; Mon, 25 Nov 2019 12:54:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686461; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OqSt9jA0b8QlXvzImhGTmDPZ9rgBSAOcDZg02TKY3Gw=; b=fLDh/Jhht3ZZNmmkIREiiTPF+g6UzcPZg46/jYIKu02gqZ9EE49/Q09tU6op5DEXiQkm3G BjoX6sphkCqnqIql0h3x7S+0JC+3CemcyysWfIIBluyFQUkTRzrQhh3G/HfgRl55i6HDeH wKTrDTx6DAQe06FaeafjAQ6lYr1e+7o= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:50 +0100 Message-Id: <5d584b7a5e29f79abb6b5424ee27bac7d9d99050.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/9] qemu: process: Move clearing of QEMU_CAPS_CHARDEV_FD_PASS to qemuProcessPrepareQEMUCaps 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 3yHB8i3tOPKcpuqLXQqFsQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Move the post-processing of the QEMU_CAPS_CHARDEV_FD_PASS flag to the new function. The clearing of the capability is based on the presence of VIR_QEMU_PROCESS_START_STANDALONE so we must also pass in the process start flags. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_process.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f05c1d637f..f36d03b0a6 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5490,6 +5490,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObjPtr vm) * qemuProcessPrepareQEMUCaps: * @vm: domain object * @qemuCapsCache: cache of QEMU capabilities + * @processStartFlags: flags based on the VIR_QEMU_PROCESS_START_* enum * * Prepare the capabilities of a QEMU process for startup. This includes * copying the caps to a static cache and potential post-processing depend= ing @@ -5499,7 +5500,8 @@ qemuProcessStartUpdateCustomCaps(virDomainObjPtr vm) */ static int qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, - virFileCachePtr qemuCapsCache) + virFileCachePtr qemuCapsCache, + unsigned int processStartFlags) { qemuDomainObjPrivatePtr priv =3D vm->privateData; size_t i; @@ -5519,6 +5521,9 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, } } + if (processStartFlags & VIR_QEMU_PROCESS_START_STANDALONE) + virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS); + return 0; } @@ -5574,12 +5579,9 @@ qemuProcessInit(virQEMUDriverPtr driver, } VIR_DEBUG("Determining emulator version"); - if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache) < 0) + if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache, flags) < 0) goto cleanup; - if (flags & VIR_QEMU_PROCESS_START_STANDALONE) - virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS); - if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0) goto cleanup; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574686463; cv=none; d=zohomail.com; s=zohoarc; b=Sqd4Rvfxr2z3+xEL+I2N05DhmMDq8z/7HXSonpcEeSiZYj5SPAlFcEvG5TpbSyWitJY/hN1gZLxw5PaeM3/zgk6RVi3ikqiolV6XiWWdH1QbWYBWRG/DKqPTO4g6F3D/gZUkZHeL1xFUfPEf2+YbGYcgjoXy76JKiqW5A+qIJsA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686463; h=Content-Type:Content-Transfer-Encoding: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; bh=aBc8P+AfMffTMqueYCCqhzitOhkW/8RbP6v8jZkMkaw=; b=UrMCd2c18gumQfy0OhAUqKSnZIaiYimqzK9NrInDvRiouh0bfelazC4toTYovTj612emx7SnXwPKVzmJCrK+XpRoYxc4GfJklHbeYdrnHMIrexuGwJ0Ft5yAGOGw4ovpMdkf8LNBMqXDUpQJKuHBXY8CE1nGtrNwVXCnoOq73Lw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 15746864639171019.8995046336296; Mon, 25 Nov 2019 04:54:23 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-qKjXQfqCMJ-FmmICTJSLww-1; Mon, 25 Nov 2019 07:54:21 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9885A8E3EEE; Mon, 25 Nov 2019 12:54:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FE2B10016E8; Mon, 25 Nov 2019 12:54:16 +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 276C54E567; Mon, 25 Nov 2019 12:54:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs2A2016662 for ; Mon, 25 Nov 2019 07:54:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id C5B8F600C8; Mon, 25 Nov 2019 12:54:02 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CF8E600CA for ; Mon, 25 Nov 2019 12:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686462; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aBc8P+AfMffTMqueYCCqhzitOhkW/8RbP6v8jZkMkaw=; b=fZ/OLKVIhbhDMO22lGhVvCZRgUSYiWRlfvcgT3owDpyw0D0F/dGPgBbhcm73IiW63cpXRE 4KDdfxGWKjZ59J7ey/wHHFcprx14g+Ezu7im5RlkDA762AuhBWpgp4nn7vB2jHnZTzWh1C deiUFQITCU1vXT6BEPpljJYC3B0K+Lo= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:51 +0100 Message-Id: <4226b8b0cf7fb39f12cb5ec8054237a5e896df57.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/9] qemu: process: Move handling of qemu capability overrides 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: qKjXQfqCMJ-FmmICTJSLww-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Do all post-processing of capabilities in qemuProcessPrepareQEMUCaps. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f36d03b0a6..f170554198 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5524,6 +5524,10 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, if (processStartFlags & VIR_QEMU_PROCESS_START_STANDALONE) virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS); + /* Update qemu capabilities according to lists passed in via namespace= */ + if (qemuProcessStartUpdateCustomCaps(vm) < 0) + return -1; + return 0; } @@ -5596,10 +5600,6 @@ qemuProcessInit(virQEMUDriverPtr driver, if (virDomainObjSetDefTransient(caps, driver->xmlopt, vm, priv->qemuCa= ps) < 0) goto cleanup; - /* Update qemu capabilities according to lists passed in via namespace= */ - if (qemuProcessStartUpdateCustomCaps(vm) < 0) - goto cleanup; - if (flags & VIR_QEMU_PROCESS_START_PRETEND) { if (qemuDomainSetPrivatePaths(driver, vm) < 0) { virDomainObjRemoveTransientDef(vm); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1574686567; cv=none; d=zohomail.com; s=zohoarc; b=SiR2vM6j4wmnhn67mnaMKKPYtwpVJlEKu3J91Dk7tmfbajAQ8pGceykoDf5doJNHNkiX2weyu+d8BBmbl0jOXaGcxtupBOO6h1dsJlXcafSq+29TNXPX12KFyvroR7jsuaOpIsrj+GsmUMIvqilJfW3pVVs3tICjA2CwiajDKlA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686567; h=Content-Type:Content-Transfer-Encoding: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; bh=l0vo0TtgUA1FUpuSF7/L1n3vf5DFOQHXT0m3Zlvh1v8=; b=leSvhAS0naihhX10xYU8n8xPbi2bTJXfy//q61ufGyaoyPF66xNSYrZPIJs3XameSAie2bDze93tz5NKTKIXZQiHhhn7FDP2MYu0IMYg2XwPP+5E6SYNZ3quNHOsa5+rfS4+JjRQhbnO485SsuX0r+1TXxED2J/Ds+d2tzx7EQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 157468656773213.890733996140739; Mon, 25 Nov 2019 04:56:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-178-wL9Ulh_JOH-cxFm7yZkH3Q-1; Mon, 25 Nov 2019 07:56:05 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E1571060BB7; Mon, 25 Nov 2019 12:56:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12DD05DA32; Mon, 25 Nov 2019 12:56:00 +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 A59644E566; Mon, 25 Nov 2019 12:55:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs3bG016672 for ; Mon, 25 Nov 2019 07:54:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 97271600CA; Mon, 25 Nov 2019 12:54:03 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E2CE600C8 for ; Mon, 25 Nov 2019 12:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686566; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=l0vo0TtgUA1FUpuSF7/L1n3vf5DFOQHXT0m3Zlvh1v8=; b=XWeKOpC5TiPtgEsLShbXLO6R40lIfhK6yBqGBFk4BJhYW2+ba94NkbAb24IxoBSVqvvgyp hsaE9nXOcbpQMkboy2OToxp5/ba1gXuuwS/McG3fhqkTEmhUTWnAlMdDO8UguqPE8p11AC uvW3g1xDSbz7fnWHjUDIdJGl6bAeeJo= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:52 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 7/9] qemu: caps: Don't check capability before clearing it 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: wL9Ulh_JOH-cxFm7yZkH3Q-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Checking whether a qemu capability set right before clearing it without any other logic doesn't make sense. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e5f19ddcaa..7c0533aef5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4602,8 +4602,7 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps) /* Prealloc on NVDIMMs is broken on older QEMUs leading to * user data corruption. If we are dealing with such version * of QEMU pretend we don't know how to NVDIMM. */ - if (qemuCaps->version < 2009000 && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM)) + if (qemuCaps->version < 2009000) virQEMUCapsClear(qemuCaps, QEMU_CAPS_DEVICE_NVDIMM); if (ARCH_IS_X86(qemuCaps->arch) && --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1574686515; cv=none; d=zohomail.com; s=zohoarc; b=fuR0DYxx8S4ZibPnfwA0HEqSbrXLvG0s78udh9RRi//b23+5VhiYV11/UPjfWNkRTN1P2byNDca1wyWik0b14kYcD2C71FUo5OBQ1oXfQIBzZL2Fz+1Fr5VJFo/vPBc8e04amDH4ysHuDOD6VnHM88G8goZ845PHKEb+kfN7WbQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686515; h=Content-Type:Content-Transfer-Encoding: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; bh=ib1iiaT8eAu1RVPYmG6tmOVTiY0qxsbeGxEulQdGu94=; b=Fqmn3dM+rJBS+amhjUnWRpfTwP/aWE9snJRC9YVsrsCI4xj4Noyh6d34nxL3LAbzT5c56WlECu2XgIxLFgmMfWDM5xk55GBjG8TF18v4Yo/8tSyI778v02yr/4TSsJAAC+i+xF7IrhhWV00vEJRrvOxlhm/sndatAiLZvD4OFXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1574686515681382.1324085799987; Mon, 25 Nov 2019 04:55:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-prHtkBsAPfyVDhHCTp_B2w-1; Mon, 25 Nov 2019 07:54:30 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 26C231876593; Mon, 25 Nov 2019 12:54:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F10535C219; Mon, 25 Nov 2019 12:54:19 +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 A8D234E572; Mon, 25 Nov 2019 12:54:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs45O016682 for ; Mon, 25 Nov 2019 07:54:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6785F600CA; Mon, 25 Nov 2019 12:54:04 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id E38A6600C6 for ; Mon, 25 Nov 2019 12:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ib1iiaT8eAu1RVPYmG6tmOVTiY0qxsbeGxEulQdGu94=; b=FbfNyeAFkDQeZN51e+Epj88//Ok8je4ZIB0ntQE8gMXegnvNq5CgQtPo4zXGRpLsGMTayA Y7F5aGBqbUPpfGdL9DCcbCXUjqlKLgkM3qnlG3t6ECUKn62tHcDVA5zETL/Fe0khlBoGeq cXYL9zP/E8oXBZ3VBjJMsQFnCKpnxpU= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:53 +0100 Message-Id: <058e628abaf35f515beb9d39e7bd7a5225551a06.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 8/9] qemu: capabilities: Lock out incremental backup capability without blockdev 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: prHtkBsAPfyVDhHCTp_B2w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Blockdev is required to do incremental backups properly. Add a helper function for locking out capabilities and export it to allow re-doing the processing if a different code path modifies capabilities. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 17 +++++++++++++++++ src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7c0533aef5..124619b733 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4577,6 +4577,21 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCap= s) } +/** + * virQEMUCapsInitProcessCapsInterlock: + * @qemuCaps: QEMU capabilities + * + * A capability which requires a different capability being present in ord= er + * for libvirt to be able to drive it properly should be processed here. + */ +void +virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps) +{ + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV)) + virQEMUCapsClear(qemuCaps, QEMU_CAPS_INCREMENTAL_BACKUP); +} + + /** * virQEMUCapsInitProcessCaps: * @qemuCaps: QEMU capabilities @@ -4627,6 +4642,8 @@ virQEMUCapsInitProcessCaps(virQEMUCapsPtr qemuCaps) virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_DISK_DEVICE_ID) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_SAVEVM_MONITOR_NODES)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_BLOCKDEV); + + virQEMUCapsInitProcessCapsInterlock(qemuCaps); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3fd8bebe79..4d7d836e8c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -555,6 +555,8 @@ void virQEMUCapsClear(virQEMUCapsPtr qemuCaps, bool virQEMUCapsGet(virQEMUCapsPtr qemuCaps, virQEMUCapsFlags flag); +void virQEMUCapsInitProcessCapsInterlock(virQEMUCapsPtr qemuCaps); + bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps, const virDomainDef *def); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Feb 7 16:46:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1574686575; cv=none; d=zohomail.com; s=zohoarc; b=mXh31faChx4uG/GUJ1daohxVJZq/Uwqbwy7CFsyvlOij+gH1X2RmExhq3JC2GVs9ncKQiiCsaqM2BscTlXyDSH+G29+8PLNwsPAGGI6SJ+ec1BH1+ruEemInIV9CiHSocTrzPpQyOUDD22SJ8rgOWK+/jES4TkJWvXjBcx9mtmg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574686575; h=Content-Type:Content-Transfer-Encoding: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; bh=/AqinF46iWNVoEuruB4onTvXriIn940lrP5oyUjVMCc=; b=Dqk7KV6IK8Kt8RssO7Sc+XUN5f4pZHcXwn9W+jNTPynyulmzu5fnIQv9M9tQIy/zB7h0tbSGFlRIeqN9Y1I5uIgJjkm5jlalLrfQqqfnuMyxnwmlTPsLV3lPOlRsTQyzg5qicm84Xmv5PH+WGP4IBZYaRMmkWe0oiL9EJ8cJjPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1574686575027630.9084205158426; Mon, 25 Nov 2019 04:56:15 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-AyTHe9b1O76EArkjjvxuRw-1; Mon, 25 Nov 2019 07:56:11 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A352A109D0A7; Mon, 25 Nov 2019 12:56:06 +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 6B1F45C241; Mon, 25 Nov 2019 12:56:06 +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 F041418089CE; Mon, 25 Nov 2019 12:56:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAPCs5LU016695 for ; Mon, 25 Nov 2019 07:54:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 382DD600C8; Mon, 25 Nov 2019 12:54:05 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4DB2600C6 for ; Mon, 25 Nov 2019 12:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574686573; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=/AqinF46iWNVoEuruB4onTvXriIn940lrP5oyUjVMCc=; b=QpqQJ/m35gkPaHiFEUlE2Y3EbFp2CIadLDvtkH4IcqcLRW+cTYXLI7sDeW54p7/DlKzRGl 8YYRC5JPKbyH/0uBjiqRfQyGUI3BHNCDUS9svr3jYPCRXfBwnRttYd+aX88M+rFcoqHUCM jQjNNgBSuVvQwgAk4S0AhB5EiIeFu5k= From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 25 Nov 2019 13:53:54 +0100 Message-Id: <575dce7b909cb06240179472a2d83384f912caa9.1574686331.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] qemu: process: Re-process qemu capability lockout in qemuProcessPrepareQEMUCaps 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: AyTHe9b1O76EArkjjvxuRw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We clear some capabilities here so the lockouts need to be re-evaluated. Signed-off-by: Peter Krempa Reviewed-by: Cole Robinson --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f170554198..bc97ec3bb4 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5528,6 +5528,9 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, if (qemuProcessStartUpdateCustomCaps(vm) < 0) return -1; + /* re-process capability lockouts since we might have removed capabili= ties */ + virQEMUCapsInitProcessCapsInterlock(priv->qemuCaps); + return 0; } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list