From patchwork Thu Oct 25 17:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 989277 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=braap.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=braap.org header.i=@braap.org header.b="Trqe6Sto"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Cp03ufaA"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42gvwx73nxz9sD9 for ; Fri, 26 Oct 2018 04:57:53 +1100 (AEDT) Received: from localhost ([::1]:56208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFjtH-00086Q-Fx for incoming@patchwork.ozlabs.org; Thu, 25 Oct 2018 13:57:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFjKm-0006j0-Fi for qemu-devel@nongnu.org; Thu, 25 Oct 2018 13:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFjKA-00005J-Fw for qemu-devel@nongnu.org; Thu, 25 Oct 2018 13:21:38 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45331) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFjK5-0008RB-QK for qemu-devel@nongnu.org; Thu, 25 Oct 2018 13:21:31 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BBE25221CD; Thu, 25 Oct 2018 13:21:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 25 Oct 2018 13:21:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h= from:to:cc:subject:date:message-id:in-reply-to:references; s= mesmtp; bh=bTgXBL5M5A8WbcrDXxhbACSxPu5lhrRIU6or8cts1GU=; b=Trqe6 StoV9xD3HWQyjnJqH2yVj1gqannG4vTugzSjFz1YeRHvpJqbiFlLoqmAbsnD5kMO /HuxWu4Mx/oDN9a8zorB8a9o4s0LQMHolIbBx0NmRBwUVWNU1ZL025bswwABhDUQ e9OZA1Br3/XlgK7CJBaN0aSggVnAULMeJD2CI0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=bTgXBL5M5A8WbcrDXxhbACSxPu5lh rRIU6or8cts1GU=; b=Cp03ufaAK7v+xhYpxC2s2xRHjdfRsgp/Suqm1Qg4q4AhF wA/A4Eoi3eiA2opQnE4PaOb7y8284MaGEXN0+aIVZbOLBL69MC6x8a39SAWO33B3 51cqD3LcWPLaTEnznoO5HDX2UwOyR7OYa9aItH3HuSTZpOrbaB+WJG+vbwDBJgq3 eURvsDiiZNVlK/p7uiLqV7j44ydCXm5tt/uZ02aeikS5kQYL7b7pkrjg/mxd71jI 8sWSt23DxV93PfR4TkNGa10bxlaEWy1zhy+VOCRc7vTtuUUr8qIbV+/96lBWak7s teZc25JJsuv9isY2swB9ph27PTX7cc/+4Nl42mKqQ== X-ME-Sender: X-ME-Proxy: Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 562C9E4074; Thu, 25 Oct 2018 13:21:11 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Thu, 25 Oct 2018 13:20:29 -0400 Message-Id: <20181025172057.20414-21-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025172057.20414-1-cota@braap.org> References: <20181025172057.20414-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 Subject: [Qemu-devel] [RFC 20/48] *-user: notify plugin of exit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Llu=C3=ADs_Vilanova?= , Pavel Dovgalyuk , Stefan Hajnoczi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée --- bsd-user/syscall.c | 3 +++ linux-user/exit.c | 1 + 2 files changed, 4 insertions(+) diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 66492aaf5d..b7818af450 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -332,6 +332,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, _mcleanup(); #endif gdb_exit(cpu_env, arg1); + qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); ret = 0; /* avoid warning */ @@ -430,6 +431,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1, _mcleanup(); #endif gdb_exit(cpu_env, arg1); + qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); ret = 0; /* avoid warning */ @@ -505,6 +507,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, _mcleanup(); #endif gdb_exit(cpu_env, arg1); + qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); ret = 0; /* avoid warning */ diff --git a/linux-user/exit.c b/linux-user/exit.c index 14e94e28fa..768856483a 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -32,4 +32,5 @@ void preexit_cleanup(CPUArchState *env, int code) __gcov_dump(); #endif gdb_exit(env, code); + qemu_plugin_atexit_cb(); }