From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064770; cv=none; d=zohomail.com; s=zohoarc; b=YnBwzOnmnw7/EZP5MuncF658XWtSX7u9fY0Jmp/f+T9d9LNT279y3WtSuJ933rxpLDcMxsmMZNAOiE/OFju1VHoTEocdD0EftlY6A2oQ/8a5keIvOEePs+4xmxR9OiVgZPb20nJQiCrooKld84MHoAq3nI3zwK0j5op2ojcKmcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064770; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6VZ/i6ZvNqvmU5zUZzrSJBDpAWD/Cx5iX+bh+R6LBuQ=; b=HcHjOsqQD9n23/nXnCJCSw/1+IvON2VXpUpA2zy/QCwEXQhYsGqmdwyC8xMfy0PRjTF4d+3p7WmDXyYIYdshZYco+KtxwAAB3o0i45VLyC0vxFY956p91p1WodIc3XcBujnOxxeh6RQnT57gYdu5Z23dN5bXRYIM63/M3YC6EQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064770697419.0508832881761; Fri, 29 May 2026 07:26:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy8o-0003NZ-8V; Fri, 29 May 2026 10:24:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy8m-0003LJ-O0 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:24:48 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450: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 1wSy8l-0002HF-8A for qemu-devel@nongnu.org; Fri, 29 May 2026 10:24:48 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-49048e043e5so61733965e9.1 for ; Fri, 29 May 2026 07:24:46 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909caa7e17sm52805175e9.9.2026.05.29.07.24.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064685; x=1780669485; 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=6VZ/i6ZvNqvmU5zUZzrSJBDpAWD/Cx5iX+bh+R6LBuQ=; b=L9SlzBVX8aKnsFIlnFuQZVlCw3z9qTzXlRcJn1v+fWYxZgoqGikHAX02gpnqbgqHaj nlkeqL9I55IWTtLQkPvZZ2HjAT4WVEO0u4oRKTdrRMZYA7T75gBbUh2ndPEYiJze9TGR fqwF0W04z0hhuOxnmwcZH+zs/t5bgy74A5EAnigaxY23L/1mx0HNnXiSwkx3nHVDdepe NCBU60k1xBViVs4i523O3cBtE8QN01hvwq3BKfr7Z8qeb151smOmivvCiZwF9xVqYScN NuSZN5SuSzFms/JRfZBxe4Vg3McF+QWB2ZvJi1raK7GGpsbqR3eoQFSJZkTLf0G29LsI 899g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064686; x=1780669486; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6VZ/i6ZvNqvmU5zUZzrSJBDpAWD/Cx5iX+bh+R6LBuQ=; b=MlEauCRkYvKeuRLMwnf9qO+mx+8gmFtrCa18ZtsR+MCWJ6Ew63RH7nIUzIVUl1lr1Y 3UM8GmHj0I/+ZDlTvoMmRVLgAt2oP+hW4czxXkI6a/Yb1dWg3x9RAaRMerLnP78UE0Jn aOK/uQX6Y+TgbG2LL3ZYThXiz2emtYxlTT/rEkLVShC4SHW2s696IYrSjVam6TLLQ+ac G0lqyogJRKMffJrhpE4sm4Z1z10seYumkj+UrI4nxxm4hYrhfoyYpvxV0b7jEaqkyU1/ 3Z9XimHR3X8lKYkA22MU2/10xQcpbjItTig2CzAPXgKS19fCKmMT6bVI2IX+Xpgt0EOF B6+g== X-Gm-Message-State: AOJu0Yxs4qRV213Q474+DsL2g8vBw0I/iKFqCJdtXQ+EHzhHPbDiwDeC q3zMirNfcxX4zzSNN8wLbEDFJ0L2MV86JDDo5siYmEGXeYl76XlONbRPK5mwkEnIu0Ub4is9gtr G6xCHsOaziQ== X-Gm-Gg: Acq92OEbb5N7J1BA/0cEuteixjWrnpx++0ThEZqntx97BOi2jD2OmuutP31B4d2J2A7 GkVkBnC6iPD8DPLxRofDYSKLjzey7IWVb0R/AW9Tqi8NUgboK57xnlETZtjEuq87UfCTwsj2LbW xDya1Hk0ndBiQqnV//yhr7Nf9EaeEbBFbW3YCb3KnmYsEzBaxCj3d5D77j1oj8z0M5An3lK9f3j oOJuOj3Kd07j9xGQsnceQkbw6oguGSs9+vrX61s8v2XBwHZiaintZndGSFCzih7wrS1E6M6OeZS Z/Qp0dcmGNLRtKtYW226GdfJUllktolp8cIATTYecqoWSfiVc6uQ9YFVbeazG0kdb67Vni5hNgu Goy1idNR2xSfRQmC8a5taGwd1UtLLbeKzj1ehQP1C6m6NBwqqHprdklmYu4nO3haAKzSjBNd00F fd6/O3U8MJ/YLdJg44/R+EpCjyRRrA9lhs0za7v7QREnSpEsNKl0pvPgBOC1W4Uk9eIQ== X-Received: by 2002:a05:600c:8582:b0:490:51e9:deba with SMTP id 5b1f17b1804b1-4909c0bb2e7mr47068875e9.27.1780064685579; Fri, 29 May 2026 07:24:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 01/17] target/loongarch: Remove unused 'accel/accel-cpu-target.h' header Date: Fri, 29 May 2026 16:24:17 +0200 Message-ID: <20260529142434.87880-2-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064774184154100 "accel/accel-cpu-target.h" is to register accelerator target specific hooks via TypeInfo::ACCEL_CPU_NAME(), which LoongArch TCG frontend does not. Remove as unused header. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/loongarch/tcg/tcg_cpu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/loongarch/tcg/tcg_cpu.c b/target/loongarch/tcg/tcg_cpu.c index 31d3db6e8e1..2bb1feaa66f 100644 --- a/target/loongarch/tcg/tcg_cpu.c +++ b/target/loongarch/tcg/tcg_cpu.c @@ -9,7 +9,6 @@ #include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/plugin.h" -#include "accel/accel-cpu-target.h" #include "accel/tcg/cpu-ldst.h" #include "accel/tcg/cpu-ops.h" #include "exec/translation-block.h" --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065023; cv=none; d=zohomail.com; s=zohoarc; b=Wf1uU+QQBigt5lxO3fbfmfzi7i72PVTz0W16bn0pF2P4F5aKDUO88mmrs0vv6yGOIvVvP5HZb8tTBZfvZCO7MBNQSUpz98autmzfbw1gh/m8yop8sTxQ4Aiz9ayDqbz6ufBycSkTr6q3XgSFgz9o4tFLu4rbqq3ahgKrjUtRG/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065023; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nFEMIJ2KJOaWjwhyxDKINz2zmIup5qa01FGrlMeKBW4=; b=F1i6FVw4/frHJHYoLQQ1KV6Gm/Z9V0Cp5Iulk4fhtTnrHxbBTXtlImc7Bo5mvufecH7fBK4MlYf2bGhFR9N7yKhZgCTsF+3JxyLMB6gwbtTmiLt9LJRik9rKmGNJrOdjyW2zxd0dtNgGCFMM5byroZ+1pB3x+nbN743JDaAMxrs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780065023785977.0477287530144; Fri, 29 May 2026 07:30:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9I-0003ZB-IJ; Fri, 29 May 2026 10:25:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy8w-0003Rb-4o for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:02 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450: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 1wSy8t-0002JJ-17 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:24:56 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4909e3fa4b2so6257275e9.0 for ; Fri, 29 May 2026 07:24:54 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909ca6e124sm47683785e9.7.2026.05.29.07.24.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064693; x=1780669493; 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=nFEMIJ2KJOaWjwhyxDKINz2zmIup5qa01FGrlMeKBW4=; b=TMIOQDfjIwR9CiLgenITha2FEEhEduOsWN4A/UIoU5aLCwpI5fiuwfKJb6km+Hz8FR 1Ws4gP/ZsXCn46yYPaa5X0aIF3K+iNPia+4THCmMCEjnbJHimdr9AYHtnZNnC747Js/Q AwV3wIXzRiizDI4OFifpB+etQu2e35ksBEoSSTv+tK4bmPjhAdz3rRGwkWI/OlPZEid4 28GRC+XoM8mf/sImff28Q4lcKpflHW+t12qWqxcpUGkfx2O6NSWQbzl3h4IuPIq4vc9x E8ZGzhv+nDlOYSAIOij16W1BdQbjfjaTUPaTT8PZQjs/NjlMph6s1pT68kqlCANazeus SN5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064693; x=1780669493; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nFEMIJ2KJOaWjwhyxDKINz2zmIup5qa01FGrlMeKBW4=; b=hwB3PIMTr2ekevF/+s4EcnYu9inyw/kPgjtGSnNGPMT3sKJXtsCwV2Pe7R5NXdth6v cWUsf3fFoZY6E7ZcQqI3gXarD5tDHGG7KcRbbqU+XP/uagsQlUXiWevoY928hf4Ytm/k XCCEjkkz0MCTLnNjm5QLNd/20c1IphRQAV2yNOjZ9zpwm1SW/fLLbhzgyNc2QPUH7mlo Fb5RJb2SgQi+ZdomrqKJ26sDUNk+3QI0FyuPhbES6aY2+bXM8x6glujgsbX6PFOURgMd kufKiNX6BL31AexzD0/1HLEHOd80zXtXQy2SoP1lUwFq8YXOvhMXH9gWfBdnwL26a4Qd Oljg== X-Gm-Message-State: AOJu0YxUkmeFyuvdN1xYKkZd746QK4s/sOZx1Hg8JqB/GsdTtSRjqnrG imlGf3qZXJ7fvw5ir0l0ogUmokPmWYCfs1X7FoiNnKz5L+XIHZyKXXyTBxBZduOvqk6XSeoTvLQ doC2F7cAb+Q== X-Gm-Gg: Acq92OEbtriV5KGm//nxem9Vwz0evHrLNethhfsNm5lT9S9Eu4yBSIc1Gp6hcVioWWE URDDMbLAvux7xWU5WAVkgS+g3+0r4hkZeKU/+Tl/L1d3Gga8T6REI5+hRtyTksPqESepFFpcLO+ 2X7+Tpo4Q3ci9I0TTsyPNMJaw/AqiaRDjYEsMNWhlCHErGg9Wik6F5JC5do9HwHXrIc3ZwhKQbw BCxb4mKN0P71RrRI7CcqAlwbpcQLlRuXElErnqPBsJxHU2+MTNJpNITIh3iWzM56moApS38RcOB bSN6OMVu0qyr4JfhYwH7WL7F8V/VrUMXctFbHE6YeKr5H9t4H/z/8DT9Q4cy2qwOheG3Sw74lCv eO8AJtaphI0U3U5SV3/gMidu2qVogISopAkl1PQ9Y4YIHQR7SOwiwE7uhWglVPnGrRV+mVs2Gxr RrY0SOrSBDjRRRRNWHLsnFPrHroBwdvS1MJOzZJJFxLeM5P9NoTpCO8sX8s8qvg0konQ== X-Received: by 2002:a05:600c:1d18:b0:489:c57:7836 with SMTP id 5b1f17b1804b1-4909c0c7ad7mr56817125e9.27.1780064693487; Fri, 29 May 2026 07:24:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 02/17] accel: Remove AccelCPUClass::cpu_class_init() Date: Fri, 29 May 2026 16:24:18 +0200 Message-ID: <20260529142434.87880-3-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065024861158500 Last implementation were removed in commits f50d0f335a6 and a522b04bb9c ("Remove AccelCPUClass::cpu_class_init need"). Remove as dead code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu.h | 1 - accel/accel-common.c | 33 --------------------------------- 2 files changed, 34 deletions(-) diff --git a/include/accel/accel-cpu.h b/include/accel/accel-cpu.h index 9e7eede7c3c..88c0815e2d8 100644 --- a/include/accel/accel-cpu.h +++ b/include/accel/accel-cpu.h @@ -15,7 +15,6 @@ typedef struct AccelCPUClass { ObjectClass parent_class; =20 - void (*cpu_class_init)(CPUClass *cc); void (*cpu_instance_init)(CPUState *cpu); bool (*cpu_target_realize)(CPUState *cpu, Error **errp); } AccelCPUClass; diff --git a/accel/accel-common.c b/accel/accel-common.c index 62590a7d9a6..ebc103053dc 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -32,42 +32,9 @@ const char *current_accel_name(void) return ac->name; } =20 -static void accel_init_cpu_int_aux(ObjectClass *klass, void *opaque) -{ - CPUClass *cc =3D CPU_CLASS(klass); - AccelCPUClass *accel_cpu =3D opaque; - - cc->accel_cpu =3D accel_cpu; - if (accel_cpu->cpu_class_init) { - accel_cpu->cpu_class_init(cc); - } -} - -/* initialize the arch-specific accel CpuClass interfaces */ -static void accel_init_cpu_interfaces(AccelClass *ac) -{ - const char *ac_name; /* AccelClass name */ - char *acc_name; /* AccelCPUClass name */ - ObjectClass *acc; /* AccelCPUClass */ - const char *cpu_resolving_type =3D target_cpu_type(); - - ac_name =3D object_class_get_name(OBJECT_CLASS(ac)); - g_assert(ac_name !=3D NULL); - - acc_name =3D g_strdup_printf("%s-%s", ac_name, cpu_resolving_type); - acc =3D object_class_by_name(acc_name); - g_free(acc_name); - - if (acc) { - object_class_foreach(accel_init_cpu_int_aux, - cpu_resolving_type, false, acc); - } -} - void accel_init_interfaces(AccelClass *ac) { accel_init_ops_interfaces(ac); - accel_init_cpu_interfaces(ac); } =20 void accel_cpu_instance_init(CPUState *cpu) --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064805; cv=none; d=zohomail.com; s=zohoarc; b=YOC1I6D5ZJUc0ArTCwcp8lFTJW9slIfR6cJ0XD2M0mPzlxTjbyUttTLL+sBBWTSFRbk8v1TkFw28dE82c6xsOZOROBd9ejH7TGvYqXfzXBVuLB6sE2j8gCWTY+AXNtvssVCOmTrYp2i3h466egpQH38N+HVorja4Q8Yagn4nKSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064805; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jW2zG1X8bHmlXnWN82TlCGxlIo9/KiyZAvhHEyZQIgo=; b=fd9VFlY+wJBvscx1Q4px3gx+IixfgeuA13M+P6GwgAKItP0WCEqbQcVJyd177MfAQhRwHRb+ccatB5Ll8o7GE7dz8R/et547pns0VqAE6kJNIxOlmoARTLvLOQhBCRIG8GT3Ggm5ab8sfNjuXkro5WDpKg2F6cXe8A2SHOCHvVc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064805043778.2045176549999; Fri, 29 May 2026 07:26:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9K-0003ez-Uo; Fri, 29 May 2026 10:25:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy93-0003SS-59 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:13 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy91-0002L3-CL for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:04 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4891b0786beso93447345e9.1 for ; Fri, 29 May 2026 07:25:02 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d696f25sm60774685e9.5.2026.05.29.07.24.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064701; x=1780669501; 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=jW2zG1X8bHmlXnWN82TlCGxlIo9/KiyZAvhHEyZQIgo=; b=QUDskZt5d+2OuKFbLcILoHSaTuymCcwXf+j15qlvwh1TpM4dfolyFYlJCT6b9bXlBO 30nLmCs4qDKaHc72BzlpnjeLbyU21Cz8SPwJWAg53WKK2GhZUL9s87jMSrfrY/wDquEe kUehVUNQ3kvNnO4SLwsSxYT8PBSqXcydDPmWpDSzrFHd+bh5vx//aBJwZ13QOkx2vq1b E8ThxZci1cLnpB1+1QJjZLnaNIBNlOrEu6lE9kr6G3Nh1+6iDc4IgCzZArjO6NIV1+8i oqU3R+/2YLga6V8Dq74ZevPfTFZWPfmk9zd9fCS0bILbuW53SPLZnmSMbMDtyMoxkGiv nfJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064701; x=1780669501; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jW2zG1X8bHmlXnWN82TlCGxlIo9/KiyZAvhHEyZQIgo=; b=XgFN+QDD/a1P9gftfK2ZQV4dVfT5EqT7Fs6CMnOhYOlULYMO5Tf+3IhFKBwBA2bYxj aewjfWyvqWFrH3+OPaWLlXdHuPqcd4Snlxax/Bp+WQ5QsXtSA7pcLKgBP/WYrWaOexXC Jl4yQldNmx01vR10Sfu05U2S9SF+BzGNhSnKB/iZlu+ZOrTfjxhTSTkypwLiBAh7/Xrp Jjx6JZB2giPSMdZbWrpDqY3nVIga5tGJOTQg8Etxw/gKX3zKo1Z1ea6kDJSbmLcIG+/4 x7GjXPcpkJWLmDCvKScX2NTZ4uCAcib3vO/q7P2ZPn+c0EyRHGFFtHcrO00R0NZzaLt6 bQHQ== X-Gm-Message-State: AOJu0Yy2PH/Vdj77OX5if1jRY+5vxSZhJ7syxgcHZYeiYy+mQXsefHC7 3DHeu3Q2H1yg4C1k5CqfI3zOWqshCOBat7g1wB0yL/GVKlmvj4buRQm14NLO/RtPmU2NcA+5Mnn aLlzuX1LMSA== X-Gm-Gg: Acq92OEvuF1Ic5qcxBnB6KJn87CUEGKY/q71rWO7ebfOLOabK/k5Wri7RFZ+Y6+knwB 7LnNBwr7aDhOJbW5+MMEDHvIJOpzqkSb678Rh7zkS5IvaKgcSD7YNpP5EXPm75xTG1nToxKVQix cW4cDFceJf37Ar+o4cQmu/DUw369vAKvnG8saJlgR3rtxs6wuZG8VwKU/Y26Ibfjno0LEVGVJE6 twCN94CYvj8Q9IC+XxYENO6VQn2KH+jeCwwzKPcb0nnmBgfQ6jlSHF+cAI8XnYoaG+AQPCr0JFX V6M9OMKT/4C0HaA4hjVO7ZppbUrrLdJhXR4S1biGeJ8jRrGv5L4nB94RHuhTuih2yxYW5qLZxVt UhkH2xmGfmlffC+MJHO4i+mbiCVhxoQGEanL4kkop1GjvJQpVjbxsOZ8AzlbDuh5O9zGuv2pP0O 3Z3t6BEXXe4p9U8+lK2cNzDyLNqKRPCmdXUamF88bBhvaD+qWw3DlPDkxFlWUC3u1aRQ== X-Received: by 2002:a05:600c:1453:b0:490:9536:c513 with SMTP id 5b1f17b1804b1-4909c0b0012mr40361385e9.19.1780064701417; Fri, 29 May 2026 07:25:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 03/17] accel: Rename AccelOpsClass::cpu_target_realize() -> cpu_realize() Date: Fri, 29 May 2026 16:24:19 +0200 Message-ID: <20260529142434.87880-4-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064805568158500 cpu_target_realize() is misleading, we simply want the host accelerator to realize its things on a vCPU. Rename more generically. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu-ops.h | 2 +- accel/accel-common.c | 5 +++-- accel/hvf/hvf-accel-ops.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/accel/accel-cpu-ops.h b/include/accel/accel-cpu-ops.h index 9c07a903ea0..fd1307dad6d 100644 --- a/include/accel/accel-cpu-ops.h +++ b/include/accel/accel-cpu-ops.h @@ -34,7 +34,7 @@ struct AccelOpsClass { /* initialization function called when accel is chosen */ void (*ops_init)(AccelClass *ac); =20 - bool (*cpu_target_realize)(CPUState *cpu, Error **errp); + bool (*cpu_realize)(CPUState *cpu, Error **errp); bool (*cpus_are_resettable)(void); void (*cpu_reset_hold)(CPUState *cpu); =20 diff --git a/accel/accel-common.c b/accel/accel-common.c index ebc103053dc..176b03e0e90 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -60,9 +60,10 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **err= p) if (acc->cpu_common_realize && !acc->cpu_common_realize(cpu, errp)) { return false; } + + /* specialize with target specific realization */ if (acc->ops - && acc->ops->cpu_target_realize - && !acc->ops->cpu_target_realize(cpu, errp)) { + && acc->ops->cpu_realize && !acc->ops->cpu_realize(cpu, errp)) { return false; } =20 diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index b74a5779c3d..6edc2242ed9 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -356,7 +356,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, c= onst void *data) { AccelOpsClass *ops =3D ACCEL_OPS_CLASS(oc); =20 - ops->cpu_target_realize =3D hvf_arch_cpu_realize; + ops->cpu_realize =3D hvf_arch_cpu_realize; =20 ops->create_vcpu_thread =3D hvf_start_vcpu_thread; ops->kick_vcpu_thread =3D hvf_kick_vcpu_thread; --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064774; cv=none; d=zohomail.com; s=zohoarc; b=GicppmIxVsLoW6pX4/eO0gSirLAJNABx3Bkxj2EP5HAphw/i3sYunP4VEwvG6gtAUQC341ddUpUsITGnZg9a+o3Hnt6FxjcqOXkJ20vCCIwao7BHYjpMVhduUZeM0tIjFGNaYLrDw0gFLlUeqcra8wGv8MfR76mU6sEAAVYeP60= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064774; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P6oyorGlH+SpcUBdmmr9vp9bR/hdFD5W9NOUghfpRrA=; b=HXmtWrmdCACj+XhToTjiYiBUT4TN5G4kj6jd0x4xDmGadsnObOcYWIrH7GYr7RCb+KuDv+VISnBuJcvB3ZGCLJv8VCxBiumPDCgdOyOt0oA++uNgpfRa+bR+zeNtbd58wW4bOPoXnGCZJ/oM77j8+G8FaZ4k2dnlbbyU9HBAWO0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064774264225.15977855866106; Fri, 29 May 2026 07:26:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9N-0003lU-2M; Fri, 29 May 2026 10:25:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9E-0003Xg-Ls for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:18 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9C-0002Y5-3L for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:15 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4903d5c67bfso45950995e9.1 for ; Fri, 29 May 2026 07:25:10 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909ca72cfbsm49313385e9.8.2026.05.29.07.25.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064710; x=1780669510; 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=P6oyorGlH+SpcUBdmmr9vp9bR/hdFD5W9NOUghfpRrA=; b=eIz9iOEhGNh2aj5BqZyZAukxO8VrDR/QXCxHk/GbEq+uSVWGDgAioT6MT6KIohJPsP PuZy4O0bD3q54nzQWwNbjLdneCxiJA5USunX40vgXaTHmUN3ZWo6++2yUn8OkJEmlybg +rEQTehQa71CZiR2prjRGl4cPQdmTGAJ/lcmy0eBTIau6sSn17s8xFMEq5mcbwpl/63r 7hEGligs9JHSNPMT6mNH3AEl5nKA43iDcIgsSxJPNp5OmpM3jv5SxGqMkH4ME4Nq3rly vi/t8IKw3HoxsJ7F5a9QyXIyr94YDI4rIFSZGMHxJ275G2aeriBBQ/9TKtdC9pQ+TF8q 7oqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064710; x=1780669510; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=P6oyorGlH+SpcUBdmmr9vp9bR/hdFD5W9NOUghfpRrA=; b=aw+0/i5E6U7dq3I/nLHZNkd3rJEx3tvaHtz/aB16zhVfgDlL+FqlFkNbBFwkrxUFVF 45crVeWrEW0WAhbRD3hpk6FgWMKVhHyK+xGYW9PUbk0W+v1G1wilf2vX24wmahgsv9i2 0hqyKpYpvuOxGbDwUdT6TpxFNZm4hFT/Gj19rHtiKdqjmkErJLjFLMHxt6nlp41HpsHF wMOC4GTxc2ZX6D6vLJboywTQr23YmBVSGdZKswNu3V4gu6XIP9f6pyXpIPE6TiQE6ze2 Dvg28Trh/fbv8i+phPVuVwaIFRpczAnMPg4uSXqpIy0h4z0lxj+Gyimxm9RrsT4Y8a21 biJw== X-Gm-Message-State: AOJu0Yy/IrQR4y7dEvy46PENvzKbRIo2SWH+LRgc7xUKmeL8+lUptQ7X tSS/e7qAifll72j2xp8Rz+qgQbDNH4ufP9YC3HEtulP3LG/g65CygyAkj7HRDYFnrDyTe/eBpj3 0Tx2spPnmhA== X-Gm-Gg: Acq92OERfW4UR2GiO1nklF990Cw2lWlWVSa9ZC1MMLNd5hMuIvCInPJbcGH7IFts9RG EISqm7PBY9Tnj4N4mvhEFpvwkKWLwmracbiZ8m1xSDXITXFArSOZpbTd0wD1dBKK4wgPg6FwquL hKIcLp9IpoO8ijfATF0Zf4N+yaF5v8djOWV0xCeR9hVpAMIHZcFuKT+9LsVybY3BavzLVXTJEa5 gWGBRy+y66wkCjl+yC9eAAbxc2GqIZtBAcCpGSj3ZEIX4MdLsRw+sOywmaODVaudpbjaUpa5nbx z7mSy0ygzwoQKulQafo/JNcc14ZXDHQhiFc+2u9yGF8GuN2ONl0eLKVxtIKsfKxXqGOT+nB/mRv rAwwa9CebsaVa1pFGUj+avnHi1XQP4qX4jb/Cx/vGrNTCX09jdbHjBrHiRynSVa3/C9edp/zdVW 6P9IslFNjhVdW40WnLWIyy4XAP68ROSPvP6kFPv3fJNggsNy19K0WmuoUkXKiLQS3Y/A== X-Received: by 2002:a05:600c:e489:20b0:48a:76a3:2b9b with SMTP id 5b1f17b1804b1-4909c0ba7camr44898955e9.17.1780064709341; Fri, 29 May 2026 07:25:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 04/17] accel/hvf: Remove need for AccelCPUClass::cpu_target_realize Date: Fri, 29 May 2026 16:24:20 +0200 Message-ID: <20260529142434.87880-5-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064776719158500 accel_cpu_common_realize() first calls accel_cpu->cpu_target_realize then ops->cpu_realize, which is set to hvf_arch_cpu_realize() on HVF. We want to remove accel_cpu->cpu_target_realize, so have hvf_arch_cpu_realize directly call HVF AccelCPUClass target_realize handler. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/i386/hvf/hvf-cpu.c | 6 +++++- target/i386/hvf/hvf.c | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/i386/hvf/hvf-cpu.c b/target/i386/hvf/hvf-cpu.c index 316c1b0ba07..35f6bddbc0e 100644 --- a/target/i386/hvf/hvf-cpu.c +++ b/target/i386/hvf/hvf-cpu.c @@ -73,11 +73,15 @@ static void hvf_cpu_instance_init(CPUState *cs) hvf_cpu_xsave_init(); } =20 +bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) +{ + return host_cpu_realizefn(cs, errp); +} + static void hvf_cpu_accel_class_init(ObjectClass *oc, const void *data) { AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); =20 - acc->cpu_target_realize =3D host_cpu_realizefn; acc->cpu_instance_init =3D hvf_cpu_instance_init; } =20 diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 2d1a943b96c..c2cbacd3360 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -369,11 +369,6 @@ int hvf_arch_init_vcpu(CPUState *cpu) return 0; } =20 -bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) -{ - return true; -} - static void hvf_store_events(CPUState *cpu, uint32_t ins_len, uint64_t idt= vec_info) { X86CPU *x86_cpu =3D X86_CPU(cpu); --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065116; cv=none; d=zohomail.com; s=zohoarc; b=f/DaEzSXWpENl2tW0P5fwJ4g9eKA1M1uEsk10ZsTETSn7YblscB/NxFd+XtcSKfmf/xIe664E3+PfbVd5ozGKaNsZjXdNCHEC6nOhzibT3Ofb7sS/BlEmU5YrZ3VpLRKQiZWDNdBXbD5t0VZpsvoH+VX+UVszygidMN4N3RdSRk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065116; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bdP9i+JrjhdKS8gr6UNWElrHkOhMofDhadEAoaHt3zc=; b=dhcTZqH1m7NXcTfwNS1+Lk40GrctA52aANTAccUAsjB8+LmfuXGgQ0JELqWU28pubPNV1iYei+MrAEl1LRCimnHjOVC3z15fBpDuv3Dj2GIXlNZBoppQEg7RB6/JO13EzrvawpEvbmQbXkzbpP4ITI2pqQLVfxc6BWjQWp1E/RE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178006511618394.93449036590289; Fri, 29 May 2026 07:31:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9O-0003ot-LW; Fri, 29 May 2026 10:25:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9L-0003gG-9m for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:23 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9I-0002bq-5E for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:22 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48fde648a71so92842215e9.0 for ; Fri, 29 May 2026 07:25:19 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909cab7b00sm47144685e9.14.2026.05.29.07.25.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064718; x=1780669518; 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=bdP9i+JrjhdKS8gr6UNWElrHkOhMofDhadEAoaHt3zc=; b=uT4m7nRibqm+0KYsxEOaYdC1RZ2Fk/AYndTaQlb8CKcH5cK9cA0uYtyimIdn7zedNm nm1kcxOWRHlMbEwtPVcVKB1FznvsvPkQSg9SG2alxLApfS77+0K3B8hem7+HMoHcmRHI Mj5Si7R/71Lg/7AlDvX42/iGHadfzkRWZAPgm7jViVPDo/6pNNRX6+sfErAxD2mJ6raB YI2wD/e6Z5SVTE+maPKc1bU6lKplB4tZRynf1JZUjqwDDkDbRwEQd/04HLIfcbvE3MeR 3EYCuDC8TQvwTU84nly2aIZQBd1b0LnHL8kfBuO89jtz9gscstLH5tbkdPice6zzOhVd kEiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064718; x=1780669518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bdP9i+JrjhdKS8gr6UNWElrHkOhMofDhadEAoaHt3zc=; b=EXeB4vAtHp41jFekAqlEHZU+xAGwiKZORxG3Tapp4BbDvxTuMIufGfktk5ivNZxdLA PYAgbFip67UrK0mwbd3HZ2+r28ROC+G081G99B9+bJyMvkzX+ONQBSpOe42B6VSDxlWW NIs385K7fTtunuGXV5+LXXOZWv5rgR/QTNW2MkyaPjXMVGbnZS+BfgjGkWq1dSeTQUCs z5/SaoswRKjZlzLiqZfqmz70VSuvuOOCdJXPGl8/n9ezh6aaCPLPwFpB6QmEJdXIXCbx faQcxqEND746i3Z9YtxjfC7ZGv1zGMN2LBO0LDs0L/UGsN42aufXj3QBPlQAv1GFLT3t 0wIQ== X-Gm-Message-State: AOJu0YwNNUG/PSUOuPypIyrdSsJIzQ1D+xPTmvoxQCQt6rdOO/9nl+gi fpiJKLaBMD6gibHblwYrJJjiwXJzoBnLHzeMSX4sDMsen34K8OZbUt/0TGJ1VdkVcUz79/xSTfO Gf6+XxzFmFQ== X-Gm-Gg: Acq92OFjow2YKW+vrIVhB5cOjCCHEOuEOkoVMTYIkYQWnqP7PgQelFgD3yQoxctkaYD xHzJFMGl0q6nawkTjs8vqGdbwQ7XqAq77Pwiq1PH1+CtsKt0zoP/fFEjw5jqK2pn64N+yYtC//x 9BGO02NlMdehbF63wjnq+DU+d4W+MWNqQU0/coDszVKI8j2Aqq988SwaCUwKHDVrAsXF3xtEPMN PcmpPL+TBtNAkZPJDEGOj+xzIxSR/IubIGqc1h/WqVBbfRGrzUhFSN6haKZQI2H56/2pBI9HRHw W4w91rZDTZwyQfrtEKauBamxqh3xuKpc0IxYvUfiRy0t0NViMCP6/8dC0ElE1PbGl+NLmI7H/cB m8DebXqKQUNGfX5TuA3QwO8FoZg23LZbftMwNpNKQ3D1W8ZOH3ZW+d2dBzIcR+cuGJS055D5iZ6 ZRWgPX7qu5swHpfQ0hStR6fzFA7KJfdxjb8kuedFfBRSHfmJ3A5yuta2G0g6i736U7AzIrMoQCG rg/ X-Received: by 2002:a05:600c:8b37:b0:48a:53cb:8604 with SMTP id 5b1f17b1804b1-4909c631587mr43232345e9.14.1780064717711; Fri, 29 May 2026 07:25:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/17] accel/kvm: Remove need for AccelCPUClass::cpu_target_realize Date: Fri, 29 May 2026 16:24:21 +0200 Message-ID: <20260529142434.87880-6-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065117977158500 accel_cpu_common_realize() first calls accel_cpu->cpu_target_realize then ops->cpu_realize. Rather than having one handler for each host architecture, use a single host-specific method (prefixed with kvm_arch_* like other similar KVM methods). Register it once as AccelOpsClass cpu_target_realize handler. PPC's ACCEL_CPU_NAME("kvm") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/system/kvm.h | 2 ++ accel/kvm/kvm-accel-ops.c | 1 + target/i386/kvm/kvm-cpu.c | 3 +-- target/ppc/kvm.c | 23 +---------------------- target/riscv/kvm/kvm-cpu.c | 10 +--------- 5 files changed, 6 insertions(+), 33 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index 5fa33eddda3..fd7175ea9f5 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -364,6 +364,8 @@ int kvm_arch_pre_create_vcpu(CPUState *cpu, Error **err= p); int kvm_arch_init_vcpu(CPUState *cpu); int kvm_arch_destroy_vcpu(CPUState *cpu); =20 +bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp); + #ifdef TARGET_KVM_HAVE_RESET_PARKED_VCPU void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd); #else diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 6d9140e549f..4294c7a9514 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -97,6 +97,7 @@ static void kvm_accel_ops_class_init(ObjectClass *oc, con= st void *data) AccelOpsClass *ops =3D ACCEL_OPS_CLASS(oc); =20 ops->create_vcpu_thread =3D kvm_start_vcpu_thread; + ops->cpu_target_realize =3D kvm_arch_cpu_realize; ops->cpu_thread_is_idle =3D kvm_vcpu_thread_is_idle; ops->cpus_are_resettable =3D kvm_cpus_are_resettable; ops->synchronize_post_reset =3D kvm_cpu_synchronize_post_reset; diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index c34d9f15c7e..36634ec8929 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -39,7 +39,7 @@ static void kvm_set_guest_phys_bits(CPUState *cs) } } =20 -static bool kvm_cpu_realizefn(CPUState *cs, Error **errp) +bool kvm_arch_cpu_realize(CPUState *cs, Error **errp) { X86CPU *cpu =3D X86_CPU(cs); X86CPUClass *xcc =3D X86_CPU_GET_CLASS(cpu); @@ -237,7 +237,6 @@ static void kvm_cpu_accel_class_init(ObjectClass *oc, c= onst void *data) { AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); =20 - acc->cpu_target_realize =3D kvm_cpu_realizefn; acc->cpu_instance_init =3D kvm_cpu_instance_init; } static const TypeInfo kvm_cpu_accel_type_info =3D { diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index b94c2997a07..013f5e852e1 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -49,7 +49,6 @@ #include "elf.h" #include "system/kvm_int.h" #include "system/kvm.h" -#include "accel/accel-cpu-target.h" =20 #include CONFIG_DEVICES =20 @@ -2353,7 +2352,7 @@ static void alter_insns(uint64_t *word, uint64_t flag= s, bool on) } } =20 -static bool kvmppc_cpu_realize(CPUState *cs, Error **errp) +bool kvm_arch_cpu_realize(CPUState *cs, Error **errp) { int ret; const char *vcpu_str =3D (cs->parent_obj.hotplugged =3D=3D true) ? @@ -2995,23 +2994,3 @@ void kvmppc_set_reg_tb_offset(PowerPCCPU *cpu, int64= _t tb_offset) void kvm_arch_accel_class_init(ObjectClass *oc) { } - -static void kvm_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_target_realize =3D kvmppc_cpu_realize; -} - -static const TypeInfo kvm_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("kvm"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D kvm_cpu_accel_class_init, - .abstract =3D true, -}; -static void kvm_cpu_accel_register_types(void) -{ - type_register_static(&kvm_cpu_accel_type_info); -} -type_init(kvm_cpu_accel_register_types); diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 17ba38403a3..7c4440d0025 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -1990,14 +1990,7 @@ static void kvm_cpu_instance_init(CPUState *cs) kvm_riscv_add_cpu_user_properties(obj); } =20 -/* - * We'll get here via the following path: - * - * riscv_cpu_realize() - * -> cpu_exec_realizefn() - * -> kvm_cpu_realize() (via accel_cpu_common_realize()) - */ -static bool kvm_cpu_realize(CPUState *cs, Error **errp) +bool kvm_arch_cpu_realize(CPUState *cs, Error **errp) { RISCVCPU *cpu =3D RISCV_CPU(cs); int ret; @@ -2120,7 +2113,6 @@ static void kvm_cpu_accel_class_init(ObjectClass *oc,= const void *data) AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); =20 acc->cpu_instance_init =3D kvm_cpu_instance_init; - acc->cpu_target_realize =3D kvm_cpu_realize; } =20 static const TypeInfo kvm_cpu_accel_type_info =3D { --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065028; cv=none; d=zohomail.com; s=zohoarc; b=mmuzGg4x0L4cGJ8mYr5apE7Qky3BRz9q/Afso3novz70/dbjBBfbSwxg15UIteZZ6LhKDM3fzjNpGjyXjn2HG2pZmGVssTTe1TegxALLOcVgk/y1Hlu0cDy4bD4kmyiyLMXmiDdX+I4wgoJdBUIDm5teeBSvSddC8vw94v/afqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065028; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Bh2neLmp2yCN+no5zdf9s1S1CTB1NaAAPjqIYQpJDXU=; b=lLlPiETZXzOAaO/xjJc/m4Z9KTmE84ejbuVUKsNsmgfuu2pRcu4XV7wQYmdHB9U1D0t7SlYMIbe+l6Q0whq8o2Cq0mrXxUpsuNyFZF4Xs5sfohYZPge4RZfUWL7B6cgYGbu7wHNUjx5WMh8nTRMLJ18liLkF/2d8AqMJzBj2ApY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17800650288301023.961715222563; Fri, 29 May 2026 07:30:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9U-00044d-E4; Fri, 29 May 2026 10:25:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9S-0003zq-NO for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:30 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9Q-0002fM-1a for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:30 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4903f7a90d1so68770035e9.2 for ; Fri, 29 May 2026 07:25:27 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d7002e8sm55832855e9.15.2026.05.29.07.25.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064726; x=1780669526; 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=Bh2neLmp2yCN+no5zdf9s1S1CTB1NaAAPjqIYQpJDXU=; b=jv05KxeGCGgxY/643LjsMcSgKTuJqq9BooyT09yfEKcyXQtJkriDseh4jOuqiEoilb KKgyXW/pUQ7lga3/+eBYVTV/uSqvmlYsO+YkxCiHuH0TJwK0njCg1j000Kg9YhUWDnIW UFs4s2InFPp6b+blXW2R+uXRJg71JPe133b1EFC0fUqCPUdjI1JO+ga7TndF06X07Ug4 KKvEdiWu/7ZRpfWyhoVLU1jXhBkSAl5tsU2g/zkaZ9i3/xfhQ7aq4KWCTbiIp2U8iKU4 gQSwrDTSk2Lik1mkh2qa8IYbciNqUdlyo29oBvqTF4rN6x5chqoVCowIn7TOApZdbKnu RrYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064726; x=1780669526; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Bh2neLmp2yCN+no5zdf9s1S1CTB1NaAAPjqIYQpJDXU=; b=pDfBT4C9u+43em8YaS0LTQmNPaoQNpvdnzkYv6ID7D/oNbIIQFT4+5Q6VIzqDFLrcR rIYNXadItyQ2RLrUiu4/pkFz6qvzy4XcvGryp92QESiGkB59l4o5CifA/rcKrcH89luv Hkwgdy1QpDWblgmXaaU0Dpj6cX56kJgYSKxhR1q8NGrI6CKN1tH2LH7abTZvMClK9lXm tevnyV1vg+YkPc8fUMzVM3kdN0aqJ4RksQZRYMKYpgp8G+K+X75jLUTaKO1vdx74nm5k 8PpAEsN114otbkTbnKWXXloV6ay2bCUotSQCGh4lyOeTFuGUeiMiGHS7ni1g4Uju1bPq Hfdw== X-Gm-Message-State: AOJu0YwpJPT3ODrCquWVjGXTHwE4Cj6F/vo+9fz03abQ03hPK1V3ultG oofkg8KLDQMWu8BolZbMPo7yx/sOjMBv5Q/kEOnxhXvq0SqmNTC4lqM7XjK1VKEIhwtu+Z+IYcw z2nGcINSBFA== X-Gm-Gg: Acq92OH/SgA+7pCR7iUzGasbFyTGsTKm7tMmaYZoR2fQKfka/SFJ+VZHco6gLambgr1 Jmgp2ywT6z5llxeSPJ+HyEYEghIfKust4we7IBHmc3mqY4vXHlcTLCnuZCG+AlOF8elBAe6IJ2l pdthimmf5bgKzG3RLf2KrPSW86SAImNbO1wpFCJab6YK2R06vhjrY4idN5CH2h1EPEeP8zOC09W ZxK/7Ga1xReWTZgtQjwjbrSznOTvXWSBzBNKYVDmyiJ+xx0fdobA9YSCwh8UbfMcZRYsJYLsIXD cgPJOJLsjBSGFUpRd7ByE2YnQxYstPBQbXmwmqb04BgD1g8ItF8B+1kUqdRW1F5Nlj7Q3a3U4Ez 5VpAP5z4H5giRvvynWOjL0Ma8AzbH3/+YdpQ0YiJXcZeu6o4jk8kCR6EQ49+rE10v9f4o15+bh8 vrOQW06wy3NmRbCAcmjm9mesSqnRDMUn3mbrscK4RyQrCoTlIIlSgkucgGXbcdxvufIiQ4Sdq62 Ds3 X-Received: by 2002:a05:600c:c04b:20b0:490:3cb4:f1b3 with SMTP id 5b1f17b1804b1-4909c0ba682mr43032785e9.16.1780064726422; Fri, 29 May 2026 07:25:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 06/17] accel: Introduce AccelOpsClass::cpu_instance_init handler Date: Fri, 29 May 2026 16:24:22 +0200 Message-ID: <20260529142434.87880-7-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065031946154100 accel_cpu_instance_init() currently dispatch via target specific AccelCPUClass which we want to remove. Introduce a similar hook in the generic AccelOpsClass structure. We will convert implementations from one struct to the other, so add an assertion to be sure only one implementation at a time. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu-ops.h | 1 + accel/accel-common.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/accel/accel-cpu-ops.h b/include/accel/accel-cpu-ops.h index fd1307dad6d..9810cc27cd2 100644 --- a/include/accel/accel-cpu-ops.h +++ b/include/accel/accel-cpu-ops.h @@ -34,6 +34,7 @@ struct AccelOpsClass { /* initialization function called when accel is chosen */ void (*ops_init)(AccelClass *ac); =20 + void (*cpu_instance_init)(CPUState *cpu); bool (*cpu_realize)(CPUState *cpu, Error **errp); bool (*cpus_are_resettable)(void); void (*cpu_reset_hold)(CPUState *cpu); diff --git a/accel/accel-common.c b/accel/accel-common.c index 176b03e0e90..b3bcd53a4c6 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -39,7 +39,15 @@ void accel_init_interfaces(AccelClass *ac) =20 void accel_cpu_instance_init(CPUState *cpu) { - if (cpu->cc->accel_cpu && cpu->cc->accel_cpu->cpu_instance_init) { + AccelState *accel =3D current_accel(); + AccelClass *acc =3D ACCEL_GET_CLASS(accel); + + if (acc->ops && acc->ops->cpu_instance_init) { + if (cpu->cc->accel_cpu) { + assert(!cpu->cc->accel_cpu->cpu_instance_init); + } + acc->ops->cpu_instance_init(cpu); + } else if (cpu->cc->accel_cpu && cpu->cc->accel_cpu->cpu_instance_init= ) { cpu->cc->accel_cpu->cpu_instance_init(cpu); } } --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064758; cv=none; d=zohomail.com; s=zohoarc; b=ZHmzr8etjje/bzwnEn1yJsajRsG+G49v1brE9Wh6S1KY/2IvIhnx/QdUJ3biGh70qcZ/wUrY3mcHRncrar5Xwv2ctmMjWwqKeXNLUscVpmecmt/ldrhx38W/e1eQUraN3q+ZO4sNdXdbka3jckhFSXGtLugzw+sgsEZMpfT64Bw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064758; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j1nU19JBZL4OEtH8maExRk6vLACT0H2OM9tp9sLLgYM=; b=iu4su95EAVuQHeiqDu5ujnHffpdmcGlLInRMw9An1DFZ2Yqpzf1FHDAn8thxVyFB1IAxvMAFwhQR4dN7cxGTiT8LykMoBJup4bWSNxK2DEvDosSS+wKa1Tz6QREwRbkbkxsJFcexigf6/kNRNYMpSoM9Soi1wMoThik66hrQnNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064758661416.07167085971923; Fri, 29 May 2026 07:25:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9d-0004Qe-A1; Fri, 29 May 2026 10:25:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9b-0004L1-3i for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:39 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9Y-0002hC-Ch for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:38 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-45eea3448f2so1057454f8f.2 for ; Fri, 29 May 2026 07:25:35 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef35598e5sm3749122f8f.27.2026.05.29.07.25.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064735; x=1780669535; 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=j1nU19JBZL4OEtH8maExRk6vLACT0H2OM9tp9sLLgYM=; b=B912dtTTDSzEwruU+HiD1ZXNXIYb/5S4YPvicSdnplaXWudfuBoddPTniPI5FFKyxj horzNNd7ip/z7bALfZ4RAr9khJ+TIM+lcOoezk2SQS9iqISPxbtTW1CuxXZBau3TV/iv KVcpQCqQ43tnvIUCQ9WZNtlN0o9cYczk4ucZEo1aOiZU180Qln4xPfngJKttCp4BIzbc ikSwuMtN2InBOGO6jFp3UXJ6eaTha1UnpgvzeipD7BwM1F5HSIAg0cqqNg7sNZdqiJwA fU6hdILtAHd7yr/pVguZXr0U0kXClrXEmvmYIZ1QuHjZL/UVmuUswPiKpwolW+3KxZwB mdJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064735; x=1780669535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=j1nU19JBZL4OEtH8maExRk6vLACT0H2OM9tp9sLLgYM=; b=Xrv4nY8WiQ10cqxUSyqcHtaEWucLE0H7O4zZA5SrjA7OzYr9YPn6GAd6PURiQ7pKj0 m8DtjCDREYY/SiqzBPf5YW/0VhB3z1grizHLziz2BRLnae0P9ElZZVpfhrvtvP1Bv/5S DZzO0ug5BBYYkknUnY2FVg6k0HvDPrULi8BX9QwqW9tBv+31iDXMrs7crNAALWsrRSsS kZozpqG7XmL/QCjh4ANwZUv9R858UZKxMvYDAejkWO5+7W/Ma2PkSROFuzfNuo9Bkay1 0ZJP2Ss6Vy8U1Eh+wlP1OWFG8xe6olLzHmyY+sX80QDx6ekWAAP8/dgsduCs/5Du/Hci rSWQ== X-Gm-Message-State: AOJu0YzZ2iHeuqFIFsE39NwrlnLWlZpEJ1pbC3nqnD0C6VvXct85htcI /sGtE5hQlYQMc5/zWxXfO8GnCWYkUiDUV/jKD1GIMmYM4mh56DhtAC87cX1Ma5Nk/yA9XTLp/ey OHxlCla2p4A== X-Gm-Gg: Acq92OGUaoHLe7sLav5ovHOuz6NzSOsLo6BFI2BViVw56ipCH79Bl/EgQufFbbN6xv8 Hvut0/sY6My22eSIdAgtw6f6X+hF601xwPn6noLfdn/LPIKtv0LQ5tO/tWePJxBo3jKAj1apNyZ 4uwz00MRjgZGVo6yi4M4fRdaJVzZk3lGKZ++M1GydrGkl1yY/o9SKfIKUEUxv9Hwvt7YwXBOLE6 7w6uB2VJfGfDSd4sqZ3/H5rHLMRhBEwRy1/CZLvV4RJq4YVkKfDNtnvVyS5Lm7AB5cCqt7u9jjB oR0YToEEXupTH8M71vU0E/6MCv4PQBv2FZPp2Hvjagg6dZGj741HeC2VgarjswHJK81O2+QGUzR mSdliot82jmpFpUXFy0l2VN9+Bhxd8LTAvlL+XgcaBnqWw/9cgIk0sm3Bqbd27TeQDYoAZQMHgS 0Iu92dESSCSEcW230/i/8lkQ2VnEeWT9qYj4ChHmOkxyN6ZRsi78aXJt/9oOZiv3U/Zg== X-Received: by 2002:a05:6000:b12:b0:45e:9421:4ca8 with SMTP id ffacd0b85a97d-45ef6b5f4b8mr51023f8f.28.1780064734740; Fri, 29 May 2026 07:25:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 07/17] accel/whpx: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 16:24:23 +0200 Message-ID: <20260529142434.87880-8-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064762292154100 Register the new AccelOpsClass::cpu_instance_init hook. ACCEL_CPU_NAME("whpx") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- accel/whpx/whpx-accel-ops.c | 2 ++ accel/whpx/whpx-common.c | 17 ----------------- target/arm/whpx/whpx-all.c | 1 - target/i386/whpx/whpx-all.c | 1 - 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/accel/whpx/whpx-accel-ops.c b/accel/whpx/whpx-accel-ops.c index b8f41544cbe..099e8ef6da3 100644 --- a/accel/whpx/whpx-accel-ops.c +++ b/accel/whpx/whpx-accel-ops.c @@ -98,6 +98,8 @@ static void whpx_accel_ops_class_init(ObjectClass *oc, co= nst void *data) ops->handle_interrupt =3D generic_handle_interrupt; ops->supports_guest_debug =3D whpx_supports_guest_debug; =20 + ops->cpu_instance_init =3D whpx_cpu_instance_init; + ops->synchronize_post_reset =3D whpx_cpu_synchronize_post_reset; ops->synchronize_post_init =3D whpx_cpu_synchronize_post_init; ops->synchronize_state =3D whpx_cpu_synchronize_state; diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c index 247e12db812..25c5d84fd30 100644 --- a/accel/whpx/whpx-common.c +++ b/accel/whpx/whpx-common.c @@ -24,7 +24,6 @@ #include "qapi/qapi-types-common.h" #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" -#include "accel/accel-cpu-target.h" #include =20 #include "system/whpx-internal.h" @@ -505,21 +504,6 @@ static void whpx_set_hyperv(Object *obj, Visitor *v, } } =20 -static void whpx_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init =3D whpx_cpu_instance_init; -} - -static const TypeInfo whpx_cpu_accel_type =3D { - .name =3D ACCEL_CPU_NAME("whpx"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D whpx_cpu_accel_class_init, - .abstract =3D true, -}; - static void whpx_accel_class_init(ObjectClass *oc, const void *data) { AccelClass *ac =3D ACCEL_CLASS(oc); @@ -569,7 +553,6 @@ static const TypeInfo whpx_accel_type =3D { static void whpx_type_init(void) { type_register_static(&whpx_accel_type); - type_register_static(&whpx_cpu_accel_type); } =20 bool init_whp_dispatch(void) diff --git a/target/arm/whpx/whpx-all.c b/target/arm/whpx/whpx-all.c index 3079c6293c8..16040f102a3 100644 --- a/target/arm/whpx/whpx-all.c +++ b/target/arm/whpx/whpx-all.c @@ -23,7 +23,6 @@ #include "qapi/qapi-types-common.h" #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" -#include "accel/accel-cpu-target.h" #include =20 #include "syndrome.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index e626acef2f0..1b68f13a7dd 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -33,7 +33,6 @@ #include "qapi/qapi-visit-common.h" #include "migration/blocker.h" #include "host-cpu.h" -#include "accel/accel-cpu-target.h" #include =20 #include "system/whpx-internal.h" --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064809; cv=none; d=zohomail.com; s=zohoarc; b=KL9tZMt6VmQL4rbDosI8ucV3vLXnhiRsgmmlAcbp6yGb2XKZdERu/SfiOpoEXyZ/ZUAoaab3JNtFw0zCrZzye9pnhC1HM3wfl6NcpWC4nmAO8MV8AX9oayTqKoQSPTJkF2Ikrg6OYTZQrVtZuoOMhbu/U7tnIjOHEYLVwUs2rnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064809; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LKn4RQHGDomnnmi9l8u/n3j933cMw6QUVCqU0AdCGPc=; b=LceW7HDI5uV2nNQ9Nr0Ri0G8hShPi2opTfwOM+S3oGEXFSgoYQY8Pea2Ssz4I2ascpgo0rGjqYFVGFEoKlMZqB4CIWXvZMWxvfMWQVQuKnfD/9Hce5w68qn6VJMrswt8er/bFN0mZCr2BWvIjtxpr0zDtmVebnBLz1yX334Qepg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064809784610.7450562042436; Fri, 29 May 2026 07:26:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9m-0004vi-MR; Fri, 29 May 2026 10:25:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9j-0004ky-P7 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:47 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9g-0002jH-Mb for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:47 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4891c00e7aeso94982715e9.2 for ; Fri, 29 May 2026 07:25:43 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d68b853sm45850685e9.3.2026.05.29.07.25.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064743; x=1780669543; 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=LKn4RQHGDomnnmi9l8u/n3j933cMw6QUVCqU0AdCGPc=; b=kvgiZ2yMpsdKJOE9DaorRHiYolCntKp8AD9rhqChb4whCmkokkvn88KoP+NIiUyQia w2MG5XAgzgZa9mEjJ2GPETuRLJ3mCTHJKEQw8SAgbcO5ejYoJqCb9mQux/SaDvWZnmJk NUhpNxKmYKno0dB8+S5HXpZRp32NmfuHVRJtSBTXPPEDbZVK3Wd8JLrQexTxzUobyGKs THvs6jHRCumjq0TyvjSV/zWBGdvOOKF+KEiYKi1r6wtUejz20Q7MCqJsHf9NaHNEQ320 vLfLchnnXz2o+eOLc1NCxgwfgZaN7xFATPM057rA9BywiXo1yY+1MVbUAYIYlz6S19KP cUtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064743; x=1780669543; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LKn4RQHGDomnnmi9l8u/n3j933cMw6QUVCqU0AdCGPc=; b=koEQfj7NmLsWtvPo2zDMisCPisP5q4A5gGL8mfdKQQ6l023RSuFBh/Xm8PKXdzF7Dl x13TYXg6fdlCujWMZ7u+QGv6rws6yWLLILyd5sh8DdfUrGbLwdNlYR7lYzw38kJJTr+s qAcTBfP1nkwFrS6/O5NCKzIJZW3o8UIG1KPirG3ZSLmeyQvISZPHOd+nxFiWSijEjLKh ZMxPJSL76X+sx1LO22NDTFBIHlRAzr2sbjiQ2ocn3UyNVQMG4YxFHXiboKRyLkevVpqG E+9Gi0/t9z6ds6wBitjSer42UEZigvs3FVnpry1Sk1uSO1Y59DONXHNHwU1+C+BMFVkj l7Aw== X-Gm-Message-State: AOJu0YwTVUiLGgtRmd1K6DhuTqDunmxx9cpioz2tMmNFI2D60U1Jt35Z EJyqb6eB0zQ8N6qe20qqvepUd4JOPYg4zoseFaBtPDfNV/C1c4DVuX25YEN1yJpXYuXmk5bIcUE 1/WSqYYAE1w== X-Gm-Gg: Acq92OHRMPVOH2unSranJU+FVD3IR5fjG9phi8nju3bgT0yymuojG9qUIySsN9M62kn xCydjnDDpSvbiswF05pOIuitt1a33aTh9u1kU9NtgcNKMgphb5R2h2j7qGAkLr0Gtzvos5lCuP2 uDkW7hwqvKcqZux35e9p5QKbMNFiShQslRrJkK96VDwR0ZhT7Ia71NVhk3wPukxYLvG2mjAHGkV GpQAYSfQRsXZwf6qrMmXtTcPntM1j6TlSnLEM5iT22c0UpAySggdWxV8ozrgPemkM4OSTsXcF94 0HUiK7YDRj7n2wsuNbJYUesKLVUytnHadCSTO3VnrsP4mrvc5+mtkyE3GtV7kYzg5ifk7WcvEpv TDYJcPGD/Q0/mCyjI4SUxp8tDOlNh7X506ueRyVKR3kDbDTblY6X0TwJmNNc3nUrODkDegrb8cc pYEliDs5fDjwK57bPI5q7avpyGgAEABcXQJMrwtk01SsRjpyopqhLmpUd1BQlNzyYYcQ== X-Received: by 2002:a05:600c:897:b0:48e:6f39:f7be with SMTP id 5b1f17b1804b1-4909c07f9e7mr33215785e9.10.1780064742579; Fri, 29 May 2026 07:25:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 08/17] accel/nvmm: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 16:24:24 +0200 Message-ID: <20260529142434.87880-9-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064811602158500 Register the new AccelOpsClass::cpu_instance_init hook. ACCEL_CPU_NAME("nvmm") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/i386/nvmm/nvmm-accel-ops.h | 2 ++ target/i386/nvmm/nvmm-accel-ops.c | 2 ++ target/i386/nvmm/nvmm-all.c | 19 +------------------ 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/target/i386/nvmm/nvmm-accel-ops.h b/target/i386/nvmm/nvmm-acce= l-ops.h index 931bb5ca243..f2a78c12110 100644 --- a/target/i386/nvmm/nvmm-accel-ops.h +++ b/target/i386/nvmm/nvmm-accel-ops.h @@ -16,6 +16,8 @@ int nvmm_init_vcpu(CPUState *cpu); int nvmm_vcpu_exec(CPUState *cpu); void nvmm_destroy_vcpu(CPUState *cpu); =20 +void nvmm_arch_cpu_instance_init(CPUState *cpu); + void nvmm_cpu_synchronize_state(CPUState *cpu); void nvmm_cpu_synchronize_post_reset(CPUState *cpu); void nvmm_cpu_synchronize_post_init(CPUState *cpu); diff --git a/target/i386/nvmm/nvmm-accel-ops.c b/target/i386/nvmm/nvmm-acce= l-ops.c index dd5d5428b1c..60044b83527 100644 --- a/target/i386/nvmm/nvmm-accel-ops.c +++ b/target/i386/nvmm/nvmm-accel-ops.c @@ -87,6 +87,8 @@ static void nvmm_accel_ops_class_init(ObjectClass *oc, co= nst void *data) ops->kick_vcpu_thread =3D nvmm_kick_vcpu_thread; ops->handle_interrupt =3D generic_handle_interrupt; =20 + ops->cpu_instance_init =3D nvmm_arch_cpu_instance_init; + ops->synchronize_post_reset =3D nvmm_cpu_synchronize_post_reset; ops->synchronize_post_init =3D nvmm_cpu_synchronize_post_init; ops->synchronize_state =3D nvmm_cpu_synchronize_state; diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 8a1af35ed32..10ab7b2a4dc 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -22,7 +22,6 @@ #include "qemu/error-report.h" #include "qapi/error.h" #include "qemu/queue.h" -#include "accel/accel-cpu-target.h" #include "host-cpu.h" #include "migration/blocker.h" #include "strings.h" @@ -1212,33 +1211,17 @@ static const TypeInfo nvmm_accel_type =3D { .class_init =3D nvmm_accel_class_init, }; =20 -static void nvmm_cpu_instance_init(CPUState *cs) +void nvmm_arch_cpu_instance_init(CPUState *cpu) { X86CPU *cpu =3D X86_CPU(cs); =20 host_cpu_instance_init(cpu); } =20 -static void nvmm_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init =3D nvmm_cpu_instance_init; -} - -static const TypeInfo nvmm_cpu_accel_type =3D { - .name =3D ACCEL_CPU_NAME("nvmm"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D nvmm_cpu_accel_class_init, - .abstract =3D true, -}; - static void nvmm_type_init(void) { type_register_static(&nvmm_accel_type); - type_register_static(&nvmm_cpu_accel_type); } =20 type_init(nvmm_type_init); --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064939; cv=none; d=zohomail.com; s=zohoarc; b=iK4pFuAakk7Hk7cxjln0wzfbcDB4O6RC5iFI+czByvHJYdXZqrTjHnviFOXvMeCh3vJJMwD/gXvAayAMJwduC7LLdfZoILdABDjeZcz1BmR7SbSCy+wh+jmxPLYXK8GEq0YFCi9XV3clr15A2WWfgZUOui+zcx4oyy0PAP9GY9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064939; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NWzkQMOFrGlqEcHz0n7zXBP32rozO6O28cZDds3tjf0=; b=KWNr3ZhGKxjOgWTL3ZTxyEkfwO2hvKcEwo2aRXVu2BVlWH32swF41h+4zoW0djBmUiDsZmRaDdF1kI5735Lg4l730xuREMjqM4uuB6hoaKHQZBCZIodusQceu7BkWMUiAq7CXDmX4dmBcKXixx2chfnIUbpDl9i5l+1nwLLuzjM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064939455114.89971382631109; Fri, 29 May 2026 07:28:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSy9s-0005F0-Hg; Fri, 29 May 2026 10:25:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9q-00057i-A8 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:54 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450: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 1wSy9o-0002oo-Bv for qemu-devel@nongnu.org; Fri, 29 May 2026 10:25:54 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-49042aeeb75so94565585e9.1 for ; Fri, 29 May 2026 07:25:51 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909c10376asm15283585e9.23.2026.05.29.07.25.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064751; x=1780669551; 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=NWzkQMOFrGlqEcHz0n7zXBP32rozO6O28cZDds3tjf0=; b=WD3Yg+0GOZ3NPlCGXuTGQ7dyXjoa8tmV1MptmWOSKZUEqcZaCDGIzR4QGfe4emUpyG RCTZkiaSYUTgPdhQTu3kwm063RLFvNEOhB15TtsB6I+h87btv9CvT53DWtG0JGog5CS1 W2YSsrH5L/Iy6fCzMN29OME6yMJ8lNXFDicVs4ysPI/QbTPWQqjRAlcVIWU4oIWxglKm 7lMsWcNxqLF2ZF6Wbx5jKtJCARps705RU/+XJXl+7jUsgqRfZGBjyNJt4Iqkttnv529Y r79wgNFwu5TDQsCEdMqF37yAPty4v4wYf+34eDCrlBUeK9t+DquUyvmHp0RnIUfXbWev HO5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064751; x=1780669551; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NWzkQMOFrGlqEcHz0n7zXBP32rozO6O28cZDds3tjf0=; b=RIMCcp5gKeTXgql639MrLOy29RYjlE5h/oKy7CmNYYgjqIe7ZMuIuFQev3VnUWHsbR H/qb16yZirNYZZntGk17RL+gc6on8UUB8R3FQv+ZHFmf9ATukkq63H+Ql2MqqkQrtzMH DGrdbb/6773l2H/o8tuNIRIrroKK3AuE3ib96FZ5Dla9t8t3gOL6V+Kuf/ehACoHND/s SbHP/5J9fXTHbwHLrbjwKj0ABGrNm+iAVLFiTAKNdtSQKCgA8U2j1XuCxN4oDqMVPjnL TLI6B22rWoenCQwEnn/EDImgCvFWYu19cuXJnEj+4CsxMHr/05iGhprzrT2KUYuu1cHB 1yGA== X-Gm-Message-State: AOJu0YyT+QTKFgw7Ymx6UIgPgFAAmuMEtNiiZOtiZmz5Mh4+1O6fupZp fwCPsS8NMyGEZz0DFQux/C2m8KD1+ClL1z6DpjSNZme/ibzBz4OFvoXUStkZNr4nP3fa2tvw1N5 hKsEDmpkGJw== X-Gm-Gg: Acq92OHCOKmR+HodWC8szoZbYGcqHtkgIbkK79aooJE/uawMNeyh/2OkPUm5uAHhOgn 6gSDp8JwRSmdaE8F7gQJvNVkXm4nyfTLeQrYGUideiM2+PnA3IfDtzV1Df+m4OIe1AEqx2ZMkRY qViEIpHTRA7h46RB8O5oPbwr4c85FRB/mZKmApdqH7xnBPqGXg+YGE/fuP3GsU6GMDZ/xIso6t4 qaw9CrmdQAQZvPhuO8oiTQ0lFToD5joUywTaYfQN9+VMREOUS4Au19Cy68k5E5AuhgtJDxjaW+w K6Xe4HSBCFK7u0KgZT9UqQKoPq3Xdly30H0h/78APam5AasJ0kciCJ+z8nt/Qi9da3ha6ZZyCLj we7ULoaxJzNoxwKWhgzZoPzc5IhW7zW0kosaLhVZXbEgyQhSlIcL2l4NZbl7s4LfXmUDPT6/gi1 wuTyNuWBtdwpXsgsuunf/5BYSu91vWhPNGkDjBrcESrqEEtGKsgIRtkluhRCte7MuA1A== X-Received: by 2002:a05:600c:6d8:b0:48a:7a10:4f17 with SMTP id 5b1f17b1804b1-4909c092cecmr33812615e9.6.1780064750811; Fri, 29 May 2026 07:25:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 09/17] accel/hvf: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 16:24:25 +0200 Message-ID: <20260529142434.87880-10-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-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=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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064940992154100 HVF cpu_instance_init() was only implemented for X86. Add a stub for ARM, allowing to register as generic AccelOpsClass::cpu_instance_init hook. X86's ACCEL_CPU_NAME("hvf") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/system/hvf_int.h | 1 + accel/hvf/hvf-accel-ops.c | 1 + target/arm/hvf/hvf.c | 4 ++++ target/i386/hvf/hvf-cpu.c | 25 +------------------------ 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index d5eaf26dda8..cb8abbc7cc9 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -109,6 +109,7 @@ int hvf_update_guest_debug(CPUState *cpu); */ bool hvf_arch_supports_guest_debug(void); =20 +void hvf_arch_cpu_instance_init(CPUState *cpu); bool hvf_arch_cpu_realize(CPUState *cpu, Error **errp); uint32_t hvf_arch_get_default_ipa_bit_size(void); uint32_t hvf_arch_get_max_ipa_bit_size(void); diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 6edc2242ed9..a9c9d5d9a81 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -356,6 +356,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, c= onst void *data) { AccelOpsClass *ops =3D ACCEL_OPS_CLASS(oc); =20 + ops->cpu_instance_init =3D hvf_arch_cpu_instance_init; ops->cpu_realize =3D hvf_arch_cpu_realize; =20 ops->create_vcpu_thread =3D hvf_start_vcpu_thread; diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index d88cbe7c82a..b825a1ae6d4 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1504,6 +1504,10 @@ int hvf_arch_init_vcpu(CPUState *cpu) return 0; } =20 +void hvf_arch_cpu_instance_init(CPUState *cpu) +{ +} + bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) { ARMCPU *cpu =3D ARM_CPU(cs); diff --git a/target/i386/hvf/hvf-cpu.c b/target/i386/hvf/hvf-cpu.c index 35f6bddbc0e..5d74ca6fd56 100644 --- a/target/i386/hvf/hvf-cpu.c +++ b/target/i386/hvf/hvf-cpu.c @@ -14,7 +14,6 @@ #include "system/system.h" #include "hw/core/boards.h" #include "system/hvf.h" -#include "accel/accel-cpu-target.h" #include "hvf-i386.h" =20 static void hvf_cpu_max_instance_init(X86CPU *cpu) @@ -56,7 +55,7 @@ static void hvf_cpu_xsave_init(void) } } =20 -static void hvf_cpu_instance_init(CPUState *cs) +void hvf_arch_cpu_instance_init(CPUState *cpu) { X86CPU *cpu =3D X86_CPU(cs); X86CPUClass *xcc =3D X86_CPU_GET_CLASS(cpu); @@ -77,25 +76,3 @@ bool hvf_arch_cpu_realize(CPUState *cs, Error **errp) { return host_cpu_realizefn(cs, errp); } - -static void hvf_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init =3D hvf_cpu_instance_init; -} - -static const TypeInfo hvf_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("hvf"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D hvf_cpu_accel_class_init, - .abstract =3D true, -}; - -static void hvf_cpu_accel_register_types(void) -{ - type_register_static(&hvf_cpu_accel_type_info); -} - -type_init(hvf_cpu_accel_register_types); --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064902; cv=none; d=zohomail.com; s=zohoarc; b=WKNjYYMxXoB+UpNOT2YP9MeHd98yLY8a6KNO75xR+LGyQfIMGnMm44KfjsVWK8M1kr6sBDrGw0b8kESwi2hHPeqQzfJ/MZdxIovjB9wXNqqYvpNLr0AaIT1Z499dP8j/HQt92y8ELJ3r4+P4UAQzBNHH40Y4VgKlom7sy+zNfj4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064902; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=P59p3YW/AQDnYqwHW3EKNEj9nqZIetNGrubj5RXjTq8=; b=EsgNH4L/0IHuDDPgrA+kEGDZJWSwYjmJjS+5Qk3hEl47+cJk0ejdPH061uUQPduYOVai5gjJekUaVPur0Szf6AhYdxNt0eorvD3/ydPeoyzrQNgkTFTtB8FOXhUVBeFcIX/8lCc3jP2K56VtQVmlE21eKhWHkjWUco0PvC/kqto= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064902108610.356355018873; Fri, 29 May 2026 07:28:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyA1-0005WP-U9; Fri, 29 May 2026 10:26:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSy9z-0005SZ-KU for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:03 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSy9w-0002tz-Ed for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:03 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4909def6a21so3515485e9.3 for ; Fri, 29 May 2026 07:25:59 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d6eb4acsm42435095e9.9.2026.05.29.07.25.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064759; x=1780669559; 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=P59p3YW/AQDnYqwHW3EKNEj9nqZIetNGrubj5RXjTq8=; b=BgduVFOCpdgQLyUluQhyJkPN9VYbJOwwB/G37mUZIF/Q5RzdyUg6VV0d9j/iSrtCp3 FNxDaGdG5zD9i1sC+qktE8Dy/7VuiBn3CJTJrv5CWSv0ltAnMYUawWnU5Vyu3oPDDRMT L3WCmv/AX1ON26hrwqIjNviAGMwTlTF+fTQLK51NXSFrrwMQkSYC/dm+/enBOZ8M7AEa u31nLaVaRSmxn7wpje32etUclq48rKkIlyk/RlocgSFMknwbnIHSdf8mgFsQymymsQP8 raBSHNOnsdT0LgloXZqQ3YK7zD1ND2TpfwXPZ67044+VvqgyE3fLdxMu0+IHSDz21F9l CjOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064759; x=1780669559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=P59p3YW/AQDnYqwHW3EKNEj9nqZIetNGrubj5RXjTq8=; b=XBWSIq8G8RRf/knbwwhL9MdN8TAShS9Dq5WjA+t3lT9mnCQehpHWPcLD8kSktl30aB DroEUynTWrEPZdtnPkVjFvba8kI+eMvYTXHBB6K8YcjgKhqYde2SeI4ppT3EMvdgZKc7 IfABUE2SZmjQHSfA3H/bs6gOpq3wWO+Ywp7LOSreaoqVeKjGT5wTA7x/XbaymXcIujuN mTH6bn/c9FdMkEkZOgKPuI7xUsvwyuo3d6btIlcY9dH+qguDD3g6ZwOdGiXtedghaGFT KvUcOLe6NkAtpCGhXQSFd5QDtqB6dgQDRYgaVWw3pWWWB6HbfqhoXccalvTXVrtiM4be 7VHg== X-Gm-Message-State: AOJu0YxAh9nUCLjZfibjudsuXWYrayplRsMJCddsBHvyC+p5L9hwTBje q4n5a2n0Kn/ySZnb3DL/YEz6ygnKT0jo1VTWxi4gYZJyINv08AK0pQIdB/hsVPW8oA7A6SeMxBa U1MqHXhkyuA== X-Gm-Gg: Acq92OHPuj8scnbEGExqZjA7ce+V8XS53SX8jyfivFjueeeSmxYIfsV0CA4Q0UGLDKb s/PWUt/KRkF9ltvMl3xBueLXRb/71EaRhBIxMGAmDMiKin3oec2iLHrocemsnJBCIhFAR81J5P9 mTmMe1c1UTiIoAe3rksb8SOxYR+OLTwmLqSLYPSVTMwr5d/OcpQzc0UuCkBSlAWn1VbmHxXfXEE +RiMpTx0sa4Xq4sSflQQYRpT4CZPKOMh7NMsSlFHxFBhBwdjErnM0NbhQ/LZdNc6Rn9ONHCKs3A 9/BdCQjBBJwGpx6sb07Bs+/LdyCh5NPIVKP9PKdTwPEM9APsxBAdWL0i8qIcZBb0JS+sLSGJdY5 g8T4DU5iPLmyHfUf0dCCaGZxN+Sb0Qy9U8uZApvBtZU+kQl99cIzsg1Gf9FS0yOCxCyxPr0jBn8 fyAIV3sC2Cfi7XttjWhoQudSGf+/sO9VgTHOQ1YQ85g1y7rBQne01xlMcYk/eLIFuHCA== X-Received: by 2002:a05:600c:c0d2:10b0:48e:7854:1608 with SMTP id 5b1f17b1804b1-4909c0b34e3mr43174675e9.25.1780064758692; Fri, 29 May 2026 07:25:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 10/17] accel/kvm: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 16:24:26 +0200 Message-ID: <20260529142434.87880-11-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064904237154100 Expose kvm_arch_cpu_instance_init() and register it as generic AccelOpsClass::cpu_instance_init hook. Both X86 / RISCV's ACCEL_CPU_NAME("kvm") TypeInfo are now empty, remove them. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/system/kvm.h | 1 + accel/kvm/kvm-accel-ops.c | 1 + target/i386/kvm/kvm-cpu.c | 22 +--------------------- target/riscv/kvm/kvm-cpu.c | 23 +---------------------- 4 files changed, 4 insertions(+), 43 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index fd7175ea9f5..2c31fa6019e 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -364,6 +364,7 @@ int kvm_arch_pre_create_vcpu(CPUState *cpu, Error **err= p); int kvm_arch_init_vcpu(CPUState *cpu); int kvm_arch_destroy_vcpu(CPUState *cpu); =20 +void kvm_arch_cpu_instance_init(CPUState *cpu); bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp); =20 #ifdef TARGET_KVM_HAVE_RESET_PARKED_VCPU diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 4294c7a9514..113a23f2384 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -97,6 +97,7 @@ static void kvm_accel_ops_class_init(ObjectClass *oc, con= st void *data) AccelOpsClass *ops =3D ACCEL_OPS_CLASS(oc); =20 ops->create_vcpu_thread =3D kvm_start_vcpu_thread; + ops->cpu_instance_init =3D kvm_arch_cpu_instance_init; ops->cpu_target_realize =3D kvm_arch_cpu_realize; ops->cpu_thread_is_idle =3D kvm_vcpu_thread_is_idle; ops->cpus_are_resettable =3D kvm_cpus_are_resettable; diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 36634ec8929..6d93b50248c 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -16,7 +16,6 @@ #include "hw/i386/x86.h" =20 #include "kvm_i386.h" -#include "accel/accel-cpu-target.h" =20 static void kvm_set_guest_phys_bits(CPUState *cs) { @@ -207,7 +206,7 @@ static void x86_cpu_change_kvm_default(const char *prop= , const char *value) assert(pv->prop); } =20 -static void kvm_cpu_instance_init(CPUState *cs) +void kvm_arch_cpu_instance_init(CPUState *cs) { X86CPU *cpu =3D X86_CPU(cs); X86CPUClass *xcc =3D X86_CPU_GET_CLASS(cpu); @@ -232,22 +231,3 @@ static void kvm_cpu_instance_init(CPUState *cs) =20 kvm_cpu_xsave_init(); } - -static void kvm_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init =3D kvm_cpu_instance_init; -} -static const TypeInfo kvm_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("kvm"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D kvm_cpu_accel_class_init, - .abstract =3D true, -}; -static void kvm_cpu_accel_register_types(void) -{ - type_register_static(&kvm_cpu_accel_type_info); -} -type_init(kvm_cpu_accel_register_types); diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 7c4440d0025..b8e08d810a8 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -32,7 +32,6 @@ #include "system/kvm_int.h" #include "cpu.h" #include "trace.h" -#include "accel/accel-cpu-target.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" #include "system/address-spaces.h" @@ -1981,7 +1980,7 @@ void kvm_riscv_aia_create(MachineState *machine, uint= 64_t group_shift, kvm_msi_via_irqfd_allowed =3D true; } =20 -static void kvm_cpu_instance_init(CPUState *cs) +void kvm_arch_cpu_instance_init(CPUState *cs) { Object *obj =3D OBJECT(RISCV_CPU(cs)); =20 @@ -2108,26 +2107,6 @@ void riscv_kvm_cpu_finalize_features(RISCVCPU *cpu, = Error **errp) kvm_riscv_destroy_scratch_vcpu(&kvmcpu); } =20 -static void kvm_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_instance_init =3D kvm_cpu_instance_init; -} - -static const TypeInfo kvm_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("kvm"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D kvm_cpu_accel_class_init, - .abstract =3D true, -}; -static void kvm_cpu_accel_register_types(void) -{ - type_register_static(&kvm_cpu_accel_type_info); -} -type_init(kvm_cpu_accel_register_types); - static const TypeInfo riscv_kvm_cpu_type_infos[] =3D { { .name =3D TYPE_RISCV_CPU_HOST, --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064807; cv=none; d=zohomail.com; s=zohoarc; b=nmj/4IEoMBYoKWvtriHlCmQKOoXs91gfp5wpSWMZ+8UGVNRYidSmXgE9Dgd5LhMux+W4BXdQYjN0s5sXZ0j4+AsYErw3MeSw1c9Jdc0pDeeKZ2foutrXPr9D1VrCh7FwUR0CBHkabo3miixCQQ8qwgc0QoRbVXJsETwXNOIAETo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064807; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lLjO9ILLNjldGaO/XRaKWcElj66Y6w+X8KhGj9XwuEI=; b=ijhSgzabtgt40jlmS4e8Ut0qEXkWmAbGQJBZVwlGj5ErQd2cNokgeLxUCpE3QUiAdupqChJRVnrqEgaffigphmw45wJTXgDBk+yGWNRfoD2BDxxxv9+suK6LPBD+OknTMbR3HlUaKvFcg1N6kwdPFpITyTeeRGoey6wNKfyVt/8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064807004835.7343072045007; Fri, 29 May 2026 07:26:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAA-0005jw-9p; Fri, 29 May 2026 10:26:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyA7-0005cD-EB for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:11 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyA4-00031i-3X for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:11 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-44e1ebb3122so8459860f8f.2 for ; Fri, 29 May 2026 07:26:07 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef3587072sm4066115f8f.34.2026.05.29.07.26.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064767; x=1780669567; 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=lLjO9ILLNjldGaO/XRaKWcElj66Y6w+X8KhGj9XwuEI=; b=LdvTD9EUhEJClq2sa8qPAILPlweWo3aU5S8Vi7JVLNKxoe1BYEK8Vo554HWTlkE8ry 9B4qOrjtXvR8nUhzzZQ9J4NfFRVZkGl3u3TZLXr2uChrJypeP+w4FOWA8Ppu1SbmnKpL uiqtT+qXfi6CJXSBNhNudVGsVxzMaTGTh3RTBO+8uRJxOtE2nG2/KoK8yfuUxWDy6cGF PUBYwWB+DK9G9OYn+/7dt6cKJeAfdNTcNC5LiKBIAXJGrPUPjDiKXFO44k2liUg9jn+g V2CIaE79G5yt6UBKIx4RuGI1PnJjYo1IyhUX45t847aTIVoXIkjzlpNzauuUTe5KxwUs J9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064767; x=1780669567; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lLjO9ILLNjldGaO/XRaKWcElj66Y6w+X8KhGj9XwuEI=; b=sLTyFpEEjOvWnL3NCQMcCXtDL5Ap9FrJ6zgx+6b6Jf7NxCWwTl2KXH6SKXFA+qytEc XjZFACFPntFUzRE1Kqdp2CubipqcZVbH9+dBIDukeYGnQtVenydoSxHcNRxQFto5gWN7 7dlcoXRj5R78iHTUL9TBMdXz7sDj6d11O+2WhEswXOB2LPkRiuzbPw2WPQ71NyxQnJeh n6Av7QsSgKwnQI1RaPr/9NCGSoWJQXJpCdsTcy7MKVFjAY3HeJQaLBmgXUDEijMi4VTO ATzZYgq1InYV0ruxgofz18AUnstjHG9Ug0COvwRBAiNDA7XARPUYj7Sq+XWlV67FhmBm EZqA== X-Gm-Message-State: AOJu0YyJqwHWD8OVi6+VBQ5/AuNYOXhGG1qukE9SkuXALN+gB6y6Hor2 TuPkjVr0At7amNyXo/sUiX2yDDsv9j5lCHw3iB1vxlQ0wq+q/3clOm3zjyL+wHHKC4YPnQY3ofs nx0914liK3g== X-Gm-Gg: Acq92OHJ9bvnKRPP8ood+0NVSUawyUQ5ruZNTzbHEFNwUulNu8tg8Jh5vVlC/ipopc1 /adbDhdryiDDavV/+pVbVDDBdHKn7TSl4fpFb9cYl5nNR3JJdFTIMUnbTVXIwNqN4Ky49IcODrh BgCn7xYM4UA0ztJ/YTgtb+RXv9JTqZqpy2obEy03fqhXZIh+2mrBaiRJ2zTto47JU4HL+nrGRBK sgm+XObpGO/82yudzCQtQpguUYLojqQn7RZ3A8T1kBHLNQ664Uebu16EQVYC6gSij3+N22EzZq5 TGt+Rw2ZzhqCr/YkHS2NivD0trhUyUO01aGp2Tyq3S/D6OzaGOrCjmlyN6/VST+SQ+wV4rwiinm EbYt64jQ/uzqXzs6vPZjQHWV3LGcxod/N0vtGW352DNsh6R/DIcFyBhc2z1VRqqofe0FWlgc50Y NCXvHnDyv3lqkGpk1jUgial1SKMChIeHy4bTLs9A5bZNQRi2ZcVLLv2xan9lE1rBobSQ== X-Received: by 2002:adf:f2d1:0:b0:45e:f354:8603 with SMTP id ffacd0b85a97d-45ef6b6d51cmr4895f8f.22.1780064766603; Fri, 29 May 2026 07:26:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 11/17] accel/tcg: Convert AccelCPUClass -> new TCGCPUOps::cpu_instance_init Date: Fri, 29 May 2026 16:24:27 +0200 Message-ID: <20260529142434.87880-12-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064808370154100 Introduce a TCGCPUOps::cpu_instance_init hook and call it with tcg_cpu_instance_init(). Register tcg_cpu_instance_init() as AccelOpsClass::cpu_instance_init. At the same time, convert X86 and RISCV AccelCPUClass hooks, after forward-declaring each target method (to avoid moving code around). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- accel/tcg/tcg-accel-ops.h | 1 + include/accel/tcg/cpu-ops.h | 1 + accel/tcg/cpu-exec.c | 9 +++++++++ accel/tcg/tcg-accel-ops.c | 1 + target/i386/tcg/tcg-cpu.c | 5 +++-- target/riscv/tcg/tcg-cpu.c | 4 +++- 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/accel/tcg/tcg-accel-ops.h b/accel/tcg/tcg-accel-ops.h index aecce605d7b..be712c02efd 100644 --- a/accel/tcg/tcg-accel-ops.h +++ b/accel/tcg/tcg-accel-ops.h @@ -14,6 +14,7 @@ =20 #include "system/cpus.h" =20 +void tcg_cpu_instance_init(CPUState *cpu); void tcg_cpu_destroy(CPUState *cpu); int tcg_cpu_exec(CPUState *cpu); void tcg_handle_interrupt(CPUState *cpu, int mask); diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 5950cdcaab1..d7d329e419d 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -48,6 +48,7 @@ struct TCGCPUOps { * Called when the first CPU is realized. */ void (*initialize)(void); + void (*cpu_instance_init)(CPUState *cpu); /** * @translate_code: Translate guest instructions to TCGOps * @cpu: cpu context diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index ad94f96b252..ef44c12b601 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1045,6 +1045,15 @@ int cpu_exec(CPUState *cpu) return ret; } =20 +void tcg_cpu_instance_init(CPUState *cpu) +{ + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; + + if (tcg_ops->cpu_instance_init) { + tcg_ops->cpu_instance_init(cpu); + } +} + bool tcg_exec_realizefn(CPUState *cpu, Error **errp) { static bool tcg_target_initialized; diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 3bd98005042..381f1614923 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -219,6 +219,7 @@ static void tcg_accel_ops_init(AccelClass *ac) } } =20 + ops->cpu_instance_init =3D tcg_cpu_instance_init; ops->cpu_reset_hold =3D tcg_cpu_reset_hold; ops->supports_guest_debug =3D tcg_supports_guest_debug; ops->insert_breakpoint =3D tcg_insert_breakpoint; diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 6f5dc06b3b9..04bb9787575 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -157,6 +157,8 @@ static vaddr x86_pointer_wrap(CPUState *cs, int mmu_idx, } #endif =20 +static void x86_tcg_cpu_instance_init(CPUState *cs); + const TCGCPUOps x86_tcg_ops =3D { .mttcg_supported =3D true, .precise_smc =3D true, @@ -165,6 +167,7 @@ const TCGCPUOps x86_tcg_ops =3D { */ .guest_default_memory_order =3D TCG_MO_ALL & ~TCG_MO_ST_LD, .initialize =3D tcg_x86_init, + .cpu_instance_init =3D x86_tcg_cpu_instance_init, .translate_code =3D x86_translate_code, .get_tb_cpu_state =3D x86_get_tb_cpu_state, .synchronize_from_tb =3D x86_cpu_synchronize_from_tb, @@ -237,8 +240,6 @@ static void x86_tcg_cpu_accel_class_init(ObjectClass *o= c, const void *data) #ifndef CONFIG_USER_ONLY acc->cpu_target_realize =3D tcg_cpu_realizefn; #endif /* CONFIG_USER_ONLY */ - - acc->cpu_instance_init =3D x86_tcg_cpu_instance_init; } static const TypeInfo x86_tcg_cpu_accel_type_info =3D { .name =3D ACCEL_CPU_NAME("tcg"), diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 3e22e7ed53d..703c2d9bd0a 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -268,11 +268,14 @@ static vaddr riscv_pointer_wrap(CPUState *cs, int mmu= _idx, } #endif =20 +static void riscv_tcg_cpu_instance_init(CPUState *cs); + const TCGCPUOps riscv_tcg_ops =3D { .mttcg_supported =3D true, .guest_default_memory_order =3D 0, =20 .initialize =3D riscv_translate_init, + .cpu_instance_init =3D riscv_tcg_cpu_instance_init, .translate_code =3D riscv_translate_code, .get_tb_cpu_state =3D riscv_get_tb_cpu_state, .synchronize_from_tb =3D riscv_cpu_synchronize_from_tb, @@ -1678,7 +1681,6 @@ static void riscv_tcg_cpu_accel_class_init(ObjectClas= s *oc, const void *data) { AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); =20 - acc->cpu_instance_init =3D riscv_tcg_cpu_instance_init; acc->cpu_target_realize =3D riscv_tcg_cpu_realize; } =20 --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064992; cv=none; d=zohomail.com; s=zohoarc; b=KjbQmW0AUV4b8ujFWruRAXDzhIUQNXiOKaEyaBx1/rHdTY4fvqR5nU+x3/DQrN/ZzBe8EKFCUx/a32dbsUA0gxJYM6pbBzUjfimuUSUhzoJpxCIoE0yZ+VXDt2ovrZwh53tO9hml/gjVJdbku2r+qXcjFJKNmnXPYM1hjSBg7QE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064992; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=U/Ui1jevrZtyJRpeW9wEoANBK4xBgFParODxQakXLb0=; b=CN8pHX/eWZDuPVgxAgEo0YzeED89npbJCmTlqy1sVYKJRhSmHVoowMXV88kmtsZ8N1VbxHrXtLJPkWoqcOBpXHekjqa50GHbOvN0iGpd/EVeo+mGZcv9+sq3ZKlf/l/lagIC/wAgOBVOnj/06os7txZvmG+l7UmQorn/2yb2W2k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064992309947.2136326659278; Fri, 29 May 2026 07:29:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAG-00062U-1l; Fri, 29 May 2026 10:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAD-0005wE-Vq for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:18 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyAC-00036U-6R for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:17 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-45ef189aa1cso647821f8f.0 for ; Fri, 29 May 2026 07:26:15 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef34c50f6sm4494831f8f.16.2026.05.29.07.26.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064774; x=1780669574; 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=U/Ui1jevrZtyJRpeW9wEoANBK4xBgFParODxQakXLb0=; b=oPzxL5a42MWWZwVd9vwCcF7aEyHzU94MWovlWTR/pXjk2WznPeaimiaLWld+Ew3C/Y pWFH1Z8bxMs+3i2HQEGBfg2xVkAFXePthzEkLPhLyDHJmsWiZo8s/Des71pWACOjWkYn IYnNhoara58dWl7/+V5p6uRkQmcinM/rcHV+JwIxKcCc45Lz7FPZiyeuU8eEpv44sGyX Aim8uRVtqzAQ6j8l1LWfFffo0kqiEGwPOr1/QWzBCLQA9av0lr9gYwSQaia5HD4d2ZuN LwgPhLMvEroEjY7oypwx1CWYWeJ+q3Ou6vPuDfjyQXFI9Niy46SE2I4T3PSxWZOa18l0 brBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064774; x=1780669574; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=U/Ui1jevrZtyJRpeW9wEoANBK4xBgFParODxQakXLb0=; b=Lgi5D3tmvGkXtqEYG/TfEOjeD7hAD4TLDZnuZ8CSeJ3RYFUnK5e+UvV6cQ4P96FIZk BJLgGQ7wiwF4BVxoo5s4W3vS1J4LHctGrlZqxMsksvCPgmyBuczcIEBh5lem4PnVhQoK A8xacL4MlTsAP+KQTM7p4krlVUXtbx0QZOFES2kYlHoqbCkJaPzXhCXmsnKztP20v0eB rEv5TUshos9MX05EC6DhC8+V02mvHPXNQXYD39xluXtNbm6OiFeeEamp4vzYXr50FJEP 4Pnl/5EacbM4dAjmmMYlw6g7gNzz0T0zrcFOAP5dw0SDAAjWqaslBZNqKLFJPwEh9n8R v+ig== X-Gm-Message-State: AOJu0YyY3Dbs0fBvzdKMm2yM0FDmAhnhJnEJGQxWyWQRWzGr/QLwuMAT vORoTs+mYwnVXtBahTnGyMtH3DBws0V86g7GFejzmWswvw15rBM7ED804HuK7ExGOjfphAwUZsz hhgRfbqh9vw== X-Gm-Gg: Acq92OFie1kh+KyVLJk/0r+I5eQEgBmlq12DbG4im1n9ba5OxgxOp1F+HHRkrXbYSl2 xDa+uTpVpSjKiChBxF44Iz8d9WKCfAWJajxVFAlaDJi1dpd+l4QKUeTREYXnjdbt/Kh8YQ95WD1 rPmLeK7h6AfIKfq28+p5dzlhV+I7rTQmsPJTBwJWruCgttIXoTSP/srljAYgolloWbZ1SfmAwsR 6DPzysFjxqxI0wogtoNOAHXGvED2nwyx39g5FRURnBUyQy342tX02/9JJbZrNMH9Maj/oDq005s mHxrybho5iKCui+aDonSjs310zM4nTJ66veEJjVdh87S+F1AbavhIipQWq7/FuB0+W6prvK3mBr q53X/ECE8kheg+rKngqlhItah8Z7lMii7FuJGwmIDxvFQgw8sYWC4UceLCwM+6TXD9s8WY+59RD oTF5FMz9VVn7Chn2iZaEbGu/IJNGV+iCBQOt6oIG//JjQjY7DPvUC9RceBaPBShyK0tQ== X-Received: by 2002:a05:6000:1a8d:b0:45e:ed7e:f8f7 with SMTP id ffacd0b85a97d-45ef6ae96e5mr159213f8f.2.1780064774383; Fri, 29 May 2026 07:26:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 12/17] accel: Remove AccelCPUClass::cpu_instance_init() Date: Fri, 29 May 2026 16:24:28 +0200 Message-ID: <20260529142434.87880-13-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064992713158500 We removed all implementations: remove as dead code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu.h | 1 - accel/accel-common.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/accel/accel-cpu.h b/include/accel/accel-cpu.h index 88c0815e2d8..c42221f96cf 100644 --- a/include/accel/accel-cpu.h +++ b/include/accel/accel-cpu.h @@ -15,7 +15,6 @@ typedef struct AccelCPUClass { ObjectClass parent_class; =20 - void (*cpu_instance_init)(CPUState *cpu); bool (*cpu_target_realize)(CPUState *cpu, Error **errp); } AccelCPUClass; =20 diff --git a/accel/accel-common.c b/accel/accel-common.c index b3bcd53a4c6..04482b6b57e 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -43,12 +43,7 @@ void accel_cpu_instance_init(CPUState *cpu) AccelClass *acc =3D ACCEL_GET_CLASS(accel); =20 if (acc->ops && acc->ops->cpu_instance_init) { - if (cpu->cc->accel_cpu) { - assert(!cpu->cc->accel_cpu->cpu_instance_init); - } acc->ops->cpu_instance_init(cpu); - } else if (cpu->cc->accel_cpu && cpu->cc->accel_cpu->cpu_instance_init= ) { - cpu->cc->accel_cpu->cpu_instance_init(cpu); } } =20 --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065037; cv=none; d=zohomail.com; s=zohoarc; b=nhEXdiQucaumFv23iajwGKbrTkfNmkWU/M7w1zn2N+Awh3m/+rfkJwv2Cmo1xnmQLh+skOjdF5byxHp9vkHUjKuMhXK49Tj1FH0r4CzTAvd80TF3Jvs8EV79Xc3HK0i2TRs18yRt9ZYUAWDbudcs2CQO78sBMfc3nT6pi8c+WzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065037; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5pY5dZL3lqDIGFvqQzCCG1CGy5J/P2MEPS9AZJ7MvyM=; b=NdBBsnaf4wx/WMaCzGRF6I12r+5Lb8gjJ37jCxHohXDj0tPANrTFNohlLPFjJ/EDQ8QtXmTd1CCa3HIERn9xhw3gyeAI2n+IhLa1Oz/IXuW04SOiVaW2gDSD1N2vh8h8JKWicFy+VhSnCbSstWAIv4JDzEAbOWoNqEZXav3DOUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780065037047271.5918789618828; Fri, 29 May 2026 07:30:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAQ-0006Ez-RI; Fri, 29 May 2026 10:26:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAM-0006Dt-EL for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:26 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyAJ-00039q-SH for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:26 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-49068493267so40182445e9.1 for ; Fri, 29 May 2026 07:26:23 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef35598e5sm3754032f8f.27.2026.05.29.07.26.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064782; x=1780669582; 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=5pY5dZL3lqDIGFvqQzCCG1CGy5J/P2MEPS9AZJ7MvyM=; b=zUTZyxeCB8QVRLG0nEPsxGdhQk2HuqM2ikiLyEkowJ2Q805TY4/y9gVU8oUwheHgfH AAhLsHRy/MMQDcyYD7ip0OfD33qgE/NE7kROYLXopMnqKwattCogIBmINilspf0p+U92 ya+yxcIMxL1bUklVVrG3acGmGarDpH01IZWf4IC9jjXY9qOVY4I6IlMnrW7b3PsJTQPf /h/GhpAnYUq3B/xLLdqDf4fJh9yLxahbK3tJ/ag7T4/7naVerg1wP5lOxi+Qoe/2D3eE oQbl8Dip3z0vc456E2v21tGKd/XnfzOTalbWNczN4ucIh8WgQL7ermUntNeHaEss72hB gx7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064782; x=1780669582; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5pY5dZL3lqDIGFvqQzCCG1CGy5J/P2MEPS9AZJ7MvyM=; b=mLKnK/XiCL0ksJRUq6dYYXYc0qsS6QAT7iE2Maq0dogUAkE78q4BwdrarLVGWb/t18 Ldl7di11YxJgg4K3vN3mnOuZQgbwShE6+2R+OQCxnugErfxQ+IgmBfUXk497Q7GBLYHQ fqIpe4fSWhzcgPPkSWDhW/I0VRrhnxIDP6GHRVGybDteEp24oRvn9OQnQLyaL0UOt5Ky 0zyzRH5V/kfUTgE6soYIiZSWKyQxnxiREmf0bQQMwkHRN7vtFI+SB8GwlziWqa2rrK7E UEwckqCXpMs6jUeep7H13a8FRrG7psGJeMQvEeRdOQwyTTfmv4o+oGpSRV+YhsZmJ5EB PjDA== X-Gm-Message-State: AOJu0YxfdBUyty3lgfBupxQ6RDMbc9zsTtUee26NUM1x6DBbYoYH5D3n xkvxJ+wU/naQB3zrkmFvpyknuduSyn5KgDTZtLKDnV+dnTV821n9G5z/4BNTl/XkFlNg2HnBfd7 6qFBYS0pCgA== X-Gm-Gg: Acq92OEghH3tbYANHHbGRqESGMB6Kq2XgcHI/uruh7ISRMSSoKhWXZnjRZOrVgdWCzG IgLu/LzsKe6kQbdpdcUw0ky49owPJP0lGkY+adKQXz478StVsqAarO5JRkkqK3V40JSB7FlBuuf frm24QUXz7hFvAPLMhslsTFPnX1p4KNTWj3pgfMA1i1ueWGrkNR6X1yXF82U3XO6DFgEM/oWwaT WNt2LXS9BILA5xrT2OchdyskVVC1visKlbhFytTHLFNqIRdfNSkWRcMxCZACmkFYpDcXjEn0fX1 iFN3+liGmqZE6njSGLqDzf/hDf3mPWYRhywye8iUnAfSR7ybAL03C3d1tFbnmNA+XnIbKAkU1gj VlLpTbxvr0X3pm1OSLqaL+FMZCbW5I+T5afa8GGPWM5SGANl2oFUYLUOoSBcdBsAQFVgo9ysPBV Szw0rtgaUMhVPxe6a/ghQmXH6BwSihRb47Rd7ajsq0Y6X5p7QaakiIwyYDaH99va/RTQ== X-Received: by 2002:a05:600c:2112:b0:490:6889:1ff with SMTP id 5b1f17b1804b1-4909c0c0b42mr42497545e9.28.1780064782308; Fri, 29 May 2026 07:26:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 13/17] accel/tcg: Convert AccelCPUClass -> new TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 16:24:29 +0200 Message-ID: <20260529142434.87880-14-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065040393154100 Introduce a TCGCPUOps::cpu_realize hook and call it at the end of tcg_exec_realizefn(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/tcg/cpu-ops.h | 1 + accel/tcg/cpu-exec.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index d7d329e419d..5eba6949ba1 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -49,6 +49,7 @@ struct TCGCPUOps { */ void (*initialize)(void); void (*cpu_instance_init)(CPUState *cpu); + bool (*cpu_realize)(CPUState *cpu, Error **errp); /** * @translate_code: Translate guest instructions to TCGOps * @cpu: cpu context diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index ef44c12b601..1efa3bbe53d 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1056,11 +1056,11 @@ void tcg_cpu_instance_init(CPUState *cpu) =20 bool tcg_exec_realizefn(CPUState *cpu, Error **errp) { + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; static bool tcg_target_initialized; =20 if (!tcg_target_initialized) { /* Check mandatory TCGCPUOps handlers */ - const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; #ifndef CONFIG_USER_ONLY assert(tcg_ops->cpu_exec_halt); assert(tcg_ops->cpu_exec_interrupt); @@ -1081,6 +1081,10 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) #endif /* !CONFIG_USER_ONLY */ /* qemu_plugin_vcpu_init_hook delayed until cpu_index assigned. */ =20 + if (tcg_ops->cpu_realize && !tcg_ops->cpu_realize(cpu, errp)) { + return false; + } + return true; } =20 --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064977; cv=none; d=zohomail.com; s=zohoarc; b=QKePX/Kily6zO1V7f+1OIjkFbM8+s7zNCl1gPvxEnhHEJ4NpPB5oFuUWn2k31hHz1KtAVxkk61Pbu0dlajeGPG3iOBheCDNhlWs7JL6PZV7J4pbcqFFoi5byaWV/OGVls/DKMGbfSaG+1LTYr/hlGBwsKB34itPZut5BOQ7uAE4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064977; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=K+YM3QmRUdwOukM/MeGpefVIWU6iLYxgHP+iBzBx3U8=; b=YDuDVmtmeC0M78E6rDNXsUi0+HhbkR/zjcPFwt0uQ8ol6hWYJ5bzl0plKfUCSghQS8FUDxkKcpCNtcRLeEam/DNRuKzQoHQ1Oy56NUUiRbMwJNUdlRzhdvHllSzUE1A49VXSwceVnpX6itHBww/a4eZx9eTVQUWi3yYgQLyBedc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064976903524.2031275429835; Fri, 29 May 2026 07:29:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAU-0006Tr-TP; Fri, 29 May 2026 10:26:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAT-0006Ri-La for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:33 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyAR-0003Bo-Qb for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:33 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-48d146705b4so147987375e9.3 for ; Fri, 29 May 2026 07:26:31 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909dff2a80sm49531525e9.3.2026.05.29.07.26.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064790; x=1780669590; 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=K+YM3QmRUdwOukM/MeGpefVIWU6iLYxgHP+iBzBx3U8=; b=iyPJPUGBH/vn93bOZigrZiqOdGrLKyaJ5+W6M+oey58OlX0mctBDAOIg/SydzbnMrf d5BXds4badR1DVpOAolsp99JPqQ0fG3NT5Ci23RejPTUYzMqYQ2o/0Q9X+4R0E7Gw6bd Tmk3oVkoSufjWsCyaJJnUJSB8PIUv6YYoACl9boR77hv4LDchBeqxs9DefDWCoujGErD tvKjnRCva0go9CU4kUotZ4zrxpZmbUoM2gNk7U7iRzQtD2FuiesJk2KI1wsQSzEOD4cG vu38WHITH9ZRoRACPpTzc56ksUjOKKUP2RLCqCFeRSiKOJhR1ROSZOqINpAVaANV7+9Q 7uXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064790; x=1780669590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K+YM3QmRUdwOukM/MeGpefVIWU6iLYxgHP+iBzBx3U8=; b=UfY3nSmIb/TC0UgBuxqfWcjxKcz4wpmjyrAZhlI7bZaQw+5dsmIaxZWJvomV3FYiBw RQ+Z1P6L8QkhJkOJ5zpNv9uZ/gFIcFCwHsh0MWMcesTN5PzTsjEcc0yB1kdTxNrWS9gH I12C0OTKQP3TgAMJxlUYP9aWv9hgpNeOywqWRsmZ1BrcpZZyNM7RiTFocfsIa+8ukG49 0ATe4/elfNuuS45EWZk9DdBYzlAugijtpf+eRXbn8DsbY1QSc3d/KZv90DM9wNDHxVOL WkCVF2QX9YE0LkE1T2tJFbKA/OvLIXOoNYwBIo58825R15ZDPf6O4HCCisqFtXS/jeY6 aHbg== X-Gm-Message-State: AOJu0YxDsgllEQI3NnMxNu0l2UNoEeD+zbFUmZME//vwLjoMdzMKYhyC 6MRJ/jPxhLmdBqeWhhIJdhm9tnsI1l3w8E+62I5P/GlPx7EQpttdmQFd54NdjAXRwLqzfRUebEN 5/zb+WvaOXg== X-Gm-Gg: Acq92OFa9rrmaJE5tS3FT4T0dlAkzjkJm1L//8+bhzlrzVFISRHLnzIOkDJJkPnv4Df KwEYyReFyA1ReeY6o6gva32oYzW/exI9FVB8ZkH3jWS+DPnScIrgXZI9G3MLnbUtZtcvoBYytmK dzMLQ7j2bfIrAcbTKi9Nzq7v8+YeadOjJd/i8T7W5aZ70arRx2f8l8gGr/HRtpei4GO4IOJ+cMj a7eI6gMoIdUdg8Oa828jg+eqj+flTMoPkkaFnIktjiCWONrrbnrj22cDy/AJptpQd7z4LAH5MYw 9KeXizNOk8h7BQ6lfydt5B5+g+mZcTCTdwrWu2/IpQSRfd8QTPKFNxRKmyK1ZG1BAeFuIANtnTv xpbYUhgU/bgOK0MTACq3Is/FQAEopvtDYRF91MFIn3cP9Y0WZrqjtbsgdDbT8jJT4PPMpN2buQ+ WEH8siLv6DuG8L39u/Yxf5R0lbTZSR/IotnHDJEna5flmML7iHAypIRBTScOnN6DHAdQ== X-Received: by 2002:a05:600c:3b10:b0:490:5872:e641 with SMTP id 5b1f17b1804b1-4909c0cfe40mr56255845e9.18.1780064790272; Fri, 29 May 2026 07:26:30 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 14/17] accel/tcg: Convert X86 AccelCPUClass -> TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 16:24:30 +0200 Message-ID: <20260529142434.87880-15-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064979186154100 Register AccelCPUClass::cpu_target_realize as x86_tcg_ops::cpu_realize. X86's ACCEL_CPU_NAME("tcg") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/i386/tcg/tcg-cpu.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 04bb9787575..2a61de7f610 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -21,7 +21,6 @@ #include "cpu.h" #include "helper-tcg.h" #include "qemu/accel.h" -#include "accel/accel-cpu-target.h" #include "exec/translation-block.h" #include "exec/target_page.h" #include "accel/tcg/cpu-ops.h" @@ -180,6 +179,7 @@ const TCGCPUOps x86_tcg_ops =3D { .record_sigsegv =3D x86_cpu_record_sigsegv, .record_sigbus =3D x86_cpu_record_sigbus, #else + .cpu_realize =3D tcg_cpu_realizefn, .tlb_fill =3D x86_cpu_tlb_fill, .pointer_wrap =3D x86_pointer_wrap, .do_interrupt =3D x86_cpu_do_interrupt, @@ -232,24 +232,3 @@ static void x86_tcg_cpu_instance_init(CPUState *cs) =20 x86_tcg_cpu_xsave_init(); } - -static void x86_tcg_cpu_accel_class_init(ObjectClass *oc, const void *data) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - -#ifndef CONFIG_USER_ONLY - acc->cpu_target_realize =3D tcg_cpu_realizefn; -#endif /* CONFIG_USER_ONLY */ -} -static const TypeInfo x86_tcg_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("tcg"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D x86_tcg_cpu_accel_class_init, - .abstract =3D true, -}; -static void x86_tcg_cpu_accel_register_types(void) -{ - type_register_static(&x86_tcg_cpu_accel_type_info); -} -type_init(x86_tcg_cpu_accel_register_types); --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780064953; cv=none; d=zohomail.com; s=zohoarc; b=WGLR/XEdlDYRP+u6FavJSlyo3LaNDcCyb068Iw59F3RWBUZL7tDUJ9nS5QV1CjZR/ReNuu/lZ2hkGfcXUC/upEPgL39OpcjyMXGXpjV/zR7vg19MVVkPJbkiRLo8rZ0Kx2pHnThBzAHa/IiStipZtRFMaic2whToSMD8kfncXqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780064953; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=GbRLYretApx2XFNweDx4MjqL1BkYigncE9vMgvnIk44=; b=k/gY4rpva6gnjBKPJ8StFytFXh0EUo+BeQ5Phlq6QuoyXD2XRzd4iEUonUy2WnAQ0PBC6idf9ehGe5TeEq0VXELud1BVUaqXA/9op2XnJDW/fEnVqlFUdg1OSVQCtuU8fcQRx5Px364lNSzFZl/j53UvNvTfKVHJMy8VWcR4EXo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780064953501719.7053463524963; Fri, 29 May 2026 07:29:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAd-0006qy-Jf; Fri, 29 May 2026 10:26:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAb-0006l8-FG for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:41 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyAZ-0003Fg-NV for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:41 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-45ebafde87cso4966098f8f.3 for ; Fri, 29 May 2026 07:26:39 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef3556f51sm3823250f8f.25.2026.05.29.07.26.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064798; x=1780669598; 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=GbRLYretApx2XFNweDx4MjqL1BkYigncE9vMgvnIk44=; b=xQWu5vhRixQtyGmXZ4O5XxYftfJJrMH9BYK5UXHqqj1gDy6GQ1o6Ss1syvFM1NDe7A SyKLUQJ1zeJGMdIDlhirnaxbdFHXc8voEqE0NvRkDlw3Oh6qBMXGHfuXOcKtP9AqPo1q uIgc6tcSlyl2p9D4F5ENY5qOyCR4g+IGCkslf+ncpxTdwUVaOQbHJVQ9GZBNN697K/BX GsyWfQ8CVFB/GGBGRYuYHTji3b/Hq5Pt1GjT+sBbECfCUVg19xtxQhQoMuhIgJNi30bZ 5YzLXdR+yzrQGob4phDmrzEe7DUhsFh5/lXtlQKIj82ePJ59ksuEHJIy2fAvMMTgRPTI mfJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064798; x=1780669598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GbRLYretApx2XFNweDx4MjqL1BkYigncE9vMgvnIk44=; b=PFHqQVTtKCyl6pJjHegWgegiPulnfnENALD4dvTtDoSbkrEfPMQcp+uENdt5OrYyU9 YO05lm4M7EFhO6Lfd5lwrD415VW6lNsXy2D5YzQJT/Cn1ZjQWlPH2aLbRIvzFekDh9AV 1v6CihsRc5hgZ0u2jkwB+eT+jylFNCD7I14JaURt2dxm6Ro0uJtG0p2oPiUAhovPoX7t L3N0obybdS5/s3LeucvAflKQ4Eo+sLjPQvgPohSbu6diGQYAt5vQQW6qpyjQUOxpY4GG IFFG92XkOEDnASmi3uKN/DviYUIwDjtsT5wY5zDgCtGuh4mBh4f9cQg7//dfxEzlCUTt mZcw== X-Gm-Message-State: AOJu0YzqwhWRPXfgQ34/6SW79ZNKhp1BYj11STZaOk1ck6yr9FeZ/e7u NY8lERTOHIXr32Tz3QsKQCvf9dE+CJjgIyPKbtssoMZ8Xx2umCQf+YvzAxrsKZBvyAjm3GNAVPm iqwzARMpekg== X-Gm-Gg: Acq92OH0VovxRaUmP1Qv4UVt7xDDckM3OJtBXEkD/xM1yLiD3GZFxVj6drd1FQcyWRy oFbfgW7v9a5XWrpFO6yfogSgAzqzGx522H5xX4bN6rzmowmrko86rPM+77H4DlXKJuiX+jNwqeH SYn72DgIhF3uqLWV/C9lF0AVNihzJcg+IztkLaSzHOqmIy0LXC8Er4R5lI+MHlXHrp1KeIBzryd +Pezk1PTVx30smsGCZnRg6h+1CyczIyEzXmfMqtZmIDKpXki/95M+hTixGdTsYW/qFmVRnMJeSa nQbfNkRJ5mLlf5SOxtByguK8v7NONn1RnV2U+u2sNPDYfWZ9QBT8hoET+g7bde4ODb44f0ictgq m7D3zF0Y4eJmJ+UhERnGazJBWwhD9P0jSRT7yxPrdk/NrhuYwwvd/YLcrT+SKDRz69UFVvOCgT0 mEsGHTraQYlhwABF4JCtLfSyJW8o0MB9wqfCcrDeKyGsftF5cAqzlaxV+6YK5poqtY0w== X-Received: by 2002:adf:e7cc:0:b0:45d:b14b:23fb with SMTP id ffacd0b85a97d-45ef6b24f8dmr59899f8f.11.1780064798213; Fri, 29 May 2026 07:26:38 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 15/17] accel/tcg: Convert RISCV AccelCPUClass -> TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 16:24:31 +0200 Message-ID: <20260529142434.87880-16-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780064954880154100 Register AccelCPUClass::cpu_target_realize as riscv_tcg_ops::cpu_realize. RISCV's ACCEL_CPU_NAME("tcg") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/riscv/tcg/tcg-cpu.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 703c2d9bd0a..c885af6c03f 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -30,7 +30,6 @@ #include "qemu/accel.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "accel/accel-cpu-target.h" #include "accel/tcg/cpu-ops.h" #include "tcg/tcg.h" #ifndef CONFIG_USER_ONLY @@ -269,6 +268,7 @@ static vaddr riscv_pointer_wrap(CPUState *cs, int mmu_i= dx, #endif =20 static void riscv_tcg_cpu_instance_init(CPUState *cs); +static bool riscv_tcg_cpu_realize(CPUState *cs, Error **errp); =20 const TCGCPUOps riscv_tcg_ops =3D { .mttcg_supported =3D true, @@ -276,6 +276,7 @@ const TCGCPUOps riscv_tcg_ops =3D { =20 .initialize =3D riscv_translate_init, .cpu_instance_init =3D riscv_tcg_cpu_instance_init, + .cpu_realize =3D riscv_tcg_cpu_realize, .translate_code =3D riscv_translate_code, .get_tb_cpu_state =3D riscv_get_tb_cpu_state, .synchronize_from_tb =3D riscv_cpu_synchronize_from_tb, @@ -1676,24 +1677,3 @@ static void riscv_tcg_cpu_instance_init(CPUState *cs) riscv_init_max_cpu_extensions(obj); } } - -static void riscv_tcg_cpu_accel_class_init(ObjectClass *oc, const void *da= ta) -{ - AccelCPUClass *acc =3D ACCEL_CPU_CLASS(oc); - - acc->cpu_target_realize =3D riscv_tcg_cpu_realize; -} - -static const TypeInfo riscv_tcg_cpu_accel_type_info =3D { - .name =3D ACCEL_CPU_NAME("tcg"), - - .parent =3D TYPE_ACCEL_CPU, - .class_init =3D riscv_tcg_cpu_accel_class_init, - .abstract =3D true, -}; - -static void riscv_tcg_cpu_accel_register_types(void) -{ - type_register_static(&riscv_tcg_cpu_accel_type_info); -} -type_init(riscv_tcg_cpu_accel_register_types); --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065103; cv=none; d=zohomail.com; s=zohoarc; b=jUD2POedTE3wchW85toguq5EZHyOBqXCbnqxaCmcKdkzwOP5uVP3IG4svnhlatU2CAvjQbnHUh6xHkJbosSlj1W1Fm4aoZXsgGAbBCXQWE4RXU0K47Z32urD4GrAaaGsejxPTcwbpKVsKf788LdScjbr68+TiUMyzsPtOD68qX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065103; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Z5ag1C+2SG1c3WsflC/6w87NYFOhc1Xx+nqXj9RTveg=; b=b0NRaB7tbsHAxm7Y3FcMXXT/K22g4PB8pcxyB0LT9/k65P8XTvtD8EaeG3HUaZgQcyU0AtLT710eDMobnNjdBhxNe16tlCAakCAWzzNfUi3Bevj5xF6C8HQO2nOtIm76AbB++tC997Zng6IiIEwW76VPZ79s1PMl9TKpbecezgs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178006510287755.703829917424855; Fri, 29 May 2026 07:31:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAm-0007AK-4B; Fri, 29 May 2026 10:26:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAk-00077u-DO for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:50 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450: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 1wSyAh-0003OA-MP for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:50 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4903997fcb5so82668275e9.2 for ; Fri, 29 May 2026 07:26:47 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909c103b98sm14989405e9.19.2026.05.29.07.26.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064806; x=1780669606; 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=Z5ag1C+2SG1c3WsflC/6w87NYFOhc1Xx+nqXj9RTveg=; b=NStu9ErOgmmuYI5JKfGo+t8xhW6yWsgzQt0znAtRSF3/XjB5aN3TcJMEIC2rG4RFtt lf5MoTBXamNUQBvs6B/PU4j5pojEhVuGdYGw+4bapZvTB4gFsCrNqi39osZhUcOAmtx+ y90ull9GKnqZZfG6OSKkVSPjYN2N7WpfFk74qsjuBVK7GXQSXNUaYXhgZC9Latr7M2/4 FBlrf9u5xLc/WR5KWEP4+DLZ0tgXyDcdfc19AcwHUxZA1DeUraKw4LQd9sysbad4jXAa PuL4aZzg14NOZIEtT6XNjwtf9+ia3PTBjFFo1hqfmdF1HYR6m0/XOhjOrwTVxV20CTT+ 8Usw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064806; x=1780669606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Z5ag1C+2SG1c3WsflC/6w87NYFOhc1Xx+nqXj9RTveg=; b=c5z0Zp0QRE1rfK8iPKrHo4fWo1m2kVjoCjqIfi1ETvcUIKvvhKAlnZIkFElSyiQJ3f MEojxc6haLSjXFoLge5RiecfFEJfZffaaupTg8PKMU3RM62Mgl0CCPqphkmFhMHyhAhO KHrghXDEDibPeUH6avWgi07HMj2fbb/s1ypLQJL9pUaXxfCxPZQPgywyZyclp+H6BlzQ psSEJd8DNkR8fX7AXve2isqWW0g2sJA+OMcB3ZhD4BUl/ljkMBSWApG/2LLITYSZYfSl jeI+n/6dFXxoRpRkrkXQhaZREZKJmz7OCD8uowlonwxpLBrcfb+K6iTrWPN4TUk2pHHs xzqA== X-Gm-Message-State: AOJu0YxyOuX6SXGUrYSZjoqAo/n4cccvrZTmcArNq87ooqYJVbl/Jt/x pQB6/WKRlOt3LGpFwPht2n0jekhyTUtIdrP/zV5vN5h6Ymj+S4YbRSqqGF6zu0iInj5kdFqgtbU Ck1kV5P2thg== X-Gm-Gg: Acq92OFGFUbiBTN4b6+OjLxy0ks5Q7imNaHG2vKNUuhm7iSX5MgKBzPHbSQrPRYJHA8 ucOshNgyLWaR5dCZjduN6AB4RDmHE0I0T1HLhBvginm3Z2HokYOPjq+Dq/u5j5jnAqGo8smvzDU GM7z+Yz28LNj1dSFOgiRQ1v4eBrz9swIcnQPKtv1RgoJByWqgBAWK2t2yhggzum/qPIHUTP1tkO kalCEky7KvZL66m8TBBAsbmie8UQIq6rmeP8dadiIaKt2cdxruRPbf2HS8dXeiQRpD54k4vHuTv A8+09ZSunzr8heyp1DIa1GPSrG2Uv664LfJGDi7wZtSatOAK978DzcpjU+ZXwTTe956b8hp4HAx KWLpGGGwoo2qfpwj1WSUIv0k+1T3ncuTvaEioDA/ZEih4BRKC4B0CopbmjeJQu3aV5C0i+H7zB8 fAcHeksGDf9mD5TlhD5Vr34JaLEOo39y3uzPLoed0r9MkovcU1yNlnHFJNMIGCtQGvGA== X-Received: by 2002:a05:600c:a105:b0:490:6e12:542c with SMTP id 5b1f17b1804b1-4909c0e4476mr45336475e9.23.1780064806113; Fri, 29 May 2026 07:26:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 16/17] accel: Remove AccelCPUClass::cpu_target_realize() Date: Fri, 29 May 2026 16:24:32 +0200 Message-ID: <20260529142434.87880-17-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-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=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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065103846158500 We removed all implementations of AccelCPUClass::cpu_target_realize, remove the calls in accel_cpu_common_realize(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu.h | 2 -- accel/accel-common.c | 7 ------- 2 files changed, 9 deletions(-) diff --git a/include/accel/accel-cpu.h b/include/accel/accel-cpu.h index c42221f96cf..d7ea45ada2e 100644 --- a/include/accel/accel-cpu.h +++ b/include/accel/accel-cpu.h @@ -14,8 +14,6 @@ =20 typedef struct AccelCPUClass { ObjectClass parent_class; - - bool (*cpu_target_realize)(CPUState *cpu, Error **errp); } AccelCPUClass; =20 #endif /* ACCEL_CPU_H */ diff --git a/accel/accel-common.c b/accel/accel-common.c index 04482b6b57e..d8ee6d62667 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -52,13 +52,6 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **err= p) AccelState *accel =3D current_accel(); AccelClass *acc =3D ACCEL_GET_CLASS(accel); =20 - /* target specific realization */ - if (cpu->cc->accel_cpu - && cpu->cc->accel_cpu->cpu_target_realize - && !cpu->cc->accel_cpu->cpu_target_realize(cpu, errp)) { - return false; - } - /* generic realization */ if (acc->cpu_common_realize && !acc->cpu_common_realize(cpu, errp)) { return false; --=20 2.53.0 From nobody Sat May 30 17:44:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780065058; cv=none; d=zohomail.com; s=zohoarc; b=Fb+IuAMDXk07XjRWiC+5HQUg02ILAfy6lavx/S0gbsncJDtQrHn6Gl4HquG+zmOb6P/3+Ji3gfxV28K8xNPxNXzSVTqvZjOsshU2izYe5paK1/sDqlrDusxsVtsdbp+LCZyYNxHwbeNLjyHJBmxf27jb0AKhoR5uavmuGgXcON0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780065058; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JIu8PCygzL9wHkP8hkt7uxJi7hvxrUL4lU7Ro6etspM=; b=MnlSrz8a9/2MJCOQoKLFtZtSUOBoT3CqjS3vu6yPX8s8KGN1JwczdGvLKrDoAG907MWMFExAng3I0rCae8nQIUV5Om00BhdiNjvmMNYvUgMURAJwbpD2mTe1o5nHjmdaJZYOv7dgXZH+QxobmX7GcptNUbcKH4NYEMRKLXW0bOY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17800650584771016.6853899470862; Fri, 29 May 2026 07:30:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSyAt-0007LZ-7O; Fri, 29 May 2026 10:26:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSyAr-0007It-Hb for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:57 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSyAp-0003QA-M2 for qemu-devel@nongnu.org; Fri, 29 May 2026 10:26:57 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-490686877a1so40937385e9.0 for ; Fri, 29 May 2026 07:26:55 -0700 (PDT) Received: from m15.home (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d6a0e42sm43781075e9.8.2026.05.29.07.26.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 07:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780064814; x=1780669614; 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=JIu8PCygzL9wHkP8hkt7uxJi7hvxrUL4lU7Ro6etspM=; b=P9X7BxTigXRmmyO29DHvdv6+AVDN8Sd93paUAsNqp8ud5/u36SIdG9rz3N4BUEd+ok AyPP3d2vgtaXvj5EW6YVYfvXZTDwh25/Uhe+SvGOwXh7GdzGPr5pluGFhnBXuOXY6ssO ny8FoQHZuFtADMpc3jV58y9eR/9LU1sBclHjUBMts4Czoha6rAC3ohfZy4H5I3nTPKEQ 7m1sVrq/tPDEHx0vmtcjcf+UIHdc7GVtApV5SDx+SwI8Aym43NEwBUSU4MDXZKy9vXGe 1MFLPGNgzkQIt2IsfOpPn4NhcS9Ji1CG/0K3P04HA+AqOtOy+JxlNXx2GdKwMZQTR/7i rgCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780064814; x=1780669614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=JIu8PCygzL9wHkP8hkt7uxJi7hvxrUL4lU7Ro6etspM=; b=JxufRzUSK2ktBfIxJtSYVggG8Nt5HKJn7Mm2xBWAVh47N2Yqa5QZaPJ66XwAvOCPpL YW3DQ1t5rCo6eSGgXi2GM5j+jOot9YEQiAp66PQB7n3jnecwBtSxYuAgRWGc+fuWAwm0 7ex2GXBs/HIK+lCawbwdApV4WCUeIzf+eJye1SvdVoTUvwYP6uYIGXWqJ2O5hzNmbLs2 MGaPNcsxTWGZVBies2nj7c8Td3vmB2NFNtym0rhaKa76XeYwWe/b3f+F1UigcjfwNFUX SXXpC+hfSwq5/lXK483NOrd3G+St9hPyrun+mlmZeMIzr6emLinMzI56ESo7gol8ILHc Dd6Q== X-Gm-Message-State: AOJu0Yxat0LlEOAFAIv9NrFa27WcRkBbTSZxxdbmIQ9WYvVtafrQue+F 5NWsm3CbzozF73TJlAtntwBRjfUpenV3t12T32CikaSU8cO0Fzt/U23MqUu3CHdh41/vmEOUPf1 WK4PIsyUflQ== X-Gm-Gg: Acq92OG7hTl5ao3VvmTDAoFK6RXdzqMRj3nQ3IiMx4GzB2LKugAXeMbjrgGUPKsM6tr 6dENFOk93c8MDICMgDABM1UAjI/j34mmgSCR5ML8JKeQRkPGdn49COj6ZbnN/T3j0vIlHOG4NZ+ gTcNaDdbVMlnh7B5cPuN6qlvH/MQT2TX5h4pKE3mzEJKZU/izzj6Gj6RjivZHioZZARzWe3CkO2 F8xxjffeKCtLahhOae7+yCSeBwLXsZzpGzyFXDKbD3hvOLvxYgKJz7KlKc7MYsTb8jYDT0Cbgev rEkWdVrBo6ItKX4PD5b6oSQEruuCARKf6nzj8n34R86gsUWBrsehRWJV9Sb1aKiAIfkdlOf0l75 iYlAuO35f8KVU4CQdi4XmDi3//PIdK6hnJlA2WucbXpW/I0kia4em4VWPAf3bo4ct5AEeqJ33fS N8q0pSGDQ8aVuYOxGeoL5sfTiWCL3Bv0i8VxWPBXqLHO88Yx5Oz1/ix0DihtroIwxxj17Vm7wEQ Pem X-Received: by 2002:a05:600c:a30f:b0:490:4b89:5372 with SMTP id 5b1f17b1804b1-4909c62603cmr36489245e9.11.1780064814109; Fri, 29 May 2026 07:26:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Reinoud Zandijk , Pedro Barbuda , Nicholas Piggin , Glenn Miles , Alexander Graf , Peter Maydell , Pierrick Bouvier , Marcelo Tosatti , qemu-arm@nongnu.org, Richard Henderson , Roman Bolshakov , Anton Johansson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Song Gao , qemu-riscv@nongnu.org, Liu Zhiwei , Daniel Henrique Barboza , Harsh Prateek Bora , Phil Dennis-Jordan , Alistair Francis , qemu-ppc@nongnu.org, Weiwei Li , Chao Liu , kvm@vger.kernel.org, Claudio Fontana , Chinmay Rath , Mohamed Mediouni , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 17/17] accel: Remove AccelCPUClass and 'accel/accel-cpu-target.h' Date: Fri, 29 May 2026 16:24:33 +0200 Message-ID: <20260529142434.87880-18-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529142434.87880-1-philmd@linaro.org> References: <20260529142434.87880-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780065060562154100 AccelCPUClass is now an empty class. We removed all uses of the TYPE_ACCEL_CPU definition. Remove as dead code, along with register_accel_target_type(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/accel/accel-cpu-target.h | 31 ------------------------------- include/accel/accel-cpu.h | 19 ------------------- accel/accel-common.c | 16 ---------------- 3 files changed, 66 deletions(-) delete mode 100644 include/accel/accel-cpu-target.h delete mode 100644 include/accel/accel-cpu.h diff --git a/include/accel/accel-cpu-target.h b/include/accel/accel-cpu-tar= get.h deleted file mode 100644 index 6feb344e29b..00000000000 --- a/include/accel/accel-cpu-target.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Accelerator interface, specializes CPUClass - * This header is used only by target-specific code. - * - * Copyright 2021 SUSE LLC - * - * This work is licensed under the terms of the GNU GPL, version 2 or late= r. - * See the COPYING file in the top-level directory. - */ - -#ifndef ACCEL_CPU_TARGET_H -#define ACCEL_CPU_TARGET_H - -/* - * This header is used to define new accelerator-specific target-specific - * accelerator cpu subclasses. - * It uses CPU_RESOLVING_TYPE, so this is clearly target-specific. - * - * Do not try to use for any other purpose than the implementation of new - * subclasses in target/, or the accel implementation itself in accel/ - */ - -#include "qom/object.h" -#include "accel/accel-cpu.h" -#include "cpu.h" - -#define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE -#define ACCEL_CPU_NAME(name) (name "-" TYPE_ACCEL_CPU) -DECLARE_CLASS_CHECKERS(AccelCPUClass, ACCEL_CPU, TYPE_ACCEL_CPU) - -#endif /* ACCEL_CPU_H */ diff --git a/include/accel/accel-cpu.h b/include/accel/accel-cpu.h deleted file mode 100644 index d7ea45ada2e..00000000000 --- a/include/accel/accel-cpu.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Accelerator interface, specializes CPUClass - * - * Copyright 2021 SUSE LLC - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef ACCEL_CPU_H -#define ACCEL_CPU_H - -#include "qom/object.h" -#include "hw/core/cpu.h" - -typedef struct AccelCPUClass { - ObjectClass parent_class; -} AccelCPUClass; - -#endif /* ACCEL_CPU_H */ diff --git a/accel/accel-common.c b/accel/accel-common.c index d8ee6d62667..4fe15349012 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -11,7 +11,6 @@ #include "qemu/accel.h" #include "qemu/target-info.h" #include "accel/accel-ops.h" -#include "accel/accel-cpu.h" #include "accel/accel-cpu-ops.h" #include "accel-internal.h" =20 @@ -98,18 +97,3 @@ static const TypeInfo accel_types[] =3D { }; =20 DEFINE_TYPES(accel_types) - -static void register_accel_target_type(void) -{ - g_autofree char *name =3D g_strconcat("accel-", target_cpu_type(), NUL= L); - const TypeInfo accel_cpu_type =3D { - .name =3D name, - .parent =3D TYPE_OBJECT, - .abstract =3D true, - .class_size =3D sizeof(AccelCPUClass), - }; - - type_register_static(&accel_cpu_type); -} - -type_init(register_accel_target_type); --=20 2.53.0