From patchwork Thu Oct 17 13:15:39 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: 176641 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp964030ill; Thu, 17 Oct 2019 06:57:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFkJuWlSSg8JAZfvbrMw6SgeITIMPgNVfnfY2y0B+6eqOcUkEKGON9hT/Hg5+yRELTaEcQ X-Received: by 2002:ae9:f204:: with SMTP id m4mr3446811qkg.376.1571320626022; Thu, 17 Oct 2019 06:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571320626; cv=none; d=google.com; s=arc-20160816; b=L7u1X1GU2GVFI8US7j/W3NglYauSm0nr9oFww8V+nIKeygiM35bhxMetmcfikd0edc wf5pK0iDxw0/Jo4IUfkVHT1FyNO0QCN0XGJ68d4ktd6RP6V795rLKstdXHvki0GBlS2t ZYrzxZsV0x07vXgQczdKMXEkaGISMUKPTLicN7j8uXucYvgUvMKJMtJW2jy4i/bs3ivo d0G0uTUakZcojNI7A3fI6nkva88oIEczVU0JjzgzR3UL0l6dKRMwOmQ1fnBTD6Ia9bZu VhvpcDMMF/fa+U3Jn8bdESYJeLXU5zxJe3TM7v5Z4bDIhNolaGd4qngyFDrQEZLRDtAg ujDg== 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=uTKqy+wnCWVLTWShRSYu/D5n/xFvdeK0I9HBQnZtYcw=; b=UV0gubbdhZEEsA92MKkxsFKKW1wjjWtpC0hXyHovvW7bBV/gZQpzmer04lTXI9E9bI YYp4dtwMmQRU7+dTS5Cjahqask/UDU2c8vrRmLk0xtFooWT59fFAFA2/FPK87xUwNJz9 VhF9GKQh1mERqX0I3CtoYT3oR99BT4LxHgZJ9w2S4RNvGQwhjx8t5ZWPU3WM3qOFxfCE 8Hng32DO5/jbs716l0AYiOF9rBGjY26myPLvs2n892rbb/5jWNGP9qZ7ju7T1uSzpkUA beoKWAym/SLNgPHxiXwBAT/afAj0X9Aucv8pA6htzAgRRq7xaHUMdUnokRgPt1M76jK1 5V5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QYTzuTqT; 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 f15si2145196qtg.373.2019.10.17.06.57.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Oct 2019 06:57:06 -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=QYTzuTqT; 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]:48584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL6H3-0006U4-0Q for patch@linaro.org; Thu, 17 Oct 2019 09:57:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35665) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL5ma-0002QH-Tc for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL5mY-0001K6-SS for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:25:36 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38960) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL5mY-0001Jj-Lt for qemu-devel@nongnu.org; Thu, 17 Oct 2019 09:25:34 -0400 Received: by mail-wm1-x342.google.com with SMTP id v17so2523603wml.4 for ; Thu, 17 Oct 2019 06:25:34 -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=uTKqy+wnCWVLTWShRSYu/D5n/xFvdeK0I9HBQnZtYcw=; b=QYTzuTqTRv9k4dwikGibJ6BTRaMcJ9Z22ScLexM4hESE2I1l0JLdiL8/deaPzVKLHb oqkNgssyVemThpqxv96DQcyx8jSVEkOVJIhUH5KTOQ3qQ7WTGa0pl3/KjJSHMOzRyJfo tSxML33moo9itmA69RYwIOFfdbqc9cMFdarvQryfG7tFfIiQyUGIUWfxg64scuedhWfE d8yNqGmPoJzAuN1d6mfGKK6q/Xfk7CsvrDkY8YKxrb4xMa+1lrJRzOzjihxl83+0I7Zv 9nWcdmf3807axu1kAF6yqBJDbzTr1nfv+pYFSPn780U9eaQyCOOQ0rNu1izpTuCRGfuT 8ElQ== 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=uTKqy+wnCWVLTWShRSYu/D5n/xFvdeK0I9HBQnZtYcw=; b=htUXtyME6fRbDISY8GCiF0ZxVGDVwv0bfofO0cVgOFJz4kj0auU0HdlIqsReoNicfU 9gEome7elAe4AyEHwo42MMEzOzgZOMtw5v2VwQuKEpL493MSe7TDBB8ItR8qxNPAJe44 ieNG4WNnT8RKaPCsRiS+Orif9PrKQV706TbHvAKOPPdKNsmFh7bN1+NS3simuFBqr/cU rsLfw7KuCbusX9mvsH5VqlumI4e3Q7tnWJHj9+yAIU69VBuVf+KqLM26/6A6P/SaonjQ s3owmwNUgC+aJ+b+f3DWGJojV+XylnpbFoQxJ/QKZ3NO7BdTsEitUlMfQzRJ/rfJ8cu5 U3CQ== X-Gm-Message-State: APjAAAV7yWOWGpUkf2Vo5JZSeR4KRPfyWGswstwQsAH6/YkSJ+NNW7Qj 4WwcJAKRrzrPm47WwJDq+JxKgA== X-Received: by 2002:a1c:dcd6:: with SMTP id t205mr2950572wmg.10.1571318733514; Thu, 17 Oct 2019 06:25:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k24sm10131817wmi.1.2019.10.17.06.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 06:25:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A22671FF87; Thu, 17 Oct 2019 14:16:17 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v6 18/54] *-user: notify plugin of exit Date: Thu, 17 Oct 2019 14:15:39 +0100 Message-Id: <20191017131615.19660-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191017131615.19660-1-alex.bennee@linaro.org> References: <20191017131615.19660-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::342 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: robert.foley@futurewei.com, Riku Voipio , Richard Henderson , Laurent Vivier , peter.puhov@futurewei.com, aaron@os.amperecomputing.com, cota@braap.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= 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 --- bsd-user/syscall.c | 3 +++ linux-user/exit.c | 1 + 2 files changed, 4 insertions(+) -- 2.20.1 diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index 1ee6195d9f..84a983a9a1 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 bdda720553..a362ef67d2 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(); }