From patchwork Thu May 30 19:42:49 2024 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: 800209 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp401424wrw; Thu, 30 May 2024 12:43:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0qN1yDr3GQgaSvdx9sDkzr/fwm6jhZWkBYhpg2QWUN1Nq/ODjncLP2t9RsQ0OZcdVTuwj6kcFKsHrmmlnWF6Y X-Google-Smtp-Source: AGHT+IEAyGadFdaciz071kdfby9EDRU3rUcpA/h+UgsYFbzmf+vOya3fOKaXPgxUkhawoINo4ArU X-Received: by 2002:a05:622a:1827:b0:43f:f168:ae69 with SMTP id d75a77b69052e-43ff168b02emr11437301cf.46.1717098234706; Thu, 30 May 2024 12:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717098234; cv=none; d=google.com; s=arc-20160816; b=kmxuggUwl5ZJdynx5vW54VCStXMDDsFx2gvtS56O3MrzgU3hEyB63PPrkDmT8p5M9A F/ymc8MquHnbGwsTkvq7tyweS4oejWiZ/Gm/884SWIh2EPS9G1J8lcKyZtoB90/e9WI6 5ctSqTZPs/SnVCxPjDTxyt5Cz3JFIgMvtulUqNmXI64JsF36prozVwk81EKJt3ULcp47 1w2LKrkWENJ5Jsf11lAedfrckJ8qpcyBj1D09+wrigLwPSGqQNvFOkyDLHPhWchPZh4i EErbPQ3PnyxLER8bm1TEiXgfH1VGRpNBk6y3bUUQ8K4eIrVPxjxOQErAZhLUVlxOLF8n ctaw== 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=uSiuGXiCgmtxSxVezOHytC/a0n/fTNdw2YFzo1KJ2YY=; fh=aWK/WapK4xf8SGfzgOGJ7AoHDKO+C0u8XFOVHWsQNds=; b=fbpLd7YTrMZW75Ppx9IJdGAAWma29GWT+jQF+bRjw63NXPn37wSxMbQTjcP3ZEOVqh AZ3RfWrbqQjR2qEWACg8zdXGbQjQvAccUVxJZ8IPrfjpdB4qPpJahRConwFvujT6UhTJ k7TjcuikZWJM/QeYEGOx3RcRSdGeHu3bf0rVBnOiJNcHAY2Irgk0AEljxz6P9ynI/97o MpkdD5nmA9zqjO2AV4itCLcADxKMObYEuLJMwv+RWLf392T5bvUZLeRe/lATYqrfLkM1 bSJprSWnnpyVXhmS1kEY9UdPmQTS+vLDwgrFaZJyGwX+/2bnAU/ZkUPBEwVnt/cuFFhv kV4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kWm70oz+; 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 d75a77b69052e-43ff246744dsi3048961cf.345.2024.05.30.12.43.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2024 12:43:54 -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=pass header.i=@linaro.org header.s=google header.b=kWm70oz+; 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 1sClg1-0005eR-1n; Thu, 30 May 2024 15:43:05 -0400 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 1sClfy-0005dR-Sj for qemu-devel@nongnu.org; Thu, 30 May 2024 15:43:02 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sClft-0006HV-05 for qemu-devel@nongnu.org; Thu, 30 May 2024 15:43:02 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a621cb07d8fso134150066b.2 for ; Thu, 30 May 2024 12:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717098174; x=1717702974; darn=nongnu.org; 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=uSiuGXiCgmtxSxVezOHytC/a0n/fTNdw2YFzo1KJ2YY=; b=kWm70oz+mNRpjlcqKQl0qYPZ750I7cW5ssBh14uVBcA422l9x+6ilKeP+yiv1lCbBI N0o9BgporXvCFTBw3XRlzEqUYGd40fzMPoy3ohEHfABaNoE2Q8+EKkqrmejriksZICQo pofVzAGXV3rLRLwyJFiVqS/Y5mOc1amzpnGbHFXXF/AoMLnnofbj/FoUPbgYlAnVihrl Z0u0bGSIhzz0b8wCAzaKgHEUoQyQ90omkMKa/VJpE/cgOrGAVX25WNQ2E/HdEaaJSB9Y A174yqrjc1K7TtomQVyENjCswjQtkjre8wkcmVcvSxVCLPVCGxx1oDaT/mk5GwWZMVlA UHcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717098174; x=1717702974; 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=uSiuGXiCgmtxSxVezOHytC/a0n/fTNdw2YFzo1KJ2YY=; b=loUqKIXFGSGJOkkYW4v8uoR8JA4nY5s9iezbVebOWygMrG9KfdmQKrwbcOc+t4oNnD i1RI2WvKUhy4Yiqsric6whKUJenAT1cpTiE3cQzQSiZwoFjNAuEDGBV85MwjwqyANm1v o48um6qwOHiYpxlXDH4A9NHvyUw6OA14u/vv1EtTsi52gjrh7N1aGvgg6ykfKF83Etia 8Tep2rXvZm7XvZSevVwZGVHBSKOixHdxjSqOP+IX7n1s91gDOKAWi3h86CSI+6sQabST Ud78pMzC+9Q9yJzxYVUpVac53HSgDgPkEHFdmhKvDs6VY5noS6kir3POE1bqnuWgp9Q5 fUGg== X-Gm-Message-State: AOJu0YxhguhVPgbhLtC6ejMvcWDz6k7Jxa/8Xx+C39Twd++Csol/j1e8 NtLArRNtKc58261tUTp4r8dy/c24jDHNoFnISK2Ks7t7kQsa3MvnJcj5EXqWU18= X-Received: by 2002:a17:907:1dd3:b0:a59:ad15:6142 with SMTP id a640c23a62f3a-a65e92304eemr189379466b.77.1717098173472; Thu, 30 May 2024 12:42:53 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a67eab85f32sm7774166b.180.2024.05.30.12.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 12:42:51 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F38205F8E7; Thu, 30 May 2024 20:42:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Cameron Esfahani , Alexandre Iooss , Yanan Wang , Paolo Bonzini , Eduardo Habkost , Sunil Muthuswamy , Richard Henderson , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mahmoud Mandour , Reinoud Zandijk , =?utf-8?q?Alex_Benn=C3=A9e?= , kvm@vger.kernel.org, Roman Bolshakov Subject: [PATCH 4/5] plugins: remove special casing for cpu->realized Date: Thu, 30 May 2024 20:42:49 +0100 Message-Id: <20240530194250.1801701-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240530194250.1801701-1-alex.bennee@linaro.org> References: <20240530194250.1801701-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham 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 Now the condition variable is initialised early on we don't need to go through hoops to avoid calling async_run_on_cpu. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- plugins/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/core.c b/plugins/core.c index 0726bc7f25..badede28cf 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -65,11 +65,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v, gpointer udata) CPUState *cpu = container_of(k, CPUState, cpu_index); run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask); - if (DEVICE(cpu)->realized) { - async_run_on_cpu(cpu, plugin_cpu_update__async, mask); - } else { - plugin_cpu_update__async(cpu, mask); - } + async_run_on_cpu(cpu, plugin_cpu_update__async, mask); } void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx,