From nobody Mon Feb 9 07:57:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1582578427; cv=none; d=zohomail.com; s=zohoarc; b=MJT3iHw+6Vw5IOf4aUnKK51Yf3YyUku7V6jowZelSK5Wj/lcxn469GNffmqVW8lvBbRI0qe54xIscTKYBTl9qn3m5w541AzPQRnV3uT8qzN/DWGOTAGezXMQmPlXf2frfIGbsk/JgLzCbTjs9AyGbIM1Jn25IS1FvoxIGYl2jBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582578427; 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=aH/ojVyVEyKqh6zftKolf+OBhqt+5U2sgLUcxOuQt80=; b=XTtkKyThXD55uDu3e7fKTaHuyIIdgC4llhDWq95eCN1m3S5WVVfZD2oaVvlZEWjtwQ0HLAe6LY3DtezmaFna5SN+doVwANCC/KEOVbNAAjO+lUX6IEKuL6IShe4sQI7Fx+0CjJCd28M+MxAUw8Z1D4ygNti4F4x/eGEiFaLbQqc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail 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 1582578427320814.6964652274245; Mon, 24 Feb 2020 13:07:07 -0800 (PST) Received: from localhost ([::1]:43322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6KwU-0006Pv-58 for importer@patchew.org; Mon, 24 Feb 2020 16:07:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50659) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6KmV-00076s-Mq for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:56:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6KmU-0003aE-LA for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:56:47 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:41790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6KmU-0003YI-Bx for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:56:46 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01OKqWdf017600; Mon, 24 Feb 2020 20:56:41 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2yavxrhygx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Feb 2020 20:56:41 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 01OKucGi072891; Mon, 24 Feb 2020 20:56:40 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2ybduv6d72-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Feb 2020 20:56:40 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 01OKuUng028530; Mon, 24 Feb 2020 20:56:30 GMT Received: from jaraman-bur-1.us.oracle.com (/10.152.33.39) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Feb 2020 12:56:30 -0800 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-2020-01-29; bh=aH/ojVyVEyKqh6zftKolf+OBhqt+5U2sgLUcxOuQt80=; b=nk+6brHs0RFk46A4V2ulhGQ5RPbU9K/uLhokuMaRJxDbX2Ij6KNbEUdhAiDLdT936Y1f aoRKplpz3d+lEveDmi8pLYmICwsHpgmOM0OC8cirlYQs74KGNM9y3ownETT3pfwrCNqY WghrpjUBwlB2VqhKJwNNUbYC2Kk5XFfQn3OzjFV1NdB86xWw1aG2paWme7Qh/RcGDL2l HIUhDmE6RMYkJq+rfJAEhLWQsPrr6UGtpFfqFAg8cHRip44vtAPdvpYEkycA9OTPe0KD SB/EKVM2T1/o362uDTOVXaM+Tal+xxnBOqQ+irjraZJOAy5XfVxnszlDJcY8mwMwrd7e XQ== From: Jagannathan Raman To: qemu-devel@nongnu.org Subject: [PATCH v5 22/50] multi-process: remote: use fd for socket from parent process Date: Mon, 24 Feb 2020 15:55:13 -0500 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=9541 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=1 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240154 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9541 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 suspectscore=1 bulkscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 adultscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002240153 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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, swapnil.ingle@nutanix.com, 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, felipe@nutanix.com, thuth@redhat.com, ehabkost@redhat.com, konrad.wilk@oracle.com, dgilbert@redhat.com, liran.alon@oracle.com, stefanha@redhat.com, thanos.makatos@nutanix.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: fail (Header signature does not verify) 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 3a67cb9..455cfb6 100644 --- a/remote/remote-main.c +++ b/remote/remote-main.c @@ -51,6 +51,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; @@ -400,6 +401,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 @@ -424,7 +426,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