From nobody Mon Feb 9 00:56:06 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