From nobody Mon May 13 10:49:34 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1530186628940450.17542704034213; Thu, 28 Jun 2018 04:50:28 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id AD8FAD3C38; Thu, 28 Jun 2018 11:50:26 +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 63D8299AD1; Thu, 28 Jun 2018 11:50:25 +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 4C78B4ED9A; Thu, 28 Jun 2018 11:50:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5SBoKm5007405 for ; Thu, 28 Jun 2018 07:50:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6EAA210FFE4E; Thu, 28 Jun 2018 11:50:20 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id E26F810FFE4C; Thu, 28 Jun 2018 11:50:18 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Thu, 28 Jun 2018 12:50:16 +0100 Message-Id: <20180628115016.10327-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: don't use chardev FD passing with standalone args 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 28 Jun 2018 11:50:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 When using domxml-to-native, we must generate CLI args that can be used in a standalone scenario. This means no FD passing can be used. To achieve this we must clear the QEMU_CAPS_CHARDEV_FD_PASS capability bit. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Ferlan --- src/qemu/qemu_process.c | 5 +++++ src/qemu/qemu_process.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ac32dafcbe..40d35cbe6b 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -5124,6 +5124,9 @@ qemuProcessInit(virQEMUDriverPtr driver, vm->def->os.machine)= )) goto cleanup; =20 + if (flags & VIR_QEMU_PROCESS_START_STANDALONE) + virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS); + if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0) goto cleanup; =20 @@ -6632,6 +6635,8 @@ qemuProcessCreatePretendCmd(virQEMUDriverPtr driver, =20 flags |=3D VIR_QEMU_PROCESS_START_PRETEND; flags |=3D VIR_QEMU_PROCESS_START_NEW; + if (standalone) + flags |=3D VIR_QEMU_PROCESS_START_STANDALONE; =20 if (qemuProcessInit(driver, vm, NULL, QEMU_ASYNC_JOB_NONE, !!migrateURI, flags) < 0) diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 531c2a0cc7..07ce3a9915 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -81,6 +81,8 @@ typedef enum { VIR_QEMU_PROCESS_START_PRETEND =3D 1 << 3, VIR_QEMU_PROCESS_START_NEW =3D 1 << 4, /* internal, new VM is= starting */ VIR_QEMU_PROCESS_START_GEN_VMID =3D 1 << 5, /* Generate a new VMID= */ + VIR_QEMU_PROCESS_START_STANDALONE =3D 1 << 6, /* Require CLI args to= be usable standalone, + ie no FD passing and = the like */ } qemuProcessStartFlags; =20 int qemuProcessStart(virConnectPtr conn, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list