From patchwork Fri Oct 25 06:36:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 177661 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3277495ill; Fri, 25 Oct 2019 00:25:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUGwJruA44ZPuDWEwnVJgBLL2ca9mDy799GEVGC57YPa8U35W95WQUJZgniN0ZrLUHP6sU X-Received: by 2002:a37:684f:: with SMTP id d76mr1439848qkc.315.1571988314693; Fri, 25 Oct 2019 00:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571988314; cv=none; d=google.com; s=arc-20160816; b=TYsSoTipO5Pe9GS256lOcut/5eZB+bmwM760S+xk2VM8jm7R2FUDVoQF+qhNHbEtcz WMcua2qD/0s3Zgq+MzSxrFHwWjkZH0TmWdN64uOeBvT+ySvOr8VAIlv/Z4kxET1LYd9W b448KLyTctHWPP+42oba8Z6DLTu0sJqjSDKuzPRhwBllag05UzfGjCuuNELSk6A5sqbd kijkwl7MF/DvJ+gi+ycybiOhIBpUY6KVcF7TdeibTwA6DwxTRyT7TPHydaRvrJA6StgF L368a0Q4DyZNMZcbXZd0BWCFfQsecue9gB2Rr2cRkJL7EY25WUGfS/v9e7cMJqSz2yF5 mVZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=InxJufY4GZdXxhorR8TFr2dyO/+lRhEgHf6keWCHq84=; b=qDTljpxwpSAy/6MdT+LoBsmJNtQikRx0D5T4LfnQCHw4s4Q5D61o5t353LoprMR+Ii ICqr9+QYkKowJKrIWTL0Jh1212GnFcollBZtfcufXHKtx75AIM0Ea/GH/gC12uygB3M7 GPH+AT7uij57+ff2i1rzLckeI39F4lLJBJXLWpvuCO7yZAWxbpFrZE/JGqJnzOdQy8Mh PrhqR2swwWrKw4pImOhxBw+3O88J+FxytPFlI5F28nSVk1/Eu3oNzA7NCcuhf5MwmASu +UBMNZMtVjnUgbUOb5d7c8aYqqQIvPaaJt5LchnpI2H5kKECSvzFAP/z1p7cbq3cN0bI tnyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hnWHV+EL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g13si816695qki.134.2019.10.25.00.25.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 00:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hnWHV+EL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtyD-0002yq-N7 for patch@linaro.org; Fri, 25 Oct 2019 03:25:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38205) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtWZ-0003OE-Uy for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNtWY-0007gH-PF for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:56:39 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:56230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNtWY-0007ey-J9 for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:56:38 -0400 Received: by mail-wm1-x32e.google.com with SMTP id g24so796776wmh.5 for ; Thu, 24 Oct 2019 23:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=InxJufY4GZdXxhorR8TFr2dyO/+lRhEgHf6keWCHq84=; b=hnWHV+ELMptqNqlmI81JXyI4tT0hGhEgvyPo6cntZiYZJxFrB/8okHPF2LlpBMknTM DL7aM/8P18p6Hi9TNSZMOjT466NMw2RDl85YkwoBMrCONRHWtt0iRNZMtnITlob9MZ2+ xpyfMoRUmhKiaCSdgJKgg67aD0Jppgd08hWi/vQWuTD5HNLh0/mMjq5JrZKGAgnQQVQK JbpsxFdxSV6UwYtzfraMHRaS5k9bx3UpAzUkG//ftKcUE2oA8yUI3W3hAW4Flr+m4t7y TgN8tnXGDZicCfhkQ+kwHRjQgNK3KSM1Wy7fIAstxbde1trEHo4edJB6srx0rDUoaBDQ H5sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=InxJufY4GZdXxhorR8TFr2dyO/+lRhEgHf6keWCHq84=; b=mgZXOd81gK5eYSaA6fXjWuvOpUynSavwdgUF35ocRA5TemKOe+/3tEReR1vi7XTn5n LXdFFfcbToF/jFUqMNcUhK1EGXldGpxdKpPZd6DBW+Dj1Xxr4ZeKCEW5WkQxcHklEoip OfHcdf8m3qLmedaklu01aeThg9J/LX93hQDj6ejx5n58oUdzjEYGR0b2fsZZ/mpVo7kv FuuaWtKib06BNzSIUHQgNAgZkCP7C0I2IKo2aH0KCKgE7DXyQ8Ij4AL53ysHotmfVi/E TfYqCAMEi3bkK/jFoY9I86AUa3iPudtXwTLnyp6eWWJ6mjW4TVzJaejaBMjqdy3A3P2M NXwA== X-Gm-Message-State: APjAAAUDh00fA7/9MaHaJJl9x/Bp2ltP3KJ71XnVpZ9W3+KUcZXynfrW ms+2mxKnI75ZJunazCkAJ4ftMQ== X-Received: by 2002:a7b:c7d9:: with SMTP id z25mr2026014wmk.127.1571986597523; Thu, 24 Oct 2019 23:56:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a186sm1396359wmd.3.2019.10.24.23.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 23:56:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0547C1FFBB; Fri, 25 Oct 2019 07:37:17 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 34/73] *-user: notify plugin of exit Date: Fri, 25 Oct 2019 07:36:34 +0100 Message-Id: <20191025063713.23374-35-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191025063713.23374-1-alex.bennee@linaro.org> References: <20191025063713.23374-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e 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: Riku Voipio , Richard Henderson , qemu-devel@nongnu.org, Laurent Vivier , "Emilio G. Cota" , =?utf-8?q?Ale?= =?utf-8?b?eCBCZW5uw6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 1ee6195d9ff..84a983a9a12 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 bdda7205532..a362ef67d2c 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -35,4 +35,5 @@ void preexit_cleanup(CPUArchState *env, int code) __gcov_dump(); #endif gdb_exit(env, code); + qemu_plugin_atexit_cb(); }