From patchwork Mon Apr 6 09:41:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elena Ufimtseva X-Patchwork-Id: 11475135 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CEDCA92A for ; Mon, 6 Apr 2020 09:46:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3427206F5 for ; Mon, 6 Apr 2020 09:46:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="XVYltTD+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3427206F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:57344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOLH-00023c-QB for patchwork-qemu-devel@patchwork.kernel.org; Mon, 06 Apr 2020 05:46:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44414) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLOH0-0002ga-5L for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLOGz-0002Ti-1R for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:30 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:35146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jLOGy-0002Sg-P5 for qemu-devel@nongnu.org; Mon, 06 Apr 2020 05:42:28 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0369dxff089554; Mon, 6 Apr 2020 09:42:23 GMT 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 : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=SdDE3JKBu7f4i+tB+6lCAKGPdBJ7kMP18msjXH0Or7k=; b=XVYltTD+TzgXXShTn94OsyqWOPB9bP7AtAsa8KsyvKAYvoNKAN1TzNgvxTuRMK9q4yYh MScKQD86c6Oy+cHV6EfPvSkNZu7+AtwFtUaJREXO42CAIq643tp5DxTL8VrycZQTOjSS /1Yp5TOLA/+JTRpMRlmjztPkEbfuYVBm3sNyja7xx0yc3qgcUx75AXKvK0VsFSAOjDwv hdJJoHy3Ns5vDzpjLnj9S9npPiSvtuyFhcYY6r/boQsrlyonKUSeqGqD+CngL8FKCgCB MbleAwE6+UP0RAcLUMPYTMOymJmNVtcv481Qymi/RfNAQRfmqlIS3lGLw6hwT/pWQIbR ug== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 306hnqwtyg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 09:42:23 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0369fOL6066148; Mon, 6 Apr 2020 09:42:22 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 307419xhrf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Apr 2020 09:42:22 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0369gKFG007155; Mon, 6 Apr 2020 09:42:20 GMT Received: from flaka.hsd1.ca.comcast.net (/67.180.143.163) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Apr 2020 02:42:20 -0700 From: elena.ufimtseva@oracle.com To: qemu-devel@nongnu.org Subject: [PATCH v6 29/36] multi-process: handle heartbeat messages in remote process Date: Mon, 6 Apr 2020 02:41:19 -0700 Message-Id: X-Mailer: git-send-email 2.25.GIT In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 phishscore=0 malwarescore=0 bulkscore=0 spamscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060084 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9582 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 impostorscore=0 suspectscore=1 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004060083 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, 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Elena Ufimtseva If the remote process is alive, it responds to proxy's heartbeat messages Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva --- remote/remote-main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/remote/remote-main.c b/remote/remote-main.c index a0892c05b6..18184b3f4b 100644 --- a/remote/remote-main.c +++ b/remote/remote-main.c @@ -190,6 +190,7 @@ static void process_msg(GIOCondition cond, MPQemuLinkState *link, { MPQemuMsg *msg = NULL; Error *err = NULL; + int wait; if ((cond & G_IO_HUP) || (cond & G_IO_ERR)) { goto finalize_loop; @@ -242,6 +243,10 @@ static void process_msg(GIOCondition cond, MPQemuLinkState *link, case GET_PCI_INFO: process_get_pci_info_msg(link, msg); break; + case PROXY_PING: + wait = msg->fds[0]; + notify_proxy(wait, 0); + break; default: error_setg(&err, "Unknown command"); goto finalize_loop;