From patchwork Tue Oct 3 17:30:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 728756 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2261455wrt; Tue, 3 Oct 2023 10:35:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFepbm+QXkiuA3e5S12QqqPsKseWxVphBjhNWAWnchYbmHM5lir/y/W/lvGrOZLprcPwApJ X-Received: by 2002:a05:620a:4304:b0:773:c1a5:148f with SMTP id u4-20020a05620a430400b00773c1a5148fmr258278qko.65.1696354520912; Tue, 03 Oct 2023 10:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696354520; cv=none; d=google.com; s=arc-20160816; b=GbiGimD2ITMQFY8tOqxEObympJoAbtXfv1fsQRCUagaIpaY+ys2go7ECBSsyy+C7KA JBWx+7Ed7A37p5ODiMWIEs8SpgticDU6OYqbEMv7xdWFw4gAaKsGRsMpVtJmYpKjIU+g Kn51L2bFrEoSkQ/r06AmRm8u7iHFbsGCNPFCJn3yl93buhrTSMe7IChDGob8yEbijHlB GU5GjdRTO521c+w6V8ldOPoipa4+Iu/6fOsRUfYaR61vJCm58nYMLs4GCYL60ks/zLhC SsPiLiHmnZSPKPUqxjOcrb835PRgXNmEopwnAn+MZxxtnqu/J1hLHD3Ntg3qeAqN+Jlv 7ghA== 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=uwR4B33YrXE7cO5Ar0J6YeB7AwEW2b3RFRAyXSWwKx0=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=maQVgqznshRej1R3iYHEkbQK7N+Yl4wGx/cBrKb6vaHnhp5yklGs6pD3ZcffHJBHMh 14N15CgiYDNx33bNs9VX6lElK5cfNfFhblH9+0W/GmfnovGTScJo8/qO3Lod4Mdbj1dV ZHr90nOZt2P2PA4TKv7XYO5DiT/tLcGDS9pRaZXMj+kWeHxj3br48U/ijrpZeGnMTirJ eEMykvwKc/FIsvMEa74PwUhr9MfzzQoS0+QEkvS6O6p+GwcQ6eNPj/9cG4qZQtNR+oWT 941LSeNuIEiacaouyhVTIHzxwgrNDb50bN1yokxR6CyWeydYr3nYrUB4/omMfBkFZJ7o YQ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="i/1veZfy"; 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 h15-20020a05620a244f00b007683f5f874csi705809qkn.645.2023.10.03.10.35.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 10:35:20 -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="i/1veZfy"; 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 1qnjEw-0008M0-Uh; Tue, 03 Oct 2023 13:31:22 -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 1qnjEc-0008FH-0g for qemu-devel@nongnu.org; Tue, 03 Oct 2023 13:31:03 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnjEa-0007Rd-2v for qemu-devel@nongnu.org; Tue, 03 Oct 2023 13:31:01 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-68fb85afef4so997011b3a.1 for ; Tue, 03 Oct 2023 10:30:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696354259; x=1696959059; 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=uwR4B33YrXE7cO5Ar0J6YeB7AwEW2b3RFRAyXSWwKx0=; b=i/1veZfymuRrbhTKAwwMwNs542omHIhqiAJp1a79B3uiHov5ZD6yl6hb2gd4govsx3 ZAmsirzSD4iL8fnxV2MnPY9em+FiKLINIGK5NZ0Qtg1mAeeb0rdziCJuCu9JQUcBIPF2 qSQGjTzCLrf5IWNk+1a5TFMequdA3oQzRtBCYG1Hs2hvjLpkEaiOfPC9Ca+qnUXhOF6x agN0LsezpkFhYnnVk5ffC6WYdKvHratDNqygsdogxaBbtyzCP4EiszonoKu9kmnoAPDL 9CdeKRnarcqGjhtjGrjWjZ6zzczllYNhg/z/3d4H1mKlBK7gKjfhKhoeJbZoxfL/fKS4 a69Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696354259; x=1696959059; 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=uwR4B33YrXE7cO5Ar0J6YeB7AwEW2b3RFRAyXSWwKx0=; b=uecL8YpSKS7UHF9m8rqMBgxMCrYued6YmLFxM7654h10krztkZY8hOTzk5Czih7vTF QMvdYZSzBW1zf9kL2EAcVvvvPmwDdqc5HM/TdukO4Bjzt7o7/uMD2+BNRG/GKvaHFX71 gTOYc39m9FnV6PwuSTY5ZdxnEkOdmPyXNJknI7/C1SeQbfp4XyjccdnwIKswgyyl/uNT Tzs+tNu1drJmX1ip+MVFOtnRZ5zvcx9wpN4hOiohPgZnEwV9YNV1U/PBduYPEeBHioX9 gp26iJMXAHF7YYiOheRYBYQK57qaJWQu+m3u6GpoQZHotZXc1RuCk76vSJjic6/IcVaa buyQ== X-Gm-Message-State: AOJu0YzCTJTw+wbmW7HIoqcpA4B8pU4A33eTLubYm/pCdasZAzsrAjrA JF1OuzYWN2Sn2eoYeNIS8WUTlDYvqWmZzKnP71M= X-Received: by 2002:a05:6a00:3913:b0:692:af9c:d96f with SMTP id fh19-20020a056a00391300b00692af9cd96fmr214564pfb.1.1696354258799; Tue, 03 Oct 2023 10:30:58 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id n7-20020aa78a47000000b00692c5b1a731sm1620195pfa.186.2023.10.03.10.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:30:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 04/47] accel: Introduce accel_cpu_common_unrealize() stub Date: Tue, 3 Oct 2023 10:30:09 -0700 Message-Id: <20231003173052.1601813-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003173052.1601813-1-richard.henderson@linaro.org> References: <20231003173052.1601813-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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=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 From: Philippe Mathieu-Daudé Prepare the stub for parity with accel_cpu_common_realize(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003123026.99229-5-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/qemu/accel.h | 6 ++++++ accel/accel-common.c | 4 ++++ cpu.c | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index 898159c001..446153b145 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -96,6 +96,12 @@ void accel_cpu_instance_init(CPUState *cpu); */ bool accel_cpu_common_realize(CPUState *cpu, Error **errp); +/** + * accel_cpu_common_unrealize: + * @cpu: The CPU that needs to call accel-specific cpu unrealization. + */ +void accel_cpu_common_unrealize(CPUState *cpu); + /** * accel_supported_gdbstub_sstep_flags: * diff --git a/accel/accel-common.c b/accel/accel-common.c index 53cf08a89a..e9548eac29 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -129,6 +129,10 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **errp) return true; } +void accel_cpu_common_unrealize(CPUState *cpu) +{ +} + int accel_supported_gdbstub_sstep_flags(void) { AccelState *accel = current_accel(); diff --git a/cpu.c b/cpu.c index 1e2649a706..2a1eff948b 100644 --- a/cpu.c +++ b/cpu.c @@ -187,8 +187,10 @@ void cpu_exec_unrealizefn(CPUState *cpu) cpu_list_remove(cpu); /* * Now that the vCPU has been removed from the RCU list, we can call - * tcg_exec_unrealizefn, which may free fields using call_rcu. + * tcg_exec_unrealizefn and + * accel_cpu_common_unrealize, which may free fields using call_rcu. */ + accel_cpu_common_unrealize(cpu); if (tcg_enabled()) { tcg_exec_unrealizefn(cpu); }