From patchwork Fri Jun 14 17:11:31 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: 166853 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2334183ilk; Fri, 14 Jun 2019 10:36:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxItIqTKwSe8B1Jr81D00ApTSk46nlvWA8VJ4jh722RTPd4QQbXF0jArsRQFgX+U8RJw/Wr X-Received: by 2002:aed:3535:: with SMTP id a50mr83765058qte.237.1560533768401; Fri, 14 Jun 2019 10:36:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560533768; cv=none; d=google.com; s=arc-20160816; b=YEEWf0EUYeb3/QbR80nG9V9heHrETTP2r5oUic7N6An64kIVfhgNDXh5Kx9LoUyv6t NmFLU3iXS4i5H2//FE+tCRHZGlpuGwibtjmgSpZeEuky28ql4wkxfMeOC+65zZTSfrUd OD4FpEnZ/NNZbaFQ0dRQFs4d3/2s3xWEFhzSY0TR4EeDhcBjjw9RAJYpEofkgqP7gTjp hA41U7KiAtRFTFP5K/be12qNz6nlbNXCH1BRV5V4/ziyqJ9Edlhzi+2OcI0uepe5gDiM 2e2Z9trdlDqHhCzNvzKjfc/jsiqnbqMFUlYEOPwrjVheKm7UFB8TYp/eCw3IvG8Kq8ZH gNtw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=SFB1HgIcrBt0RkgATkeUJ3aZb9a2tJWQOmU7kxrdIe0=; b=mUzoO2F8NDX1BgWjd3h7450hpGuidnTg1k84hOrGWMrCz9zQlp2HdfDU81NwqWgzBT AbXh5mXMqiI04QN97WPaIvrxQAHjQLtTBFuwilwP2OaCEa4AeywzRuJFPLsq5I3lIFzO nNmEaNkF0v5bfFR4bTjLgYMpf0rpnnjAvdJH2nuVDwxpBxeVRHbfVRiX+5JGqT6yMhTi snwLXAyl/A0PDs5DvYFJkfKH/zeogFpQ0awmBPNsgHrHZiPibbsmekIJAK6MAHv7iMam dJX7FYOpkarniqBzX50JUUeFg1OLkTPgBcMEo2Uu7ahLdku3wcsRIK5+1DxrJy6UkFdm j2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="l8S3E/Kj"; 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 b58si2007899qvb.67.2019.06.14.10.36.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Jun 2019 10:36:08 -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="l8S3E/Kj"; 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]:53820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbq7T-0003ui-W7 for patch@linaro.org; Fri, 14 Jun 2019 13:36:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58589) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbpqh-0005an-1Q for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:18:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbpqe-00076L-2C for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:18:46 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:46442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbpqd-0006lK-KH for qemu-devel@nongnu.org; Fri, 14 Jun 2019 13:18:43 -0400 Received: by mail-wr1-x444.google.com with SMTP id n4so3294445wrw.13 for ; Fri, 14 Jun 2019 10:18:35 -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=SFB1HgIcrBt0RkgATkeUJ3aZb9a2tJWQOmU7kxrdIe0=; b=l8S3E/KjqL5INvVWbMbz5IYnMh00JOjVVAdagGk6gmhn5DWF2R0bC6RzcL4BxAbH+k fbuh75eEUoKiCsVSoyjpbxpvwIPRhTIMbuVJcKWW4DzgsaXtINPf0wv5Dzb3lAZ+d4bv Vtycr/GGM6Iy+44UrlYTPM/s6cPbsA5P2YfRb1JHQ1HBeFHt72F4aI30qRJx3xgR9DUc 38qKJKtyU4JmBBCVYfDpZR9+2xk9i12rugYKwZIHK2oduvP5X39lmqgNtc2iN4U+Jsxf WeCeY0A96w0giXvj9iEOBj8DTS5s1miW3OPKbtpTn4pGy+yMpFoT0PDO6+d61bnR22vB rHWg== 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=SFB1HgIcrBt0RkgATkeUJ3aZb9a2tJWQOmU7kxrdIe0=; b=FzoDP2nVbNiiyoIJSHT+07m1U1wFUFblXP1gTg0WUHo7SzWTaNHq5hDALGtABYj3gg zueX4Br+VWolSQqzu5QJVSTRdPt0KltMmtW13aO+0rFK6ZUvbT7WomaJ/IICsf1NXaXN 2ptLUJFkOaXbu3seQGDy88ZJA5eyK6gmjBRaBxxGRSS69hGjmgV4yXs9sVBOilgN02mj CsZ2NSnP7Q32oV+7iz0FATo1g66JIEth4f2GupwX7K3CdDi2kjzFIzCwTUWOXXYXOGie rS1XaZHMdT2zNvEiDwNsBXqJqB0dTNzGwSiI+Gb1INXewU9avitFkGZ6WvJRkD02tXir CC7Q== X-Gm-Message-State: APjAAAWfP5EsP1hW8dCRZ3SBc0tsAJWvPfZJio+ziEpnG75vDoimVLO2 fHWKrOukZHP6758jvkcIp6DR7A== X-Received: by 2002:a5d:6b52:: with SMTP id x18mr41998034wrw.341.1560532714312; Fri, 14 Jun 2019 10:18:34 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j7sm4617015wru.54.2019.06.14.10.18.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 10:18:29 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6B7E01FFA9; Fri, 14 Jun 2019 18:12:02 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 18:11:31 +0100 Message-Id: <20190614171200.21078-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190614171200.21078-1-alex.bennee@linaro.org> References: <20190614171200.21078-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::444 Subject: [Qemu-devel] [PATCH v3 21/50] *-user: notify plugin of exit 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 , "Emilio G. Cota" , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier 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 --- bsd-user/syscall.c | 3 +++ linux-user/exit.c | 1 + 2 files changed, 4 insertions(+) -- 2.20.1 Reviewed-by: Richard Henderson 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(); }