Message ID | 20240216163025.424857-16-alex.bennee@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C35D9C48260 for <qemu-devel@archiver.kernel.org>; Fri, 16 Feb 2024 16:39:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rb1Dj-0001PQ-Ph; Fri, 16 Feb 2024 11:37:51 -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 <alex.bennee@linaro.org>) id 1rb1Di-0001MY-He for qemu-devel@nongnu.org; Fri, 16 Feb 2024 11:37:50 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1rb1DX-00045h-GL for qemu-devel@nongnu.org; Fri, 16 Feb 2024 11:37:50 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d10ad265d5so12905841fa.0 for <qemu-devel@nongnu.org>; Fri, 16 Feb 2024 08:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708101458; x=1708706258; 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=LY87PsqI5CseL6bunSV/a+wwJBYv7wofoTM3s0oA7jk=; b=bm5u2WkxjWABIl4Qi9ppMd0tfyhyPJKZ5C4f1IyNzLW/OaW/Vq1CVPFV/6UEhIjYC1 +feNHv7SWHbr2wR/4k32fpLeQWPozHBPQRVs+Nn55q/3gvjfDxkrfftRC6VOv7vq2ozR 8kVClczcl2ccSCYszYyquIXzCpQEcrszjaz2no2vbroFu2JGe89iOLjg66ZdeWdtowSR vHtv0y7j2YVaOZSlStq8M2CvkybrtIiiCPjmulWkbEdSPDFhzTJSYhmj2MsHJlG7+Giq +k577WuwH2J7a756Ze/QlNcedikQJdjPDrmTynVK4DgKC8koicOuihXDPqftOKdt1xTA VtNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708101458; x=1708706258; 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=LY87PsqI5CseL6bunSV/a+wwJBYv7wofoTM3s0oA7jk=; b=jlf7SyF7g7hoQ2jG2qF9nMz2CXYArGQmSO82vvO09Cs2RSnFKtz35lnxFGMNHQ8SaS mwnQ8NmxatU6zfjn7mMUG//VlwBaZyy292xE0q+7eNw24WkTuT7yIO/MR4tJPmeKctxP PNg18p0XaobjjRWSgjaA6gT/jdD8Es9Zo/67K1upgG95bHJvoEgM2aOIQyg4jJsDVWN6 8tBLUbzApFZpVnTtk400CfzEtUsLK92SrhvggtNVrTWM643gg6r7jeI97pAwvRz9r85H G+u6WdPdpghiJ4ZI2fEDxv+u0h0x3Ix67IIxKpiQRf9ZVfmSc7mthzDyFUkcHVi5bZL/ 1cbA== X-Gm-Message-State: AOJu0YzGa/d6tmaTCBQyzqsWxg22dk+alEstxVp4z1JGCFrWRYcbQB7N eAyNbfcvej3Y7qC5iXEqsbKNTB3JxfbvkyUN7GmLNpAuQFPJgBM7xFRK+sGv3gM= X-Google-Smtp-Source: AGHT+IE8pPyveV8Vlvza90Z4Lj4siM18NVcQPXJ9rGlAiKbbc7Qdjn+CleszgmQwhp7VrHZJgm577g== X-Received: by 2002:a2e:9607:0:b0:2d2:1107:3a3 with SMTP id v7-20020a2e9607000000b002d2110703a3mr3184316ljh.10.1708101457868; Fri, 16 Feb 2024 08:37:37 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m4-20020a05600c280400b0040fe308ff25sm2733004wmb.24.2024.02.16.08.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 08:37:35 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C73195F9E1; Fri, 16 Feb 2024 16:30:27 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Yoshinori Sato <ysato@users.sourceforge.jp>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Michael Rolnik <mrolnik@gmail.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Peter Maydell <peter.maydell@linaro.org>, qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, qemu-riscv@nongnu.org, Cleber Rosa <crosa@redhat.com>, Thomas Huth <thuth@redhat.com>, Song Gao <gaosong@loongson.cn>, qemu-arm@nongnu.org, Pierrick Bouvier <pierrick.bouvier@linaro.org>, John Snow <jsnow@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= <clg@kaod.org>, Nicholas Piggin <npiggin@gmail.com>, qemu-s390x@nongnu.org, Laurent Vivier <laurent@vivier.eu>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Yanan Wang <wangyanan55@huawei.com>, Palmer Dabbelt <palmer@dabbelt.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Brian Cain <bcain@quicinc.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, Alexandre Iooss <erdnaxe@crans.org>, Bin Meng <bin.meng@windriver.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Alistair Francis <alistair.francis@wdc.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com> Subject: [PATCH 15/23] cpu: call plugin init hook asynchronously Date: Fri, 16 Feb 2024 16:30:17 +0000 Message-Id: <20240216163025.424857-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240216163025.424857-1-alex.bennee@linaro.org> References: <20240216163025.424857-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=alex.bennee@linaro.org; helo=mail-lj1-x231.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, T_SCC_BODY_TEXT_LINE=-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org |
Series |
maintainer updates for 9.0 pre-PR (tests, plugin register support)
|
expand
|
diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index fe16d0d9df8..68786360ea5 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -194,6 +194,11 @@ static void cpu_common_parse_features(const char *typename, char *features, } } +static void qemu_plugin_vcpu_init__async(CPUState *cpu, run_on_cpu_data unused) +{ + qemu_plugin_vcpu_init_hook(cpu); +} + static void cpu_common_realizefn(DeviceState *dev, Error **errp) { CPUState *cpu = CPU(dev); @@ -217,9 +222,9 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) cpu_resume(cpu); } - /* Plugin initialization must wait until the cpu is fully realized. */ + /* Plugin initialization must wait until the cpu start executing code */ if (tcg_enabled()) { - qemu_plugin_vcpu_init_hook(cpu); + async_run_on_cpu(cpu, qemu_plugin_vcpu_init__async, RUN_ON_CPU_NULL); } /* NOTE: latest generic point where the cpu is fully realized */