From patchwork Mon Oct 14 10:49:12 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: 176183 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4382029ill; Mon, 14 Oct 2019 04:29:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPAM2LjWeelI0gNU2QYqaTOwNvN8cF568424XWTKrQ/G7jUrjCdcS089lk17XGjurqBBlv X-Received: by 2002:aa7:d5d3:: with SMTP id d19mr27115042eds.213.1571052593324; Mon, 14 Oct 2019 04:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571052593; cv=none; d=google.com; s=arc-20160816; b=k2GYq95cD3oDiV2050YDv4WVa8Ngl9pfvfB2ZXSQnbXSP1aeLNbGGCR1oVIm9k4/1X jWgdNrYR8BtuPVs94LbfYVFUmb9MPln9Hs1ntfCistzpMuzBlGi2jZ7bF5tqsxBxHoI6 18zbvH0g1rqsT6gaMZcUAdvvVRMIGXffJ8iPRDaYjal8ptznRddMdDfaSMgL1q/HyM91 Xw+ubeMFfRZPUuxnzuVI33gx+++R8mWUTvhAe+/3D+pTPEbpuzFGkzL/D6XAsiZdhkjn 984RKYE5vflmSLY7dkh6DIru1qkwRg2xFIEPt0fjGe55BtgtC50mL6AVdkNC397rBJdN YY6A== 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=rBAuejbdeVXWLJ8WO94Gpp9LLHRvYOoG2nUf360Y4Azb9pr8GwvqoHzCenh1x5XACz 7NdEOA+T1ec7+vhvtiKLmc1Q8tLXU2PaNH/tFsy9fb4FLD3hVvTR/3/uRQJ95qDSm4US sCjPmP9TyW+OuCljRfVHDKy2hfatktIrwZzMgpB6c9ZlWIBjK1IDDeYDyWG80FbWeJwI DswogriB1iE/W0+Lv8Q6E3LZPXy5opY/+9yBOr9D2zVaCIoh5Sxnj/GYy0qEj8DUwX5e 2SByhNENUSqjQrsfpT//pdj9Ihja2zXD2Kkf5o11Z5MdlAay/OJHGuomgLkqmnpV+kdJ N0jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bPEc75TG; 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 z6si12369002edm.316.2019.10.14.04.29.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Oct 2019 04:29:53 -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=bPEc75TG; 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]:47804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJyXu-0008Hk-Na for patch@linaro.org; Mon, 14 Oct 2019 07:29:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJyBl-0007hr-7t for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJyBk-0007Ci-3z for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:06:57 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:42025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJyBj-0007BK-U5 for qemu-devel@nongnu.org; Mon, 14 Oct 2019 07:06:56 -0400 Received: by mail-wr1-x444.google.com with SMTP id n14so19163319wrw.9 for ; Mon, 14 Oct 2019 04:06:55 -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=bPEc75TGH5H05SVrt3SlZHujeshZlKXmrmtKV2XMOml93zAQRqqq7Pjs7VW2Pq6Ob7 MHJZrFRPfHH8chx9Mf7udbaZ369grO8GEXGX02q2SAtlCBXf7i+F/InICx784eCydmmu 4SyMNTTfWuAONG1ioPmoxCOTghjRdsyFsTgmc9gAnZh60A4MM/NcNdDVmLlDjqJG2bWL wmoJ13EpZZesnIswfn1bb4/38wIHn5q2r4Fbfo4ye5Ezpb6YpT2Z5esSc5PMYpA3urFV /dZNk1jbxpOFNX4wEXVHywJHxG41zhYCZoRWI3ErA3JdZN2c0ZrKjVh18hYJu/wGGDza BcSQ== 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=Asmnj8kpHK3lqu9U9Jw64HwLRBZ8V2hITk9pPoKLAYWZD2u7OP2GYv8WjSxoNbtkl3 H8MBLRw4/EpFb3BvWl0gbn8D4tBb3bkUrIY2SidRMeJJto1ustyl0eWJA2E1qruTcQuU hSGSK3Nfiv8Mc5xOad0IxtHZk90dWHLVRDXI8SsjL6tWCB/Zvj6bIE9PzMbtXZ61Psj/ semUccUDB0gifs9k9jxC7/r92WM0s14a6bB0fd6raRnHQULyd+LBR+bHCl7YMwjFQLjY R9g7+WBao3FI2vkOTLDegxt7+7yG5xiuAv1hG6LVx9xv/fgpNLtLyvuyvpVUjmZ7oTpL ju0Q== X-Gm-Message-State: APjAAAWYjF7P/7PUiG6IkSF0wIrjNTfzOs5MtAyXaJS5NT5Ye9QIkH+b rFsFpFvVVOapDMYDHB85QS8kRg== X-Received: by 2002:adf:ec84:: with SMTP id z4mr25286908wrn.254.1571051214828; Mon, 14 Oct 2019 04:06:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z189sm32394786wmc.25.2019.10.14.04.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 04:06:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A44511FF90; Mon, 14 Oct 2019 11:49:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v5 19/55] *-user: notify plugin of exit Date: Mon, 14 Oct 2019 11:49:12 +0100 Message-Id: <20191014104948.4291-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191014104948.4291-1-alex.bennee@linaro.org> References: <20191014104948.4291-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 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(); }