From nobody Sun Feb 8 21:48:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1571916024; cv=none; d=zoho.com; s=zohoarc; b=IG2+c31gQOQB7JAIjbWXpdMqWHgmemtt57Vj5y2rZPwxfB47vis6TZIAflp7/lxlf2GjuM7YyGpg0qoPd/7w977oMfMm1RuCLvZ5l0D4xMSEdwVz4GYRRvyoQlzWi/OmdaZJnB1uTBWnpMWZ5Uhk1rWzxWubNljXhwiRIrrG7Rc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571916024; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=+wLS/h90eYFgBw7O1jMToozVxcnhmHzTmuArNonTSbc=; b=hd5kRNIlASdX3aEuhshjXp49pJN0wc2PhylN8+polEimrwNvT31SbIZ14EUUTYPNNpXjQfR2JMJnaVA+zL4nXWf4UC+emuzXvA/C4fg/BSShuVklLqwPw9qpnYEPH2kOib4LLAEOgkh7ALAzxsymRL5CLFCMkZWHw3GYbsqV9UY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571916024782636.1271287181075; Thu, 24 Oct 2019 04:20:24 -0700 (PDT) Received: from localhost ([::1]:36592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZMl-0003iV-BD for importer@patchew.org; Thu, 24 Oct 2019 05:25:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43827) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZ8u-0006pz-Bw for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNZ8t-0004LX-9W for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:10:52 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45484) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNZ8t-0004Kw-1i for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:10:51 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O94UAI116449; Thu, 24 Oct 2019 09:10:46 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2vqswtte02-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:10:46 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9O98m3B076178; Thu, 24 Oct 2019 09:10:45 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 2vtjkj2xjq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:10:45 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x9O9AhQ0011882; Thu, 24 Oct 2019 09:10:43 GMT Received: from jaraman-bur-1.us.oracle.com (/10.152.33.39) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Oct 2019 02:10:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references; s=corp-2019-08-05; bh=+wLS/h90eYFgBw7O1jMToozVxcnhmHzTmuArNonTSbc=; b=S3mw7v6yslRRgsKoHNN/BzUB8gS9CUNeHtSff0GQY96dgy//X+2cs5hkvUArYxPRaIzX XDsVjNXoAbK41W67sKqUPj2IY1btRZ+kchXahEPMHlspWYqAazDnuFCe3B+Ca1+AfdiI 2R4phdha7wj0gBwyhP3SF/hUStxguOvhK7fJsBkFx30iPEWMVimgTwyWsgHt1YN3zjoF nIrVPnYYGlet2PUep3Xqen87aX/Hc7wQk4W3KxDmKFAy+o+gaQrd8etz0iuuO7xdPAZK 06HXo01PNruud10fgVm5g9KGZtZ2uDJcrHgQ89BW5X7eMwt5gmnm5OHvfgPOc07RGWzs bw== From: Jagannathan Raman To: qemu-devel@nongnu.org Subject: [RFC v4 PATCH 22/49] multi-process: remote: use fd for socket from parent process Date: Thu, 24 Oct 2019 05:09:03 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240089 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9419 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910240089 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: elena.ufimtseva@oracle.com, fam@euphon.net, john.g.johnson@oracle.com, kraxel@redhat.com, jag.raman@oracle.com, quintela@redhat.com, mst@redhat.com, armbru@redhat.com, kanth.ghatraju@oracle.com, thuth@redhat.com, ehabkost@redhat.com, konrad.wilk@oracle.com, dgilbert@redhat.com, liran.alon@oracle.com, stefanha@redhat.com, rth@twiddle.net, kwolf@redhat.com, berrange@redhat.com, mreitz@redhat.com, ross.lagerwall@citrix.com, marcandre.lureau@gmail.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/remote/remote-main.c b/remote/remote-main.c index 5b3ffd8..cb2829e 100644 --- a/remote/remote-main.c +++ b/remote/remote-main.c @@ -64,6 +64,7 @@ #include "block/qdict.h" #include "qapi/qmp/qlist.h" #include "qemu/log.h" +#include "qemu/cutils.h" =20 static MPQemuLinkState *mpqemu_link; PCIDevice *remote_pci_dev; @@ -440,6 +441,7 @@ finalize_loop: int main(int argc, char *argv[]) { Error *err =3D NULL; + int fd =3D -1; =20 module_call_init(MODULE_INIT_QOM); =20 @@ -462,7 +464,13 @@ int main(int argc, char *argv[]) return -1; } =20 - mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, STDIN_FILENO); + fd =3D qemu_parse_fd(argv[1]); + if (fd =3D=3D -1) { + printf("Failed to parse fd for remote process.\n"); + return -EINVAL; + } + + mpqemu_init_channel(mpqemu_link, &mpqemu_link->com, fd); mpqemu_link_set_callback(mpqemu_link, process_msg); =20 mpqemu_start_coms(mpqemu_link); --=20 1.8.3.1