From patchwork Fri Feb 3 14:55:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 650071 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp863214pva; Fri, 3 Feb 2023 06:57:37 -0800 (PST) X-Google-Smtp-Source: AK7set/KNuUoMZovjcH+GNfb06wrNot8v9awEl93kcfI68TrJa1I52hfI7HgB1PT96SlE447l1aF X-Received: by 2002:ac8:59d2:0:b0:3b8:6ad1:7bf1 with SMTP id f18-20020ac859d2000000b003b86ad17bf1mr19248181qtf.39.1675436257151; Fri, 03 Feb 2023 06:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675436257; cv=none; d=google.com; s=arc-20160816; b=mfWMG4+zilpl8SC1Jzvf5PIJS5BXE+UGvZjYNA6FU3gEWh/jguv23k+BvrbPAvWrGh yAjH2guxnjhjhLjtecrdlKoxchauI52gF75QujTcCVnI3hW679ceZ/j1E9HrhTGzmJO8 Zc/+PuOgsbsNPic+5U7mrlapyi56Sys6/yju/vyNgETApqokzv76bgXwKItK/NBGm+kt c7QVHTkaq3itFWK3Wj/c5/dBeeonAUJ8oGkXfQIeGt+MnsbKtdB0OAGhQqS9AgnQC/XU 7f+K/O+wYfcPZrz/NH79Ck26ZEJGR0oUUuFI91Omvt4dRdAFJ8L1tYd2plFQfv9QwL0Q Fjkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=tZif2it4bxphJIlcF0dFkRLHSBXoWvT693QwJQjGzNo=; b=s+CVfhUbPx8+8X73wKj6DRCYAcILxvPUiv7tn0bj2ISLzfPMIuZLEFbxxcbxsQmMpU 2zGe7rOJnYZsgRGbmwDIWS8panMH0FGn5iYu9ONe7d4bEcys+GezMoa+ySZ5H1xgrwjm lkCEK/WuYaUzDU20Hvi0Cus4qZGQFHWANMxL6WamgBgqlKh1gPp/LYdCDfVcsT96h4WR EmT4I5id4jTZEHFLTwx80TmK6RmwH5hNT/aztQRcsdMCmPZZj9o/+bpf5mGV1R4qNqeQ RJFT5F0E0/iy04k3Lg0Za549kp+RxfMGHDXNz4DzOTfE84jQAcrZodpPvSerfipxC8ye q9oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e65UkPC5; 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=pass (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 u13-20020a05622a14cd00b003b86c80c129si2041804qtx.685.2023.02.03.06.57.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Feb 2023 06:57:37 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=e65UkPC5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNxTx-0001tF-6G; Fri, 03 Feb 2023 09:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNxTo-0001sT-UY for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:55:57 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNxTn-0005tV-Bw for qemu-devel@nongnu.org; Fri, 03 Feb 2023 09:55:56 -0500 Received: by mail-wm1-x336.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so6206658wma.1 for ; Fri, 03 Feb 2023 06:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tZif2it4bxphJIlcF0dFkRLHSBXoWvT693QwJQjGzNo=; b=e65UkPC5QmpQDXpDZHki8/zuv9g086olkHcGAS66BX1U36sGP9oqOQf4gfvLXbmgWM ist1JU9OllFI7yZCBz6tNz6Ha/Ggei4zZSLQlDvRC+oetWcabyhOVeDcHTKcfE/DeOXT UlGqCAdz7du7/qgnw12RyoKAAetuy1z94c84H3hjNjLeW+PcZ5U7DVDaMLJ7lxhPexoJ 7jWJoIXNxbYR1XVgjE4nrS34K2iwKa+Fty3/Y9CwuYFmLH5RIrznYxJNDAPD8lsJEfUP P3jb9eGztYmj2MmzbdXCcLIFEU/loAdFWayXAa0CLBy7FJIdV3Cx8dFVHr8zwUYJFjJ3 r1fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tZif2it4bxphJIlcF0dFkRLHSBXoWvT693QwJQjGzNo=; b=mnaKCuqcNvVOgfbiinkkqR1XH6YB49E3VmsvAlI4Gv4vCzEjTt+T+rrZ7xgv7ouU8B Yl4sDGDxRHMskJofr1hNbnBA7GrnR1TWDkUxG1DhTw9+DVNqzhd9ARmuEqfmzCNAhTqj T1IR0103VIqM9jK44lXzQ28zblSZ6h/X9T2IR1w9ugANznbrwL8kxewSK1PA8hHuzdND n7n4zax26ueq4wyy2/Z2QNvQBX/x6FZxFv+Pm0cVj9B9efMqDyZVzF+aOwstMJxt7Hzd WiSOWa1jWWygqaShc5Wbp8ggFgJLSEAFhmZ/lvkHrkYq3ypJdG0lV1NYSohkFTtcDS0D 9R8A== X-Gm-Message-State: AO0yUKXiPMkMcf4557MGpmt3ddxwbwu551D+dzbNqA0PI27r3WC/bMiD CP1UIPeJDz3kIJZl8yCpLxZKE+BTCeLyjpaR X-Received: by 2002:a05:600c:3491:b0:3db:fc4:d018 with SMTP id a17-20020a05600c349100b003db0fc4d018mr10875768wmq.40.1675436153732; Fri, 03 Feb 2023 06:55:53 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y3-20020adfd083000000b002bfbda53b98sm2162717wrh.35.2023.02.03.06.55.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 Feb 2023 06:55:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Markus Armbruster , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Eduardo Habkost , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Laurent Vivier Subject: [PATCH v2 03/15] linux-user/syscall: Do not open-code qdev_unrealize_and_unref() Date: Fri, 3 Feb 2023 15:55:24 +0100 Message-Id: <20230203145536.17585-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230203145536.17585-1-philmd@linaro.org> References: <20230203145536.17585-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org (See commits dc3edf8d8a "Convert to qdev_unrealize() manually" and 981c3dcd94 "Convert to qdev_unrealize() with Coccinelle"). Reported-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster --- linux-user/syscall.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1f8c10f8ef..9299f71126 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8642,8 +8642,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, if (CPU_NEXT(first_cpu)) { TaskState *ts = cpu->opaque; - object_property_set_bool(OBJECT(cpu), "realized", false, NULL); - object_unref(OBJECT(cpu)); + qdev_unrealize_and_unref(DEVICE(cpu), NULL); /* * At this point the CPU should be unrealized and removed * from cpu lists. We can clean-up the rest of the thread