From patchwork Thu Oct 24 09:09:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jag Raman X-Patchwork-Id: 11208671 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 C2516112C for ; Thu, 24 Oct 2019 09:35:06 +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 984EC20684 for ; Thu, 24 Oct 2019 09:35:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="qWWeaH/p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 984EC20684 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]:36766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZWK-0000QN-R5 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Oct 2019 05:35:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43960) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNZ9L-0007no-At for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNZ9K-0004c0-6b for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:19 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45944) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNZ9J-0004bX-Uv for qemu-devel@nongnu.org; Thu, 24 Oct 2019 05:11:18 -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 x9O94MUg116335; Thu, 24 Oct 2019 09:11:13 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 : in-reply-to : references; s=corp-2019-08-05; bh=kNf0hq9f/SIPtu9i0nQfYDvJHnVFSoyJ64lIyw2OYHI=; b=qWWeaH/pusbSkeghnWLlVycQVBkIdJYIE5Vgq/UpUJuAXihND0F+xIfCNNZVlvZPpdY8 HdvOwibP2yRK9be/s02P3r0kow9xZxE9VWvLYvuv3rDZzHnZIEbjESZ/RUPM6qqCznrO g962N2YZZcHzGxXhMvkcHhYLS/3i5rnqLgERiDlU71zE9yfTGFhtS56uAbqHPol/dPpj Qldc/V9NqKb3qi7fT84siEwdFDJHQOsxjcP+hWDnvr1CxMziUc+bbOP79iZQNv7PlNd9 ar6qol8JymA+F9vJQS97+f60uQYeLmmKopjCXOQxb7wFZV5AKQ36Q6TXKQ4LJ20HTzEU zQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2vqswtte1w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:11:12 +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 x9O991ZG077488; Thu, 24 Oct 2019 09:11:12 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2vtjkj2yh1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Oct 2019 09:11:12 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x9O9BAqk023822; Thu, 24 Oct 2019 09:11:10 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:11:10 -0700 From: Jagannathan Raman To: qemu-devel@nongnu.org Subject: [RFC v4 PATCH 31/49] multi-process: handle heartbeat messages in remote process Date: Thu, 24 Oct 2019 05:09:12 -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+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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/remote/remote-main.c b/remote/remote-main.c index 729f7e9..27e4492 100644 --- a/remote/remote-main.c +++ b/remote/remote-main.c @@ -355,6 +355,7 @@ static void process_msg(GIOCondition cond, MPQemuChannel *chan) { MPQemuMsg *msg = NULL; Error *err = NULL; + int wait; if ((cond & G_IO_HUP) || (cond & G_IO_ERR)) { error_setg(&err, "socket closed, cond is %d", cond); @@ -434,6 +435,11 @@ static void process_msg(GIOCondition cond, MPQemuChannel *chan) case DEVICE_DEL: process_device_del_msg(msg); break; + case PROXY_PING: + wait = msg->fds[0]; + notify_proxy(wait, (uint32_t)getpid()); + PUT_REMOTE_WAIT(wait); + break; default: error_setg(&err, "Unknown command"); goto finalize_loop;