From patchwork Tue Sep 3 20:38:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jag Raman X-Patchwork-Id: 11128933 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 1E9C21398 for ; Tue, 3 Sep 2019 21:05:22 +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 A6E122087E for ; Tue, 3 Sep 2019 21:05:21 +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="fLokqer8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6E122087E 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]:51496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5FzL-0006V5-Ko for patchwork-qemu-devel@patchwork.kernel.org; Tue, 03 Sep 2019 17:05:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53696) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5FaL-0007xW-MD for qemu-devel@nongnu.org; Tue, 03 Sep 2019 16:39:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5FaK-0000mq-L0 for qemu-devel@nongnu.org; Tue, 03 Sep 2019 16:39:29 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:57550) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i5FaJ-0000lK-Aw for qemu-devel@nongnu.org; Tue, 03 Sep 2019 16:39:28 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x83KXev8053247; Tue, 3 Sep 2019 20:39:21 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=MutKmP+OHj02p9DHj3xH7q24SrwjpKc0Y4265jCiEAM=; b=fLokqer8pP9v1rESLwsR0hQouEgaY9GAxfvTJddV1ZR8cqtD9frA/8LCYo+6dsAjajPD 89zahY7vCdg0paWn530PvzTyKAtYF19/xFPjBvFjystxwKwCABO9KgGw0SyZSb6xZNOL FrdovZxgRjHO5HTxb4AE4VP9e25lr0kRcCjPyxxHE9t+s+O9kd2X7HLynqZGwCd1ZtEC XB4YsGfZmnm16DXoI2NxXHTMYqu6cTYJoaR6xErN6GALo0yCxoDcwNveNSzdF1HtTg7v JLLbDxxb/z2F4+a2wkBQgwfKj7Cdg60JbeX+yD0Gs2XPdU6FnikENbv5KxU/v0dAH9eX vw== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2usy6n0221-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Sep 2019 20:39:21 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x83KcKYb188137; Tue, 3 Sep 2019 20:39:21 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2usu5118h6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 03 Sep 2019 20:39:21 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x83KdJLw017788; Tue, 3 Sep 2019 20:39:19 GMT Received: from jaraman-bur-1.us.oracle.com (/10.152.33.39) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 03 Sep 2019 13:39:18 -0700 From: Jagannathan Raman To: qemu-devel@nongnu.org Date: Tue, 3 Sep 2019 16:38:01 -0400 Message-Id: <9342dcc0fccdbb5e23024e55c7127ab6ecc4e269.1567534653.git.jag.raman@oracle.com> 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=9369 signatures=668685 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-1906280000 definitions=main-1909030207 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9369 signatures=668685 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-1906280000 definitions=main-1909030206 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.78 Subject: [Qemu-devel] [RFC v3 PATCH 35/45] multi-process: handle heartbeat messages in remote process 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 and reply back to proxy object. 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 5552712..f0a4de9 100644 --- a/remote/remote-main.c +++ b/remote/remote-main.c @@ -420,6 +420,7 @@ static void process_msg(GIOCondition cond, ProcChannel *chan) ProcMsg *msg = NULL; Error *err = NULL; remote_pci_devs *r = NULL; + int wait; if ((cond & G_IO_HUP) || (cond & G_IO_ERR)) { error_setg(&err, "socket closed, cond is %d", cond); @@ -513,6 +514,11 @@ static void process_msg(GIOCondition cond, ProcChannel *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;