From patchwork Sat Sep 16 21:41:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 723610 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1028933wro; Sat, 16 Sep 2023 14:45:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRV7RGAuJEGMyfz6R0n1pPAmd9DFOHz8v7a40SU/MahyPmihy79p/tT++JPJ0ooE0HzZ6+ X-Received: by 2002:a05:6214:1867:b0:64c:9d23:8f55 with SMTP id eh7-20020a056214186700b0064c9d238f55mr4537618qvb.58.1694900711341; Sat, 16 Sep 2023 14:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694900711; cv=none; d=google.com; s=arc-20160816; b=ZAvJu7LIOOAbggYZ9QgviHnXqoUIcFfk9AROctY3mVlIBaepRKtprosftbsCxhLer/ r+um3kh9ZCbs79SZ6XCVhJxr/GGh2EOcH4/tNmHKdVuHh2wJXfPcEwe/9kL27AwzsxBO y7tLEDFFzqp9ku6JeRpwi57Xui5426iFqc7zVlmPNrVDBzGoUndsA58D2BOgnb8jBqT5 qEkiEQ07vIvEC3P9PLyL98XlG6M04chTY5IifslDtd1978NVEe9jLnkKJPmB0fpcsYcx 5ZCeyiql/HkgTSi71T2x0yWhrNdnYNMdZmxTFmRzZbvnY7nR+TngzgiHgtMhi4I+gpl/ AtbQ== 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=AHcFvVjiu81dG+FC6IAxYA+pdBiv307/mnWZeRBLY1I=; fh=d3q967Ss27yOZEBNWb7WV1pwIIYORDjfLhLmomzC17w=; b=wphrj175u7PQ+gdzQN1O2Z12ouv8laiWPM15GhbG3DPzJKAenW3LJz41+06sTpRXuZ 2ITff9m7mpOc+rOtqiFmtLvU08nbIjftF1EjlGGxo9vgEA4usFT0BaQVNNpmBRbkmqHm ILv0YYApzBJjd+i9GPK7kQu+BBRQ/iU8X88lezTTnfh4i8UxbtKoTNMS/lW1+T4fZxlG dN1AMOHeAv1o1S55DmwXRpU+4JmRsmpKVmLdcm3A99wfgSmjIUS3vn+ZuFqE7OCU9EAt c5z0lDc57eRTLk8SPA1F0DA4WuobO6jei6aALJlcYtIUopFTpABjQhECawjJYJ81NXY5 hBJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nG90b1h+; 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 g16-20020a0caad0000000b0064f4d47df2fsi3968203qvb.539.2023.09.16.14.45.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Sep 2023 14:45:11 -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=nG90b1h+; 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 1qhd3t-0007Lv-Fo; Sat, 16 Sep 2023 17:42:45 -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 1qhd3D-0005Ex-8f for qemu-devel@nongnu.org; Sat, 16 Sep 2023 17:42:04 -0400 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhd3A-0000WX-Cg for qemu-devel@nongnu.org; Sat, 16 Sep 2023 17:42:02 -0400 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6c0bbbbad81so2053961a34.3 for ; Sat, 16 Sep 2023 14:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694900519; x=1695505319; 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=AHcFvVjiu81dG+FC6IAxYA+pdBiv307/mnWZeRBLY1I=; b=nG90b1h+iK2jk5y+hu4e5nfAoDE9CIWBovFbE+bC4vbwUiQog7j1y7+7eNL6HOEl3j ILlaOC7nsIhM8PmzPKJFPeR2+aRDZs+sZvZteD1gmYzcVSBoYKBL9ESIR1jfQCzseAiB 8ngtuO1T8/PLVijQZvXng89iVMJVnJXzs3StbvFHjG244Cjtw6pamKG7K12+mXO8ghaZ IEP6mr2Ps1iDYRXyUTphbhOL/GjG9LHR5fCm/5OGb4EJw0yBv8rZ+UkZtJmo+ZOEwQYh m7X1AFqwyz3mrN+QZNr0biceOXwZ1lQ4kgI8KUHGbge+TVh5mLNkYjJJG3gEkhKVJJWO r5eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694900519; x=1695505319; 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=AHcFvVjiu81dG+FC6IAxYA+pdBiv307/mnWZeRBLY1I=; b=WIXTJsg2UARb7LxUaVrl1OoPRNPvtu4PHayPzN+lGWmQoHuQw1gFnk4uSvT3Mh0s+x RkOmVuRMqgflOap+3ui/cY0rz/06jJGOSp9PjtBORsivfXwIwpvncWTUEsaviRwB2kRI 8YozzFEbMRDN1ztpq960HmooWQJuREVM5xMrguyw9I5Zx+KGs4u4IKBgDGKSKavz2IwY KhdSV/CwWANLn0JF3tnePd0MYA3ouckOejhNVAHnFjR1dwl1Xu9rNLYofSWNbqD2Hjp1 ki7i7TjxjrCW75Igl4e2Chy9FIPaRuP+cwtpQlYxKRPuSnejzsSpr6wIezLdUQ0Mxj94 gJsw== X-Gm-Message-State: AOJu0YyRBsmI2no/kXA1k1HmFZaEe4sTSLY8Fyf+kA8Eof7Aqujbfkpn cdKTFGB5KLP2fN6kpQMExJ1TAxFTyZ40cPEifqk= X-Received: by 2002:a05:6358:899:b0:13f:183b:f049 with SMTP id m25-20020a056358089900b0013f183bf049mr5566313rwj.1.1694900519017; Sat, 16 Sep 2023 14:41:59 -0700 (PDT) Received: from stoup.. ([71.212.131.115]) by smtp.gmail.com with ESMTPSA id n21-20020aa79055000000b0068fde95aa93sm4871708pfo.135.2023.09.16.14.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 14:41:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, anjo@rev.ng Subject: [PATCH v3 36/39] accel: Introduce accel_cpu_unrealize() stub Date: Sat, 16 Sep 2023 14:41:20 -0700 Message-Id: <20230916214123.525796-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230916214123.525796-1-richard.henderson@linaro.org> References: <20230916214123.525796-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::335; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x335.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_realize(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230915190009.68404-3-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/qemu/accel.h | 6 ++++++ accel/accel-target.c | 4 ++++ cpu-target.c | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index cb64a07b84..7b02cb40e5 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_realize(CPUState *cpu, Error **errp); +/** + * accel_cpu_unrealize: + * @cpu: The CPU that needs to call accel-specific cpu unrealization. + */ +void accel_cpu_unrealize(CPUState *cpu); + /** * accel_supported_gdbstub_sstep_flags: * diff --git a/accel/accel-target.c b/accel/accel-target.c index b953855e8b..cc3a45e663 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -129,6 +129,10 @@ bool accel_cpu_realize(CPUState *cpu, Error **errp) return true; } +void accel_cpu_unrealize(CPUState *cpu) +{ +} + int accel_supported_gdbstub_sstep_flags(void) { AccelState *accel = current_accel(); diff --git a/cpu-target.c b/cpu-target.c index 61c9760e62..b928bbed50 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -187,8 +187,9 @@ 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. + * accel_cpu_unrealize, which may free fields using call_rcu. */ + accel_cpu_unrealize(cpu); if (tcg_enabled()) { tcg_exec_unrealizefn(cpu); }