From nobody Sat May 30 17:44:12 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=1780084219; cv=none; d=zohomail.com; s=zohoarc; b=N3MXCRSPladBp6FTje94nNIqYgUyTNA17m/rAaA7SR3Fld/08Pr0J8FordcI1ro/wvoubW9xaCEiJWJitBtUSzyrsi/9mgRtToU8+0p31Qn2YdQC5eWPShSS4AqWPAU29c+J7bWEDAw5nbELFplp6GTkVSc8nws9iHIQDYEiMH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084219; 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=gToO07btHAw940X+sVMcM9/aOH/ZnEfIGi+vwCzDH2o=; b=nG+VSIseJ3qTrZwPz/D5/z6RRAipLjwfp/aFIPLmRjOZ6bd6wak5xyNiNLQl6iAgR8mjNK8HZeIJnt+mYybeZ5bHuY/623aAva6G8jPZpJWpnw61TMW7XVRylUT/Wi1pYjXJnvBBV9B3C64WIGw3ydO0JIA+zas8xfdtrHlI+lU= 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 1780084219376901.7468852791269; Fri, 29 May 2026 12:50:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3DS-0004Uf-SN; Fri, 29 May 2026 15:49:58 -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 1wT3DP-0004Na-Ao for qemu-devel@nongnu.org; Fri, 29 May 2026 15:49:55 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3DN-0004DB-Jd for qemu-devel@nongnu.org; Fri, 29 May 2026 15:49:54 -0400 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-45ef5146b56so510612f8f.0 for ; Fri, 29 May 2026 12:49:53 -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-45ef34c50f6sm6471508f8f.16.2026.05.29.12.49.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084192; x=1780688992; 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=gToO07btHAw940X+sVMcM9/aOH/ZnEfIGi+vwCzDH2o=; b=ftecYP1bdSgAOPkDuxRVrwKJ08i182es8gZlL5VM6JlbNo/t4j6DQDRcbOeftqCQ46 I0N7NVGkUukK/RVh7Ak33947uAHgqSUbuABslUfcyDXskOncYzhBCdtMKuxM8zV6ZBEO 3KHTgvC0g3B69VMRxM/7ANnnvnedhwpzsQR6w2DLvXp2oQyj8pLtB+ykJQiPlbxvdFOX hjOVUupxsm+pQvL/RhMNiIIfjxYeLlmoxYGI0sozUb8uobPMdGivk5lNv/x+wfXa64Dj DNbhdTw5VFYa7srzLz0G/+x9Q7w1AZlI/BngtqSk9Hb/mRE6u26vuVjY+3fgKQ+WUeRM sx1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084192; x=1780688992; 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=gToO07btHAw940X+sVMcM9/aOH/ZnEfIGi+vwCzDH2o=; b=n3HB1b+g51wX/17ijIjPc8qRFSDCbmAbWPzEHUmusX7O3PB40BkK4koQKDRvbf5a22 bCUjv0XJazUW8C3ZdMyE5ji4n/sFRnYoJtkq6HqRWHLkCDsYdfNkr2lmZSYc8/2D9Sap JxWNZHp7js37OS1Fgvf+yeo/DQR2e95LMGkm1eJVW2BNvFppz/iuoGU2qYn4A0cggH7c 3jKvHiyus14Sxe2hYyvdSbPZq8buyBBCN/4JBfZJ+fAavQxU/gevXJd+7K0JPzdsX2Y+ K3doC6kxJYCFpPBueppdDaaDfio89ODhWLcOhWO14dFG9zaTFNRLVxfCMcfxm4ZcFw/d 7D/Q== X-Gm-Message-State: AOJu0YxpR1P1qcnfM2grP367w8YXJjul50DvuYg9JLjp7iuQq3P1DjQC 5QtoBkgMDsudWLTjPmTJa/UJkOHSSpt3HwkKmZ8/qv/PA/jpD6vNayZEo6Phpv93WrpMjfmYVsc uGTVB4N+ndw== X-Gm-Gg: Acq92OHsjWimTWMQ555M+ADXilt79yk46aspqqZOO6VfhU8rsPvMim6wgKex5VXTUr9 vZAP0dLUeaJj6O3Jw16+xAOPp3qLKjm9fwf/CnESeL/pMJHw9oXvgBR3q0VzbvzsgZriQeuuQSG MU/iNvv1xHqn1NM8rFc/VCPf+gAFlpp5Xd5HOP9bQ3dV7D1hZfxcn4jQx9iDRyp3vfK42bc54Yi 2kApmOcTLPRdhRl2K3cIHklQxauLMQX1TGUx8p+RtW7YGxmkXsF0TPl63PEKBTt2GAA0oWnj6MF LZeiuA8+wmWrFAt+Vbqc7fWbfpVKqzOCRkzT9s3mMufZz/J76zpuecIJJ1uTdnhKHuf2lCMHVah 9thqhpxD3kQYgtkoPDXzSWmFWy38BurL4Q4wH3TMLsUvmHu7OKR99MNreWEKH2p55nDy652gvZN JqWaAl1kPlAM3FA/Svj5yiEyG9XYStYSyYLv5aMhbcVJiKeAcOuCC9bOP33BKpOjskfg== X-Received: by 2002:a05:6000:11d2:b0:45e:f295:33cd with SMTP id ffacd0b85a97d-45ef6ea9417mr918738f8f.11.1780084192037; Fri, 29 May 2026 12:49:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 01/17] target/loongarch: Remove unused 'accel/accel-cpu-target.h' header Date: Fri, 29 May 2026 21:49:23 +0200 Message-ID: <20260529194940.97143-2-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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: 1780084223188154100 "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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084224; cv=none; d=zohomail.com; s=zohoarc; b=JYgoRC/DodEWT/udeknknvGeQRykFdwgcq/oGnmEEsibFLv0FuzNQWXHvQ5pxOXCgQZLSkpa0yhyjNsW+MAFIkJnbfiSpB9IBpAxH21lkz+zMHBychueYmm/qOb0iu8sBF3r9NcCUTz8ecDcl63ZO6l5Vg45ueOJbJN1ro6SFTw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084224; 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=Vn1TfSGGJHYXoT5p86UQzNNg6yKLfh8iH6VFrIwRfTU=; b=lRfd0E8tM95owaMneumg7HIC7L6KTSeiw7TAdQIrvOyQGph+eXGpIc/+ufZM+PSS10uMO6S7CeA73ABZFcm07Ipd/aZV70mShJ2ketJCmAN8MHin/jHw6nkgM+k0+EwZzwKQ5JP/4xtQUWOBSf3KzELBYLjWan9vcsGC/ps5kOw= 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 1780084224033950.3144407089666; Fri, 29 May 2026 12:50:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Df-0004xD-5C; Fri, 29 May 2026 15:50:11 -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 1wT3DY-0004oA-OJ for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:06 -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 1wT3DW-0004HT-AG for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-490388fd0dbso86351175e9.0 for ; Fri, 29 May 2026 12:50:01 -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-45ef357635fsm5573661f8f.33.2026.05.29.12.49.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084200; x=1780689000; 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=Vn1TfSGGJHYXoT5p86UQzNNg6yKLfh8iH6VFrIwRfTU=; b=EI4L2/6sAulMJ+uM39T4knyYDbRcNtG57hwYRCWwiIYi9Rf2j4LdqDNN+HhO9/5+0z rPClJWgFQAKqut6w4EQ9SRd0PhItD2r0Jx/zkgh3iCX0qKA3r4+UXVNJ3VPR83Ge1CpG YOqKxMlXgzMFy99QmG/78dcDdfSEUq0y58PPGP4yijeAv9+FbNB6gyGGgPGqd1bGzaCz ncg7pS4ybga4TmtbVI5wMfNUArgJ51c0YprybixXTPOI1ehwTa9bwG0lNuPwDoEyLp9z 64zbuBGtntRLcBVG8DbQQLyiwgIinJe6E5s0bdmjiF9pJ078j3CGewAV8XTVnKrzUsHg p4pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084200; x=1780689000; 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=Vn1TfSGGJHYXoT5p86UQzNNg6yKLfh8iH6VFrIwRfTU=; b=RnU8GOszUL1fTn5j9lUPGnQoSVOmdWlckbUUJcNoCJ2u5M2r3CvhJxpRWsO6+gmZ2r I9oGKcueNX5zTHYavzM9a2IF4WvmmpCygoHy/lDEfdhKJWT+bziMIVFwaJ981W1l98Fj lX88ASHblfHte/dj6UFQu6Me0ouFWkgOjRy8ZOAWjW28um+fH+l6+X87YwCfi6S6N+ps JWvrNdVeMid1KpbQC+M0kmknOuKOU9zr2TCSrrCFZG9ntQ6JkZa2YLG/DzQTMgLPx2K4 HDg4FpfgGOXjRJ1GOJp6jvQV00WPmt1t75AupBB77VuoC13PGI8B41AGxqg5PNWxpjIR UiVQ== X-Gm-Message-State: AOJu0YxvZx3V8nLP9iikHag87zgzUe43aj+nSSEoD11oxySUGWwHWRCI uhSocL25TMbHVZCfImc0FG95rkWq4h95rvetha3fY6Yfeb0L1hipU4w1OHzCogq3EkMKLI8471G oVlHhmpD5Xg== X-Gm-Gg: Acq92OEfi94QrZmLbRw49wFpUs0XwHBTTzYXQwwy8rz6h3YShd6XkJ0SwF6UuBjJKGn OX7bTeT/14IJ2r3IWzGABx9GGznlhZmMUSKch8kLeS5WRZrpdwVGaQE7TgrZqfpLi76fd2KypB9 dpG7g6v2iHkY7yqFokv8pZXPd88x7m+ee1g3CJs2hAUc6V95EnVhXrju2dT8b6/wus501wnRJZt T08BqNq2HphRYV3iZanK3MoQDkr2xhLug8FeDxdzKDhFISSrp1how3EhLsk2WYdHBGKmnjZUNmp 60tYuLnuStQowMjr0uGRU1F11AspygAOBqtYPV/L5Zyzj80w3gFheEIzFJ1D8rFT3HF/ocAJm/i Kjl2HVx90xflzoan3Ea3tnSmCCN+1kei7B8sMbE1U8e+Wl/psUHj5bJ8N4lYE7h50t3eQUFDTcE cQNH7VmBn9VN+ZsHY2huBI8Qcg+zLMkjhCHrqsSHejVRP2HE4HOpR0OGtWPtTa7Jx/DQ== X-Received: by 2002:a05:600c:314e:b0:490:31e:d6fd with SMTP id 5b1f17b1804b1-490a2968488mr16252265e9.25.1780084200053; Fri, 29 May 2026 12:50:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 02/17] accel: Remove AccelCPUClass::cpu_class_init() Date: Fri, 29 May 2026 21:49:24 +0200 Message-ID: <20260529194940.97143-3-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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: 1780084225223158501 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084240; cv=none; d=zohomail.com; s=zohoarc; b=WzM52ZarSD1pSn8ddMCq0vHSzxh5kIu2ULHaPo+LtKhD+Oy1i+TbH3+qd7sjLdnOZjWFgl//djR8gzMxEbf/QnDqYpx9bTeVMc06DuwQUVi8qivxxCjErjL5bE1iWd9XdjSRXfs/hpyxoV9p8izuRtdKYmTjnq/xfKIKbMsx8/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084240; 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=tDALMDNynw3GUuarnrLNetX0Kec6G0245sRIZSxkHLs=; b=MMlAq6LcfDf8AImAVhLwyJvl/Xfry8wwAvFNLk9ul3ATZjqWAsmQV7Z64jOon/O85jadyd9vy24GhP6WEYZWerxp7nVcScr1lbj/oyi2bVexpuSReIWP+rSQCAsLiGEesmimchUv8VOOsJuZAONjShgOlVBvXyM7Hxo9txAe0uI= 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 1780084240580782.9226117023284; Fri, 29 May 2026 12:50:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Dk-0005Uo-76; Fri, 29 May 2026 15:50:16 -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 1wT3Di-0005N1-Dt for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:14 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3Df-0004Wv-7b for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:14 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4903997fcb5so85244535e9.2 for ; Fri, 29 May 2026 12:50: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-4909c0d4f4esm28563585e9.1.2026.05.29.12.50.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084209; x=1780689009; 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=tDALMDNynw3GUuarnrLNetX0Kec6G0245sRIZSxkHLs=; b=aIf94tDb7qWtb7tPlvZ8BoJ9teHaDc+bT/haxiAXFdHRxdYaAKYZNKY7SnqhlEFuKO TnHolPp2agYV8YIy+PCyL4i9g6kL0BHO8eMLYIv+2n3gOSgqd6DVe1ilP75vBhL6PGqw F6RtTVbLvKvBuKYZnipbMx0SMppGlDRE+CYahUAqiJShO0o03ga+kfD2K2Et8FOa4LRZ sU6ilgRrpEEdnVyl8gX58KFK7533aAvQTFKV4co9+9h229JfK0YvmnttgYBjBiOrtgqM 6TiSbYEm8vmKZYR5fequ3g00xW0+k9q+/Q7aUNg7UNL5Jy/1YJ+LXimcU/E/Q1GXdszc QF/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084209; x=1780689009; 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=tDALMDNynw3GUuarnrLNetX0Kec6G0245sRIZSxkHLs=; b=CP1Moem8Wz9yOi72qjsEXwbpPwPKrsrehS+/qpYFTX5HdlraKJhTybfBeyV4PEVNWW Axd/0kUAAwkK7Z/8BLxfURQKKlr17Aomg8P6EJePxYVgT2y+DY63QGgqMR19pF12owP1 RHZhfrKcYoVVmUloB0qTmQHMASKEIH2Dl5ZT11DexxuEKUfmJURdmIsfjO3vWU72Qk+B s2vpsl4cLdkT1TJjrjVs/xi7yPqHdzlRODZz7IC6GKncesRG52wtQfJhUYKlypaRYao9 Xj7RQ4R71x/tzkpMrVbyEB0htBFRpvgwlUzBl/gxAeL2ZBrxOXlxskm2Ck1CoZ/EVgyP HWtw== X-Gm-Message-State: AOJu0Yx5ox1cTMF1SFGOzsSUmOcwIUWdQ3b88Qqb9PX+tEs7BSKHNaF4 Drui4gCpW6n5guwXP+irmZh5pgNlJiYE4+kijMmtf7jCQM2IjqwyEYtj5PEpoV5oFHbg5GsA+gb ToymlM01U/w== X-Gm-Gg: Acq92OG1abi2tX8MaMD3M6sIbnFsq6Yv8H1Ye6DNzQfuJoskeYrX4X3vcJJLahtQ+Nm O3+TBm5aOIDwU4uoF33DtPYpnNm9biylYYVJO6KhCknF7xEuIw4NyDzCqLcw25hXYz5Gk5HYGcL aoyWBiVTuB62PgBKS7Ego+LzJcP+QyHimf+l4ByEHB4YeUigkL/uyrgqP5AOhxbE/c38HEQJlZn 3ex9WjYY/S13MhgZ/hCAOJGXFU8pW7Dq0OKRrrz7ChiBfUjBKhx9Oczp1785abaz3FyPE8Zs0sX R1qwC+OUFfFCZ4UwR10mWKw0KGRxyst/VcaFtpiFzwjPTWsROqxXe/Nbrq3kb4LHv3KdhOuFGxF +fJ7lY0tR6pGvyKWkRoVjSeB2J77YQqdJTQLGC33ezrv7hw7FOEIiJw37OF0AkQdfv3y058A4w3 6T40mZ9KMxoWrHNzFCZNfeV3xWZUc/B3P3GRQDpOIkp5uUUoD5jFLjVuq0dXS+peIGkw== X-Received: by 2002:a05:600c:8b53:b0:490:a29b:e72f with SMTP id 5b1f17b1804b1-490a29be7a4mr15412425e9.4.1780084209487; Fri, 29 May 2026 12:50:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 03/17] accel: Rename AccelOpsClass::cpu_target_realize() -> cpu_realize() Date: Fri, 29 May 2026 21:49:25 +0200 Message-ID: <20260529194940.97143-4-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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: 1780084241545154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084257; cv=none; d=zohomail.com; s=zohoarc; b=ROYfi5FWl4aSMY0spM0uIJz5X/w24kR2nE1jShTLDO07WMio0QhvONnaqV5TtgoFA6SYgy6OG+fYt/9qIsZciBTWvHpYhiRmDmqVbh6gI0+A9uncdlltH5xYYKWKmWYya1YomC3SxdiPoEgpEgqqiUxJCUKsbVckWP/qX+6LYMQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084257; 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=cSy0FrB9/d+wf1C2wnq80axQw2/zb3tMBvJqGyVtn+c=; b=O4/DboXcsZkBG7ccJvk5pUeE+pSt5EudxQvXc21PzPbEfPzjT7nLXgNOquEQrdvxV/hPWiznWLTGc5u+CD2utKPu81zcwnZa3kHyIvPh7HcK/lOlTskLGNnZrxt8stOTq0YtK2/fMerVK0+GkEH1LQNxj3MBbRWOkPk6BVsFq78= 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 1780084257887370.7748442458965; Fri, 29 May 2026 12:50:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Ds-0005t7-8W; Fri, 29 May 2026 15:50:24 -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 1wT3Dq-0005lJ-8z for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:22 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3Dn-0004cT-Gq for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:21 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4906869f0cbso67519895e9.1 for ; Fri, 29 May 2026 12:50:18 -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-4909cab0e94sm64497825e9.12.2026.05.29.12.50.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084218; x=1780689018; 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=cSy0FrB9/d+wf1C2wnq80axQw2/zb3tMBvJqGyVtn+c=; b=upfmkLQ4ZWySOH9KHD5xLmdqK5/gTa41uLo2jVCDqC0tQb5RABnlFEqXJ21AEYQqaV HakFC+0BqG/EbJrkrWcZzEmYZI8iSFLZyCCBOebkFWwfcg0CyOm41SXyweFYxEJBMitz oVyerxGfDIUYWoUv1vr0ZKolqyv8o4FUQ37q0Pux/UhUW6vON7LKR0NsacA36HLhWVXX zBlhn+SlLzFeUf2pcnH2/HfdQMKn2MjECFAuajZ3nBVsWCwEnoXjOxzkq7YTOCKz8G/F tNehzaXP9/Z00aCcTa7oZZtQ5AjRCqtA2wfi/sbDstelzIwpUFCfQK4oJINOipOGQtcd VIVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084218; x=1780689018; 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=cSy0FrB9/d+wf1C2wnq80axQw2/zb3tMBvJqGyVtn+c=; b=Hs80q60dE8S5Ucls/MGgizjuPPFioxx28cv4c2ZPfcFjEU2jSzGCYWl7waDaSgIdOc KaC8/uBvCJ87oZ5BbEZcsAbPMfwWegd4HMR9RZvzMsnn5YalXdvs3FKF+qI/V+DFpmeb 9h4ztipm4p0OfesRhEY4CYqLrlNV4/tigM/JieajkaASgsAwOYbR6jxOosmddX0K0ui8 qVNF5fXjMhuyGqYK3J+B4k2HOPrPm4qslYdBFoWJqoifuBxHWk3mGUgQTG55wU+m2But vXXFGEEPPHlkJUddbXu6t0s0AEE1I5JdDDSgixnouwmUqqcF237SEBcNHfNN02WVZgw0 chmw== X-Gm-Message-State: AOJu0Yw+DvXdQtX1HlLvVEEfqgUGlTCVSpMWrFlsJe+Q15QrDeTeez5t +LE/N+zBYueJtTBaRB3/WNQRlbFoxBfi23zfMoNSpzctFIx3Xmex7uuD/RN5d9DSmRGJaHM/L4Q yQ0sRLtJSMQ== X-Gm-Gg: Acq92OHP++owz1oCkVU9/bJ4f0QuBxCv5BWw+iVw+CPPMSyWJ/hqpMWIs0SaD8t86tW BsCO2ZMeahd8rn83lyZ4coqterncVyCClkCb02iXYAyep/7utk5h7mXTQHFcPiqF3PiQ4pd5cjx D55Q1V/nB0hUgQb3U2/82alYw+KpC3gWN8Rd7bBWKRrOo2s/7RkzfhjwtmtsVJTJGN+RUsn9sFJ u+yXcnIAcr8hdy1ZpHFoThVGuDMiaJCezZJMXxbxyQo8bu26I7jovhQARFai4LpW7NAnlWpCWMY 1DIrJ+KOU3wPT2b1NqIIIvSnuqnzuJ3MNQpItmjEbHmI7Sc2yB7Rvu2gGV/u6UDWujwZ1W79OWW bAnu4cc7g6H9IiIyv9IJqMTx5NNc8DMT7aLlBS/04usGYiziw3b1gKFqCLXoWH//zqO4XQrbJbs ils3pULrJLt+2OMPxKpycv8eRt1ujgFZe1MXeGLBQwI7BwgTX+oFHV0zcB4hBoiHobtg== X-Received: by 2002:a05:600d:8445:20b0:48a:5c23:cab with SMTP id 5b1f17b1804b1-490a293a126mr13005065e9.19.1780084217642; Fri, 29 May 2026 12:50:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 04/17] accel/hvf: Remove need for AccelCPUClass::cpu_realize Date: Fri, 29 May 2026 21:49:26 +0200 Message-ID: <20260529194940.97143-5-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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: 1780084259968154100 accel_cpu_common_realize() first calls accel_cpu->cpu_realize then ops->cpu_realize, which is set to hvf_arch_cpu_realize() on HVF. We want to remove accel_cpu->cpu_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:12 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=1780084283; cv=none; d=zohomail.com; s=zohoarc; b=MVsZFr4xI6lWb5tK0hy/GA6/YdxKdk2lV/TIdfpzVXda8UQPKVkRIA2KUJNg+Y+POPRwKwYX03G2e6yU3m0LNKZ15Z7Bz7/W9b3YiR0IaQfl7Wamgj1XU9Tj8ppepyN0slx1JN1xnF6KPHCtq+FoKfSJ6nJinVrOqL5hRG3cazY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084283; 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=cbtD0a+QduPKTnykEYf324+8lIDbZ8T/QVOG7u6Zyl4=; b=hImFHnj6ScpqZdeMJ8FOfWiJfyJYcGou73tLKEiPLsvaE+lRBEdJUuaspT0DfcoDyV/oVu5BqMQKNDcqWRe8V2e6xTadXh2ynoY55hMRwGcetqnWgbmQXH4JRvHqd0GaPlD+YEzFTdEuqReTieQaxxetRC+HLTWiZEc8xcf1P1E= 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 1780084283456521.1948223841882; Fri, 29 May 2026 12:51:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3E1-0006Eb-LI; Fri, 29 May 2026 15:50:33 -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 1wT3Dz-0006BK-EL for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:31 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3Dx-0004gB-5a for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:31 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so147875025e9.0 for ; Fri, 29 May 2026 12:50:28 -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-4909c104920sm20387615e9.21.2026.05.29.12.50.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084228; x=1780689028; 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=cbtD0a+QduPKTnykEYf324+8lIDbZ8T/QVOG7u6Zyl4=; b=bByajw95KaxenCVXKloFuD9xktHuuLdQWUNYBpOZF1yX4BQbagLZQL2er0v7ARbPTm VLkJ/Lp56IWYdSZV/uI995FC8dsUIoLdiy+5nJ+T1BGRFujlsi2OuNl9/gVy7yptljZ8 jD0Rs/5gSOYZnVnaW2wnT8WUvWvAZhqDJKRE8aaQqrXeqEtIdADsSv56/MpEz4fNZpoD 8HaOiDjWtDFunHmxLhGFLxGVettRY70VNzHKd9Y7FJF6Kei4HJWhi+eo69IWn4vvaqi7 9K8VML8OGg5jwxltBPWY4SUeAR9ag9rCIgBtBYckRg/6LZTc8Gw6P8FOm/KlZTjVrlWp bwfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084228; x=1780689028; 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=cbtD0a+QduPKTnykEYf324+8lIDbZ8T/QVOG7u6Zyl4=; b=He1Hx8H5dIANImiCiipxpjYvnS12PwJr50JYs1j1zED3HfIrOyPe24j6O6C9+Bn8ET EA9CbNdfjwAXM3IN4Oj61UXe4HEXjuaAmIXXmW5MbQDxEKSyDI5lSrmbuPbU7TA7IDWQ 4LfVN8rAB8g6ByCI0T4bCZ7KbyBLjDy9cI3wzwS0nRtxaOe9XIo2DAgM/I+EEciBuTEp 59AxKYSA1cX5MsjeMgXUGFsmNRIXKFv8k0atFzYwzikrx/gdTBQipT8GRfK0wDHcVaZa CnvYE05OlH8US+bd6AyISs0fZWnZaeERnJJYb0OaTTnVN93WPKuteijDLKlxW4WHOekh /6Sg== X-Gm-Message-State: AOJu0YzBiq8FupOGYCmTMXRwO0W5WyO93YOq0w9J0IBohpf5KZ0Ul2Ed mNdR1z93nss0Q6mrZkAgqYlp3MN84/G5OYKjCL1vxhqllda7AYkBojfiqte9gVJ3ROemZNKOjCF uRxQvNy6faQ== X-Gm-Gg: Acq92OExjr5r0DU6vLef6w8plaLOZumjarbb6+38IgZVOYcg2HY2ua5/LBgcIR05rrX s04i9+uXQYr0/huUH6Rf6kjDbIESb3up3INWT07odsL2qnWDtgRFyird4I/r0iZ00Y6vsFjV6kA El1/3EzTTKzVnfPgZI1Rwpr1w26tz37UB4ywpRUC6XOHbOEdy2qmJRGlrxCu91BZcnjTJKmMWcs dvqRfVn25WoPFjlDj+mt6We1P4OLkkyqevkcJODmw9aIGPt5FbZpFYnjBsE0yqarUoTXxYs+Pv5 LjAtT80J5IHIOu4/TzmyUhZcnBq5CIHj5t06t4+4Mji4jL8V5UylewgCZywG4FBgSExOCXK96JT MkVyK2rOrBZfg6tJYNibL+G/NVr3fks7YrGPlPcQrsNROu6HEwWBBReP7EuK9EAGy16BRFLkms1 cKfnM0IXrD2xjy3d5Z1L0qjhHTUweUbeMsd0FG5gUusnFoNZ7x+1TLgdpsOBfkGSNZMw== X-Received: by 2002:a05:600c:c108:b0:490:50c5:8153 with SMTP id 5b1f17b1804b1-490a290de68mr14778405e9.2.1780084227615; Fri, 29 May 2026 12:50:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 05/17] accel/kvm: Remove need for AccelCPUClass::cpu_realize Date: Fri, 29 May 2026 21:49:27 +0200 Message-ID: <20260529194940.97143-6-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: 1780084286145154100 accel_cpu_common_realize() first calls accel_cpu->cpu_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_realize handler. Add stubs for when a host lacks such method. PPC's ACCEL_CPU_NAME("kvm") TypeInfo is now empty, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/system/kvm.h | 2 ++ accel/kvm/kvm-accel-ops.c | 1 + target/arm/kvm.c | 5 +++++ target/i386/kvm/kvm-cpu.c | 3 +-- target/loongarch/kvm/kvm.c | 5 +++++ target/ppc/kvm.c | 23 +---------------------- target/riscv/kvm/kvm-cpu.c | 10 +--------- target/s390x/kvm/kvm.c | 5 +++++ 8 files changed, 21 insertions(+), 33 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index 5fa33eddda3..cb077d6d863 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -223,6 +223,8 @@ void kvm_irqchip_add_change_notifier(Notifier *n); void kvm_irqchip_remove_change_notifier(Notifier *n); void kvm_irqchip_change_notify(void); =20 +bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp); + #ifdef COMPILING_PER_TARGET #include "cpu.h" =20 diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 6d9140e549f..4e7e3039208 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_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/arm/kvm.c b/target/arm/kvm.c index 7d194ea112b..22bd924a399 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -1783,6 +1783,11 @@ void kvm_arch_accel_class_init(ObjectClass *oc) "Eager Page Split chunk size for hugepages. (default: 0, disabled)= "); } =20 +bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) +{ + return true; +} + int kvm_arch_insert_hw_breakpoint(vaddr addr, vaddr len, int type) { switch (type) { 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/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index 9d844c4905a..ec4c05006c6 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -1495,3 +1495,8 @@ int kvm_loongarch_set_interrupt(LoongArchCPU *cpu, in= t irq, int level) void kvm_arch_accel_class_init(ObjectClass *oc) { } + +bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) +{ + return true; +} 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 { diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 2e4f435c537..1c259652925 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -2611,3 +2611,8 @@ int kvm_s390_topology_set_mtcr(uint64_t attr) void kvm_arch_accel_class_init(ObjectClass *oc) { } + +bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) +{ + return true; +} --=20 2.53.0 From nobody Sat May 30 17:44:12 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=1780084266; cv=none; d=zohomail.com; s=zohoarc; b=bYwHc9HD5bpiE2nIwHsDDF1jq22PeJo7+lFXcI0c1O8wEnCILwY7pQVxoMlhIh42HM1XvHHamfzMhhSVisLOtJJT3fKpflQXuPsgZ3akYlwWzSRWeYeVDVSimZeaJlnaUnE8byTlkRKVsy81tAGQW4mk1GdvB3H2olnCI2Q4FJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084266; 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=LiKly4HPenv8/ZKUBSNL5mBIXiH6MvoTy+hNbg4YgG0=; b=Akewf8lUVQTICSsBjCl6oPffX7cI5eDwbhJPbbYzpKRhcgLCqSIL44njZwrBuu0Q66f/Itjk7IKU14PJ96av5PTYXypjutBGt2LVVocdlEi3gLlqTCnvjuvdNPF+Gw0HlQJz8CCVvUsJ7iyUbaoU8W4vw5l2l5dnLDz9xGOG5GU= 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 178008426667917.741948005821314; Fri, 29 May 2026 12:51:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3ED-0006Te-9n; Fri, 29 May 2026 15:50:45 -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 1wT3E7-0006Nj-2X for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:39 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3E5-0004iu-8z for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:38 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-45ef1629ff4so870715f8f.0 for ; Fri, 29 May 2026 12:50:36 -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-45ef34a03f8sm5924106f8f.7.2026.05.29.12.50.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084236; x=1780689036; 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=LiKly4HPenv8/ZKUBSNL5mBIXiH6MvoTy+hNbg4YgG0=; b=Btun9GV1KEzP0XAMcGfA67coAECrQPwiMdzVfClLHNrbKCBqtSKpICfTOXrbgOEa5D ai8cgScpOM1f+pqCYkSzaWgorOERQ9mFcLhfr2wOvz47CTeat2Sk4A5yFJFGCz1V4uTB 1b2HemybRd9QBLQlPLUJ/FNF/cEqJKEn3HYsSX4ECJOIDGmpzcL6loAk7aAo7gU/0gB7 Hd+x1v8d8gL0685/K9p5wJyBdnSGt+zxaumJ178dqidUcdJAGeCJmsUUSUfWkGTPWX4/ T7a12ZS9GPDb/shLrE0s0UI0e8qc3TgmDuPPc+Z/hJ27eH74YNafMdCjScR0+mj7bMLh P8aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084236; x=1780689036; 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=LiKly4HPenv8/ZKUBSNL5mBIXiH6MvoTy+hNbg4YgG0=; b=rprv6WomIODFtTQj3Qmkux0ofpWgL1dhwZT+fujiy0g0Wx5EgGEiKDGaUpNTqY1fNG F/ILluFE3YHF2qjz22XbKSxaBGk4PkC51bO49/TBDqpmQfurtAB6zgEsbvM7Rg+rD27q B14XPlxs6VzU5qcpy9NLOOCMu1c9Xfp5PpoWAx9uq+4VJU2rsUI23xrI3b3Ce7MDZ03F 4qb2Vsb6VerFfpdW72OgGZel7WW9gQw3/QGet3ghftzDzbzeUmsD7hz3NYrUPPkNTHoW 6zS4TOjkRbkrgHphsoDrIHOZZB8YYTM75M3h8cVR7iUVJ8kNuQqcvzRKdBcg5ndAJvFQ bxJw== X-Gm-Message-State: AOJu0Yw21A6itefCbr0XF6lZDHgO78kd+0h2iJVHyeTIRpie/8Aw/HDH GaunAFe/qAycEsIYeskDx/AGj5DLV3mnmZrjrXcmB6Az/3aDRzp/cdv4554NlmsYD4Q1MMPHnul 86DhaapSkpg== X-Gm-Gg: Acq92OEw45AoOsWAAHaCdBtz/cRNQmFnVg5M7ldfq6i2qT2oGAyQ3MqGvYcA/Baz4Fp 7GYrSoZGwpNx1BDxGhVkBLyF7cTKQcSNltJ2Wjaw4NNQpvwhv2c4JvmmuVhTGXN9mMDKU5Tg5zj JeJFd1xlw8wJC6FT5ZS/KIzEVA5uqltFT/PcQe4zqYzRLdWHLzSVeSpILYidR5OoH9GMF9iJp+e +9HDmgHhJv3s2V0fMS5gOAbvGTwf9t8xhsWNLCTct22G1Zg4pgvJdBEGRqpU98zYXdUGSU4PtRM xd6DgZTb8eZuYBDy/E+2LkNbfAUL0ya1ksLBdzkQeTbib16bYs2mfq8x7LIi4tbN7YOw1jb1zHt 3DDQFRFkJtnq3RXgfx/1n6SAcsd5CnolBjbJI/0Nc8lmy3UQXbkPHK0Psjd8G24rQoOOXGyThPD K0iQtiG5Cdsp6kYjxFEJmWggyIVaCgeVoZ+rMFI7QVl1ZeRgngw9z8qBXtONY+jfYZtg== X-Received: by 2002:a05:6000:2812:b0:45e:73b3:4515 with SMTP id ffacd0b85a97d-45ef6b8c2e1mr1557937f8f.35.1780084235811; Fri, 29 May 2026 12:50:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 06/17] accel: Introduce AccelOpsClass::cpu_instance_init handler Date: Fri, 29 May 2026 21:49:28 +0200 Message-ID: <20260529194940.97143-7-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1780084267920154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084291; cv=none; d=zohomail.com; s=zohoarc; b=EmbDVCcBr/lyYba3PuYbry/QB8a3nLtGPnK60RlD0xK7n+UbMXUdCl5utNKFCBwotBQkPtqab+FqicYOtNx6paL1kqOdghGwL/PRJS8GMNyLFCbgaWaueFwfAz0Za/pM6bEKkK8o99bIK0a+a5wIP0N+KIVUBoeUJDsE1CJ9Im8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084291; 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=HTEurkffFP4f5HtctBBlTf0KhJxPmE6GCKl/0QMxQlY=; b=IjaIPqy/+Keu+lFTYnNynTv4lQCxVkj4M/s58rK3JBm2U3XI4nXwJgUcrQ64yO6ey2ortollQyvFNgKiotnNsUHuh2FReM6Tog+32iUdFp1QjoEa9rFpUxQNZ2f6Fez1XaRFnjtFKjgKLrOk36hC8uqoKmm8vLziQOamjfxfm+4= 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 178008429170425.463107133769995; Fri, 29 May 2026 12:51:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3EK-0006lw-7B; Fri, 29 May 2026 15:50: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 1wT3EF-0006bj-HG for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:47 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3ED-0004oO-Kr for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:47 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4905529b933so58987605e9.0 for ; Fri, 29 May 2026 12:50:45 -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-4909d6f35f8sm52943695e9.13.2026.05.29.12.50.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084244; x=1780689044; 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=HTEurkffFP4f5HtctBBlTf0KhJxPmE6GCKl/0QMxQlY=; b=HAg+PpUhSMYfNICGU33w73iTKZHZvHn0TEl8k9cMKjJKIjyb8+cFwk+SvfrpdcaTF9 GBdqU2fCpWj/5g/0eph98ck9u4vmfLzFnrA2OBS8LqKrIyJWlXAuo9fTZ45mv9IQOkLh wsF0kcYpWiO/TqQqZKfJa3On4hZshQxKVDHnHhnmMDpXRAgZMPHWlJzQMRC4/ymqeV97 Oku/ibGyjtEPxvPVPb3vJ3uPtw684f+8MnTgJa4rONaOMs1VyIph4GmWMcsja1FOaPmB e5OW7Lyr1Wx9Mi6hFjPl4HtfhYFMYOiDJM7U+ZjPu/40q2bbZ5hjsW7efV1C4dqF/Zg0 cVhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084244; x=1780689044; 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=HTEurkffFP4f5HtctBBlTf0KhJxPmE6GCKl/0QMxQlY=; b=Px2tWwRV3NZmrQlAMi8/Pz0AzE5Dm+R2no8ToV0FuC/tHdA8Qvp+PcjG+4mKPEWg5I 6uUzgANHWWhuQJ9fIP4p3hysdFwH39jW2ldodbyhCVV9qzgLFAa7uF4Qw9OH45j2i5Wz OPVF3lquhUfFZELoGyVruHZc8gegVmpB+C9Pj93TkuczJDbHHHEllMI6FWg829/P0shX gmD3JlUobMEMpbPOdSGivMAzCNF9lZRNBB1wJSLiUFpXFCEPW/a+hzC3KaPi5U9BcY6J JhUsllfPIYJF1tki9vZk+fW4d5u//Smfnnflre9gW/e2xJqd4z4B3I9mbgVEgmR+ZSQt SatQ== X-Gm-Message-State: AOJu0YyjmNGK0hiCeNl/VApGUV0ndKQbHG+VQWy11lqBrB1En0pP/jL4 f8qdNTLLRNUrX7hK6ynpDt3BZ2naVvfWR4YAkIUiU2tipiQoS1P9tePdYnpSBhUo77HT8Ipycd1 RTJOx4viyLw== X-Gm-Gg: Acq92OEPMaCi+BPpOKrWhyWqt7BwdLRGsoyTdHekVpurbNRhNyII+mmfArOitAj1kcM lpfdjehAsGTqF/jwVaN0Rb5TLm/r6EYVlL5XKPWptGXqtQkr+DG+eQswRJm9vE38MOzGMnflBNE mlSBNwZx2IF/dd0aGMi4shL9M2IrAh+wZVmMIRZolgmFi0jDnitD8pfq6aGA7G751GINBMBRsr1 y2PoAs51c13FYHSOdJUmocnFZ0qZdOt7baK4hDYkcswvx6Cr77xwVjjwpsmOk4ddEt2Lky7hoRH PcsAtbtQxLXgrohbH9nK+++LwkLjuJn+s4d8FsIkZ0mgKDA/0KEpdFsWlJhHizm4vwXAZUUckf3 HuTeq7FGXzeIaG+O1wvc5UeYBD1fJW77VtTnxs0J+pE7Y5T6CXwhZYg0LREhVP5hAgcPQxyHUDy 2yaPTgWAyj0GsBXZUHzMIuplrMkl3iI4s534qFNKgrCCjemv5eYltgC+tMsHqfGvDF1g== X-Received: by 2002:a05:600c:818c:b0:490:81cb:d7a with SMTP id 5b1f17b1804b1-490a297085emr16599145e9.29.1780084244117; Fri, 29 May 2026 12:50:44 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 07/17] accel/whpx: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 21:49:29 +0200 Message-ID: <20260529194940.97143-8-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: 1780084293588158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084283; cv=none; d=zohomail.com; s=zohoarc; b=e1IK5vsFc6wcS7FozaiVbKd2yJnxoxnxPf0d8pR5iSaB4MeEkNSaj+qtkwwBOSEg5FMcOJmxmbY9v8ox8ysWkc10R/580WrT/iFd8jBT9ZMxYV/jrgzhMlz/3VsgKsUkNsur20rYocMjvkbGrwRg2Y1po3w0UCjdYj+dm0pjOPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084283; 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=a8R24Vi/05knbM4BrOIv7zp9N+sUYsxpoHxdxBqTbhc=; b=FUF2jaToRR35NFgLrq2CY4w6H5XT2H+4VBwcyK4/WTHdKVT9/PHPh31uiX7GsTNVMMeiXRkcwpjhdGpUHJls6N8hIdZlRRENfaJd8MPohHQmmXIEIRgbYXcPhjF/gscBHGKZ3UyFGx9pft9tIYKU1/EDr5OUpwhGb1PVnwuL0sU= 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 178008428336692.73181125104645; Fri, 29 May 2026 12:51:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3EP-00076P-P7; Fri, 29 May 2026 15:50:57 -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 1wT3EO-00071X-Iu for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:56 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3EM-0004qX-JL for qemu-devel@nongnu.org; Fri, 29 May 2026 15:50:56 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-45ef76f0d06so41652f8f.2 for ; Fri, 29 May 2026 12:50: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 ffacd0b85a97d-45ef3559645sm5427442f8f.26.2026.05.29.12.50.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084253; x=1780689053; 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=a8R24Vi/05knbM4BrOIv7zp9N+sUYsxpoHxdxBqTbhc=; b=xtKkmHP/IXnUNV1D9gYOkD3dBnoLWp717L9DdAUCRBxfTR7siG6xTQBe2RoXj/6CaD Q6PFzo30r+vrrOYBdhVvqbKML4lfbBby02zDV7aiXxfY31wy5BCkaeNsS9m5rVJr+2ha 50UgOcQn+MVQq3lNPOgVrvhmchN5r7bJ+kbeArTqfSZ4KBTRQsCvgz413jRP+CD0Wpur LmHM+TZqdRJ8MOK4cxp1WiujpMJ8g7Dj+5/e1PO5JyD8USlDM/SmrI9Yy3hMc3+XNwKT rvDf9nSgZJjPcFNETIKy3Z54a5eY35PriHHHDo9tVlLZak/vKYhrUlVmmzSw0H1Jr821 +dsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084253; x=1780689053; 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=a8R24Vi/05knbM4BrOIv7zp9N+sUYsxpoHxdxBqTbhc=; b=VTLJ8rt6Vs4mW3KUxdTMwfOfTAA1y2Rvpy+ty6ubtDkK/iK9PpbjtoqvgvBw7kKEFe x7wMfukwq186UO+CZdX6crIaBeNYKNbFEOFnct9aHFXvu1mDD3V4g8hwPr+baSOhgx82 TrsK5o53UxnDM3oX/eClkFpbI5jtbATWm63I/LsvQrL68FnauZaPJCj1HzuECAZgZyXE f55RHX5RRQo6f47w/EJE/WBTs4+r/1DIh3t0SVAVocGOBP6/Qzp1smA3zn70CXZ6VtHz +xhbAYaSTiwazh+/fLty75AnPSuhUy7D9XhtzN5eZAs1o5Y9Ux7wBQzgK5JrLNEGM59w FxQQ== X-Gm-Message-State: AOJu0YzPOeNaV6vcFu/WthbOzYKa+1O4L4IoL3EEOn0mMKZjeaoxINa9 UPuiQEjLk1Dd6PT/eklJEmupZ5Nb1vgBJG+dl5aeHe2oI0TyKOl+qOQRQtV0W8ZKc9tW32sOhV2 lFSr/t2kkxA== X-Gm-Gg: Acq92OEmzHCSQb3afM3JQkhvKOG/85XK2wMlDhP0JcPL3TXCsmdZluT2mm9JRHYdjZM si6DyzdxuqgdkNfpm2vnQjuNLR4SeJyCe1ilygEhfgICP7r1rYjK6St77sJgZyRdkwd5Dl/qIiH wFijLmvmaDgN9wE9N9UvazNp+9WhEqNZpgnFDqt9TNd4Eu9yZhh5a7Vtdh8X8iIyHKUpgjiBJ7X 2xjam4JzMMKPhRkrgKkOjyDxDsq+nkMsyJ2gboGJCOimGorrMplu7Fqb0q2eXbbgpLCovQG4MzP Yk5sqS/gl5Ck2zfcZdC4k9SzvTgYHJDbZOmnddCXwXknJaydMjeFodZSsnPwbK+h/xopseepxtT xLUrFnoU/ylLqJVLAKnrbNgyvlcRASADAoC41XW/lfiyn2GM4BNllhAPRjtnKavIEEtYpsXp1Eg FDcFI80a7Ijf7cG5Bf3vVP7CV6sN2l3K3DDwqKwBRfno9xPF9a4VUT2ybxZeq6X1gT3w== X-Received: by 2002:a05:6000:4388:b0:449:9aee:4581 with SMTP id ffacd0b85a97d-45ef6b2a726mr1711046f8f.12.1780084253181; Fri, 29 May 2026 12:50:53 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 08/17] accel/nvmm: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 21:49:30 +0200 Message-ID: <20260529194940.97143-9-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1780084286119154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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..2973e28122a 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 *cs) { 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:12 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=1780084333; cv=none; d=zohomail.com; s=zohoarc; b=VVBkG6u1Wsa3ji1VX2zgI+4unSwKBo5+hRpGntxodLwyRH1fQ8njstCk1+uP6UkADANm6fk66U9ykdQJUfQIz6C6N5Ugfq+vXa8qLrml2FErPDEKhnJ9kYJ/ds6huBU51b94k7y01Wui3cvyBtKyX2I/ullLH4uiUNX3KzScHwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084333; 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=6ACAuqBSNPM8qIatOkZfzbxNuahjvLF1jUZgEVx43Yg=; b=kMxGcbq3khX5Jpi4PlnMC7ZltB2yvMqBnE/UoOLsR1VuvkAIdjAzo45s2VK4KdFa2RZxEtz6QeYvMUymqdsd+2B4ZU78OrnrEdbXFQpRSvzJYId6Ca8RA9zmfS6EkJVzl+uOyL8V50bVTKVD3L4tjnFsChzRCIoZNMg8s3CwQjw= 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 1780084333910352.51594629058854; Fri, 29 May 2026 12:52:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3En-0007qf-AY; Fri, 29 May 2026 15:51:21 -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 1wT3Ec-0007dR-BW for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:10 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3EZ-0004sJ-KB for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:10 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4905e190c71so71002645e9.3 for ; Fri, 29 May 2026 12:51: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 ffacd0b85a97d-45ef35874b7sm5949931f8f.35.2026.05.29.12.50.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084261; x=1780689061; 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=6ACAuqBSNPM8qIatOkZfzbxNuahjvLF1jUZgEVx43Yg=; b=F4tSw1ladLWqW8eiIAtw7vWS00D3xiD1+0gnFUiDPD5RgiK++PHFPckIS9nn/RChDD fe3ZU+3/AW45ZuBBXhSnsubPKFfeUy8R+jVXwlUcJQWR8QWRfFo4GrXy0z4GOmCLrkpx wwQ7RS7V/olU3i3OhyyXuppwWKpQfnx5U3YapbgrBtv6ghS7tpDjof65khpop5BMLVOo fFHkShPbf38PUVkYkCyXAcEKifplSrvJqOvEzS0PGOfOlX0Y0XOHhkiOrdnvwQyg7YbC 4oA9o0PstdlJ2j5r7eev7K3lKSKYoDNLZlcuh8BPzUSd+GtBnUKcGBxXc8lIetg/ii8s tD7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084261; x=1780689061; 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=6ACAuqBSNPM8qIatOkZfzbxNuahjvLF1jUZgEVx43Yg=; b=GaoRrmJkZxsP2UH4DIJjteP9JgiwezG+L5TBfzaekTm9D1lmYQOl4aLgGYohaauY+b KYBcZz5DkrHkw+QhITBHNFPAu3KWyBAwhHKtQI8G4Xw9Z4FHnUZoo7vlJWSa/a4LVn5j 0JDu/1scfKx1VQln9+IhzkdPVApQgvpdzUC4dL23EjJMpP7HFm5TfKczvi71u/h1sPZV nDa8I+xrsO331ac40w3/iOZo1jLUvRB0RQLatrc+822VCBISdmVelxTYzTKjkCjKf4Mm LWfHaaJbKXlVwN6YvtoAZK6ylYc+nuKVRG+gGEMQVqNfOyYeoqwKLf1QAq45La7Nkbh/ u2Zw== X-Gm-Message-State: AOJu0YwceB9BlIbUaMXmW7jZEqTqhg52lfBhHs+aaU24KdHlCHOhgOPY e6XwBXD2nm7nGcK3WlnGuwfZiwlJNUnULgVmxx5vXNPiHamHIXtXDGx1wr3sHR/+/HC0U7VjyZv WNuFGCmc5jg== X-Gm-Gg: Acq92OEzKz0wQQ3iUAZiWEpGSIZWvy1O/ZbVdYxHsoD9KajEptWa0KkepwnTt4iTMEG XTNRLJFiGwIkpP6mN61NThyAIx6ycL6cHmMKa3SrwjC4DrQNQ3jLOgnEhaLL+z/BEb8g4mTtaSv 9dWniLPRA/LNqecGti841BsS9g00knMYYu1Q7f9w73Fa52mcuisvnBiPOx0tvpwsYQpr1bIAuQH rv+6UHSSy8yKi8RPHoROGxxE5/3D8CTSsuWgSCsgzqycgXv4OZhyhHbVuDUQ4m/HWeXTVQfZxK/ KzCUsX7Wi4t70dniP7tinZteqWHRhI3Vasay4lMmWDPznv/U6sh9fZKCfz70EMG0izFVTFtkx7N UTQQasIwsw+PKBDuXUN9prQEvN7BpMIVC1O9sr1bIqPUPz7PjpkkSmjevuEHqvbl4xu0+eifKYU cvLM2EwpiOb6jz7Ua4Eh24k+6KF99rfYXf6uPcHxgaYPur/q8Rjbd1miah2cahOnllkg== X-Received: by 2002:a05:600c:8b12:b0:490:2238:4021 with SMTP id 5b1f17b1804b1-490a29079a0mr18527745e9.8.1780084261187; Fri, 29 May 2026 12:51:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 09/17] accel/hvf: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 21:49:31 +0200 Message-ID: <20260529194940.97143-10-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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: 1780084336846154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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..536bcecd7d2 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 *cs) { 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:12 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=1780084341; cv=none; d=zohomail.com; s=zohoarc; b=UMDr/yG9ahDqx/80Au+hFa5TmSjxX+M979ZlN4X67jVegQD3Q3K03Kbk1RChMSu6r96ibRf0SGUkD0QdNCk7qmaZBmYUucdpENa+TDhew0H/kQZDHTTBA9OmpDWYTe5vrP3eCjLb55wutuEF3ppNso7FCSOecjeQ/qQ5PQS09gc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084341; 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=sWnhuAA8R9T9RYOGxNIaIDGmYbKBGKM0uEReh2pp44c=; b=mf+lrJA5QWOBlVJCAsnZIefmFdVFHSD0nlmUQ6c+86y6dr6MShO3itflrkgczLpAmAwn2c/Imiote3dg00lB6ui2ByRCrMY6as+G3z3mD5AEqG43x4HW0gw1MAHHyqZWS58YwH9bvmMUSFSmMCbDO+2BZqihOFCzGU8HL7NE7Bw= 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 1780084341410837.0045261157293; Fri, 29 May 2026 12:52:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Eq-0008Bg-2S; Fri, 29 May 2026 15:51:24 -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 1wT3Ej-0007qP-LR for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:19 -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 1wT3Ed-0004v1-Kt for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:16 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-45ef779c1c2so106892f8f.1 for ; Fri, 29 May 2026 12:51: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 ffacd0b85a97d-45ef35601d7sm8034142f8f.28.2026.05.29.12.51.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084269; x=1780689069; 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=sWnhuAA8R9T9RYOGxNIaIDGmYbKBGKM0uEReh2pp44c=; b=Rma/1w3mqhw9ks4KbjdJ17RK18ZK5WjU8vjYeNgql2CZE5qgF3Z3pSnhne3cFccsqG CauzJzXk0QvDr0gSheUosi2umDXFzVL6O5cDNGZSDUSHL6afbj1hHRqk2bW181jvkEKH MxMqAKRps/fjOgC1YQY7vsq+zL0JNsV3CqR0DR6HwyBTe+VTu4UNBnF+1wQTHAx4sRXA RKaigv0raqaf+qhKSnL0BH6HLb3o89LUWik30F5G3Fic/4Am1AxKzfH0mxM0/4isypY+ LRoAVv1YYA0INgqtnaJ0fOYERFSxyatn+OfGnvTR7XRKbXRmOrI0w66uTErvn6Y3pNMN y6eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084269; x=1780689069; 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=sWnhuAA8R9T9RYOGxNIaIDGmYbKBGKM0uEReh2pp44c=; b=nZEWhnBa1oLLY+sHNevK+moAvZSWHgodEMTIFojRTlbbfS2Sj5/AVs/+MTgNA7TDa3 sKmTeR/0i289ufDDsJddpz1iutTCMlL7j/Tv/C2u5VH3B67QDdMkwGnFmmdYrypsXEzl TG3YlmyKkDKafZoOrrMOWLD+kEdb19FW4ZDdu6fj18eqV5uQz0yyaUPsux/gO0Rr4LQY Y576QAKAfKNiDDvPKU54oOBdqBINCGe2cJdtAU7kiC1V/S6yfu/CT+nyfWsUReH1tyIz XhKI0vjLZVOysZ0nwZ4pOqfiN3l1LniASyv66XjVdNQaWWuhyoTINHKap2v4uEBBaMEd xI0A== X-Gm-Message-State: AOJu0YywuB+/4uhmIBrMwpE1qcP9LNQJsQOEVb9NgOsnxcQNlVNJ1XVW IFoS4QNKOP5RS23srBkxGBcuSAhFXW9vYl54OcKKCfGizR/ok+Ur8uJ2viH2dUvBV6AGXsOpVBa gvgR6IAz6pw== X-Gm-Gg: Acq92OFH3J49liX9W43WcwWnrhfLieP5LCQ08ZE/FhQUt1rHVRpmqkZm9CW4Qi3K/F3 K1Ejm1gk00jqDb6EDeKQPXUKjD+CmqL5XZjaTtxKgvXgILM33FXN+W5GdSNv35nUOlpJcqV6zuF 3XG1EBVawZazy6RTuUjkvZGxmxVUWowOctHxWWR5Rc+IslAxq+DBIFO3wary3u5Zzy6mnSCMeri Y++eATb5/HnVdEiEvtOvLutuTygSkiycQYPzOHm1/AvMDPSj+YX9K0HlvyPf/rQhT6nwTHh22lW lUlxrF2EHego9+9lRBdAacjwSfSKkRSqtWqCORM6KzM6WwbMaMFplwbDdx0i2TjbOj8xVIPXmzZ dSQ1EZDLDDpffbcviSOX6pNHKddCecBlnuJjq6szpIN370mohaAF/wvMWBuGLKsSOf7pCxxeNLw 3+QuQETQpPYkU+V26rknKjUBs1o7vOYVEO9ok83U5nYnxF9YgWNzABkZZxTnZlWyPCJg== X-Received: by 2002:a05:6000:4610:b0:45e:db3b:921d with SMTP id ffacd0b85a97d-45ef6b67882mr2410650f8f.31.1780084269413; Fri, 29 May 2026 12:51:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 10/17] accel/kvm: Convert AccelCPUClass -> AccelOpsClass::cpu_instance_init Date: Fri, 29 May 2026 21:49:32 +0200 Message-ID: <20260529194940.97143-11-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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=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: 1780084342968154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/system/kvm.h | 1 + accel/kvm/kvm-accel-ops.c | 1 + target/arm/kvm.c | 4 ++++ target/i386/kvm/kvm-cpu.c | 22 +--------------------- target/loongarch/kvm/kvm.c | 4 ++++ target/ppc/kvm.c | 4 ++++ target/riscv/kvm/kvm-cpu.c | 23 +---------------------- target/s390x/kvm/kvm.c | 4 ++++ 8 files changed, 20 insertions(+), 43 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index cb077d6d863..a249f076763 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -223,6 +223,7 @@ void kvm_irqchip_add_change_notifier(Notifier *n); void kvm_irqchip_remove_change_notifier(Notifier *n); void kvm_irqchip_change_notify(void); =20 +void kvm_arch_cpu_instance_init(CPUState *cpu); bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp); =20 #ifdef COMPILING_PER_TARGET diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 4e7e3039208..edad3c1acea 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_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/arm/kvm.c b/target/arm/kvm.c index 22bd924a399..0f1a98b430f 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -1783,6 +1783,10 @@ void kvm_arch_accel_class_init(ObjectClass *oc) "Eager Page Split chunk size for hugepages. (default: 0, disabled)= "); } =20 +void kvm_arch_cpu_instance_init(CPUState *cpu) +{ +} + bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) { return true; 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/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index ec4c05006c6..167fdd515be 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -1496,6 +1496,10 @@ void kvm_arch_accel_class_init(ObjectClass *oc) { } =20 +void kvm_arch_cpu_instance_init(CPUState *cpu) +{ +} + bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) { return true; diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 013f5e852e1..894962d509f 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2352,6 +2352,10 @@ static void alter_insns(uint64_t *word, uint64_t fla= gs, bool on) } } =20 +void kvm_arch_cpu_instance_init(CPUState *cpu) +{ +} + bool kvm_arch_cpu_realize(CPUState *cs, Error **errp) { int ret; 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, diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 1c259652925..46730e72a92 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -2612,6 +2612,10 @@ void kvm_arch_accel_class_init(ObjectClass *oc) { } =20 +void kvm_arch_cpu_instance_init(CPUState *cpu) +{ +} + bool kvm_arch_cpu_realize(CPUState *cpu, Error **errp) { return true; --=20 2.53.0 From nobody Sat May 30 17:44:12 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=1780084330; cv=none; d=zohomail.com; s=zohoarc; b=iNJ9R1p70rqPVMEhADixfJKRrRX+7DF9ZKd+wy8s+puC8iY+AOXgzNUPQff0b9cVN6QPzhyfwrh2F+9+jk6ksSBvNknzxyKoMTSfQ8H5WJsn86FDJz4Kd/V2vezFKo+Uny+3C2e+y20R8ktcoK2en6HDaWac3hlEt7fPFVZoVqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084330; 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=xN08zAfKjwU0dgbBSed5OKjgOJn32PYWdXU4H33xVTk=; b=d/bJrkWbRwczuFLoPRVQSMXW/64ZwYcic1iW5+nZKt5X+nPyN1JdwwUlx1iJGOI9I6z19mKthlogHhIMRg8138KMHxbfav387OiKqm7wH4cbSowKGOnG0XtdsLqzd9u6vi2QvYL1pvbucwtxTVCcR6mJHgZSxxqV03rL79mul64= 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 1780084330151444.57162200553773; Fri, 29 May 2026 12:52:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Er-0008Jy-4Z; Fri, 29 May 2026 15:51: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 1wT3En-0007u4-L3 for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:21 -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 1wT3El-0004xQ-CD for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:21 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-45eedcdaeaaso1374853f8f.3 for ; Fri, 29 May 2026 12:51:18 -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-45ef34bcc30sm5738817f8f.12.2026.05.29.12.51.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084277; x=1780689077; 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=xN08zAfKjwU0dgbBSed5OKjgOJn32PYWdXU4H33xVTk=; b=Twx78MLvbHTNBgn+nVgvrdi0XaxIPzijUJdFqzfLIowrtbO0VxwLS2bqFsCX4J27gn 1Tcj5GM6bX//b2Vyy5AG+M88jAzfzlXPwGnQPINFjlC150sMZxpa4PPjaTT9OkQTrqnc PZ73BH9X4IErGp2CFjHEuId8B/ZmARRq/5yRxEGtsF7cV+C3CIdyFJf6MjeNRddP5kgD Tn/bHD9pNq/XAkG9twpBFMEcrgoGyAv2CZlL+4TIrZFph3kkXSk4aj3rMzLhOoh7ecve +9aAwu96L0HBX2xpTiIG41lw3rECCCTzqpIU/qhAsnpYQZyehWYYiKPNuY7ar+5bdeeO hUGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084277; x=1780689077; 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=xN08zAfKjwU0dgbBSed5OKjgOJn32PYWdXU4H33xVTk=; b=cXBd7082uViA/QvwYen8Vhr8pOmW+N17ZyfYh0Bp2TU5PBg28+j6Z9oi1sS2MXkcYP Iph+qyFKYbY1XBy9gq1wajmG17LTmwWCZI+uthWnKcjmp6ITxce+/vzHdYhmwMTcoLEr DLtfoshUg6mPDYvZ3P3RspeIQk/y65pr1VXxa5l9Oj7UBMwWhK9O27M9B5s3448j5P2x xhcjGcgOOP1eIxflqGdzb/tNg19fPexJ381n6jj3mT3I1TAdIrTlrrEQRoh/QJjZwG/b tU0T3EbBIWmUOskRs2UL5kOFcEiI7MS3Y3Nl51XSpNHNiYN772wnMVw4IHEgaX056Xex /fWQ== X-Gm-Message-State: AOJu0YwupGgF6k9rQar1EqoJQ8gh6r7KTYes25KndPEDo6ipQ1/5YvDf +NWiETnvUIiQT89ikrNlFqobejlftARyD1WVs3FiBitv4w1FSuOZe1GXjEF6dpDUh18WFlkMpeh kHjRqm4p4uQ== X-Gm-Gg: Acq92OHxhIemsHk2CNoT4qLsgdv4BAfvnqMq9TkdvJcLIK7G7yctEmU2BNllvUNKCDh 6expBrKkaGFE0GxDFad21fNmh8NIiJY95dZok2eHVKxB6Nt3icI3aazwIQBJzQp72ZvEmlmVEur ZR1Wg8bmgIyctXfZoYKjc640H5jKBhnSdQq+UlTh7sUqYQ1D9glWbysoG/Nz+5McP+VtOHjaswk UCeu5MVGTFnAo/VISbSP8uaJ27U3GRQ19f8VehV4hm1V3F1P2VKsaXeGmoCM+R3i9fQCTVUzYfU fxtliNgiKSFaGSaKGQC6NMvRBfUbWp3wjeGCMuEy+bBEOdTrFQ9BdczmRBw3An2i0qa6SYqU41d BtACuG6P+os59dskcVwrY9Angtx7gFQscF3agOoaMuUqtMBAKtXa5xnQMtsxFbQnLho9qPog0Y0 nvlBSlj/+z1AI1gmLw39lcbwaIfKrHaqvAiuZKjpttgvHoTut97Ie3uLIx9NpeCcYOkPzUGJt5Y Nl5 X-Received: by 2002:adf:ed43:0:b0:43d:7dcf:ae26 with SMTP id ffacd0b85a97d-45ef6b78552mr1840866f8f.34.1780084277341; Fri, 29 May 2026 12:51:17 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 11/17] accel/tcg: Convert AccelCPUClass -> new TCGCPUOps::cpu_instance_init Date: Fri, 29 May 2026 21:49:33 +0200 Message-ID: <20260529194940.97143-12-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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=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: 1780084332873154100 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084368; cv=none; d=zohomail.com; s=zohoarc; b=TIlGZiv9DWPttFsaeehZv6RTjAhJ3A8CwGaJGmshHCaWhPFCzyvIY/ZcG5cRJxe4J80i4zqk94/0wZDXLsmW6BxvoThOXV6gl3p+vjd2miO1TNn3+Z/6hmxLKvisM4R8DTObsfGHEahViXm0yUVdAOd+yj+hAw+oGTy68fZerHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084368; 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=ayZcEqBv6LCuc8yFGoECVuWb6aDn4koW4Fzg+F8BkqA=; b=e/TrN7BMlVQRPzq1b/vq6jQC+0eFwITY6zNEAJzLdm38tFXz7WjuFsOhONdDUzTBEW57KiOoIiBctrM78G9OQDJQMvB+D3pV1rKbGaEs/YR/bNyvLZiDVw4vSjMKjAl4t5A3UNQGVN45vu0lI2KpyKxitvqkmkCoiKPqvTFbv0o= 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 178008436863825.575554489798378; Fri, 29 May 2026 12:52:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Ew-0000U3-BK; Fri, 29 May 2026 15:51: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 1wT3Eu-0000Ks-RS for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:28 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3Et-00052v-0C for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:28 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-45ef779c1c2so107118f8f.1 for ; Fri, 29 May 2026 12:51:26 -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-45ef356b129sm7392104f8f.32.2026.05.29.12.51.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084285; x=1780689085; 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=ayZcEqBv6LCuc8yFGoECVuWb6aDn4koW4Fzg+F8BkqA=; b=lf1i1W98ePwM6i5JgwgMRoQaAlT9yaYcOtpQp5Gaw2RHREd1Tn6DaYN8HYS+JfwPKZ M0MW6lEeminzCUOXy+Q9NykGcrINOxkBe//2tEfBkTAawnOCViLZUM2vp6bioAsKXG0B Kmw2y2Zybn4v+uyENKHt+LMmh+cB3MAfWcIiS1xNbzBn3zCbVIR33o1cHZ1/hZGk+dpR r+wsazpoA+RaAP2TCE0VX8uxUwXFxXQ/Ddm4R40tKyHgcY3CTutHKr1yuxFWBBzHzJPA 60u30I45CJ2IDX+gJD6CHbsSBLvc/zDmzIDWNH4bVXTPsTnqIw1m/7b/McCYpUVyl9+7 wjxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084285; x=1780689085; 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=ayZcEqBv6LCuc8yFGoECVuWb6aDn4koW4Fzg+F8BkqA=; b=ot80yeeI+0LmedLfURu2hAUAqahIQcBJ3IiC1dRS+PZo+dDkrL150L+xQrIRWq9OSR FDaDHqO2Pe/ZDnFXCKUzLl5jD2bof5RsPT5p4d2DEZNrdG0ON13eqXMb6uaPdq1yh25D xhSbg6gmN9dE7iwggN3VR1Xw1urG7WvRrY5Se/1imIuwfgEgzEflloRudBcmMRZg+FZR COjWNLQURegce4O4xlHvfsONGg8zHsbtTbctlVWpF5aLu8X+84Aw0VToJDlxBjBTeCx0 2zdIVnpUe6T0naaJ7OaJivkZzpQhVQ099xKgEycny2roV4B2sag3zweP52v658/+bsaQ CE9A== X-Gm-Message-State: AOJu0Yz8r//47QJbT8nXkPbZnI3lAjdFqmXqjMo7fuJNexSAXI/2s6L2 HZCv+0PcwokDPm/2cWuGWzay9QFVTN/VaDRrArrHsxZVjBSSaPGcCqh2s/L3mNZmzFtsl/V5Etv QElzqHt1WtQ== X-Gm-Gg: Acq92OG4a7LQA2Yktj2Hg1yWF175krWqEJkE5eqe56DuNmWg40c73lhrGYi9aCJbxT/ 14VOkoFv8Ma/odeuIZ2yU8dd3eF9A8K+9w20+eTMxmH+lGGDKIqG0Y7gKGPU9rva+ZVeqv4T5Fs 5HEgwtsb2mVYtrhlg+m3NuDmO0AjcX2uYZ/7TJ0FPs7DA4aU2QMJ2Bkj1JF7DWNsEmOQkJ3TO8D FuImfKnFsjSJC/E8WUfs/eMPs++QU7grkMqOM6hXhQJHKxCEw1JFo7KEX5Me7AOiRk3ROav3N/F BQg/hrDPByemu/dYtifae77xDs1VGhIVZ5eS4QxhZfGdusGntlOpvPf+xXGIyFuAsEHG28d4TJT +swRnEP6hO77QQ/oo9ryigNp9sRbPYeFfo4hHr790ewtWvu+LCNbXKk2IOXy7V6ixkkDrgQX5l3 V7YrMLNVwN8EONYWxIpSttijdfCHERXm129GqfPdeCnCODF+0NiQ0iMtrj/SFOTYQnTA== X-Received: by 2002:adf:ed43:0:b0:43d:7dcf:ae26 with SMTP id ffacd0b85a97d-45ef6b78552mr1841372f8f.34.1780084285470; Fri, 29 May 2026 12:51:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 12/17] accel: Remove AccelCPUClass::cpu_instance_init() Date: Fri, 29 May 2026 21:49:34 +0200 Message-ID: <20260529194940.97143-13-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: 1780084371340154100 We removed all implementations: remove as dead code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084406; cv=none; d=zohomail.com; s=zohoarc; b=PXrnKS+7hXFwJSLnD302rjntDVn2Zi6zLrICAcuwJx9r4mKn6pFYO6GrrxcmUEpFO/cAIUUnGkDrHVFU+CQNX6lCHo0syTjCtAH5em8YKzmT8BTZzLnw4NxLqj2eLuoFCutm7jrVC3w/eM8ZHeD8DEvsuwt8XC7DD4txyPpJF8I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084406; 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=riKUeVRs9ub8yVsjePlaRkCop7k1tSoe41wdpPTuHRg=; b=BZ8iLaR2eAFWXaexyYCbtVBibtVm+daPqj2s8GklwEc0JGV8Q0Y4JrO+Q26sI+IdFkh2oK7cd0Y16dvl101jZ/1FZ6ERunV/iazBXSW6L6sLcBTh2WTyA5HL0nlM/fVJOje0XQe8ZeF8CTPR15UaF1n7fmo5PeOdT0Z4QIwRuMI= 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 178008440660434.048844688750705; Fri, 29 May 2026 12:53:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3FK-0001KC-4x; Fri, 29 May 2026 15:51: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 1wT3F7-000124-Ci for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:42 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3F4-00057G-B9 for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:41 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-49042aeeb75so97412875e9.1 for ; Fri, 29 May 2026 12:51:34 -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-45ef34a065esm6076264f8f.5.2026.05.29.12.51.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084293; x=1780689093; 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=riKUeVRs9ub8yVsjePlaRkCop7k1tSoe41wdpPTuHRg=; b=J8YiUfeS+csfozfvOt/kjA7E6JThQhNB4u+OO9yaruoDI14f2aaH4GCwiXNSppSN1F 0f1fsihc8+cIADYtg4fTDCB2UNkvpVowcbUd5+TjRzBWmpU3xrbqp03VyeIR4zGi7uXj UIsfnIfL17627BlhruzUggQWJfykt461yBNpO8Yc88jweg5azLeFDX1KNp+oyb40YNi1 T/q6K49bZei+rpZ1lejIPi3g989BOYWRW16MOGVLN91lj90VuVSO/+jpqFJxLUJ8UMyl Ihb5aIzxq5p8GVYavdgmL4ORmRdIVg/xuSK3CLG69MKKfI7082X95UT8LeLpmMvze8rC 0tFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084293; x=1780689093; 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=riKUeVRs9ub8yVsjePlaRkCop7k1tSoe41wdpPTuHRg=; b=O6gSBL14bjI0tmLaGRAvKUyNUC4OWsRtcxm8uiDkz3Arc226QgeM4kbLn76N4FI+jF tk9JUmiSW+qCol/+06n4UaPI74FZjnshjgcDE5aVSjHyVn602N8ZFDVMTdncofrDCU8K Orw0pJl900sVQimUzjh/N+QRcTe7uLTBC5gAu99oDNGxcGjSB6c9KxDMnluGnb/pCKzj Wrw+KhHPPS8QwjKYqeXM+ri1kvvZyEdlxufxJRL7+oaKV4l8t+KIBUmOgyavzcpbdrS8 0lEsclyUj+nTgzTMQtgNA3SVYUhzeOK3n8hh/TKj+zd8xSjKvDfSa09xxUt0zjXDVHW+ wwOQ== X-Gm-Message-State: AOJu0YyeKF1YQVKLnnknMH9udTGsbTCvVZ7gVLb42z6QhTJDmXVOXKhn U+5DMESzkCVxWmK3unlT2ktyZEARt0i8RTDaCLUXB5tKyNF4/COWBYHXcKmZn8Pg9eA++KHI2Zt c7/FJ8d62ng== X-Gm-Gg: Acq92OHFOjWdMrEXI0+777TQd6478s4zO4E1iT30naUNSebGej2egy2oSSk2yVBAPxF 5NND0EC5qIs2SvyZLb7nizEJTuI4FfoE3CVRO1lA76rA+fLjrXkuq8Dke/nHCLEkfkfM96YgE5H qN3eOKKoKcQRr9gKU1PEWsh1QF3hpCphMnyCORfbMkB9QbrdbaHQqE33W96zQx964fI/m+NmZ5r 9u+pCBsUoIlooZRhX6nTVxv288WcFeSvgPyPA9IbBuTRN1oLaVQXX2Blj9gcpd1w9AZYfaXDxtb 0b/YaPSizjzpGH+w+h9pg2l2zw1bpkxDeRL7+I2GkwUKHUcrEazFALPL4DxNaLC3jPMI+WVlFrO DEUsR8VDcU6ncLCnu7iRL5Fufz7dc8tkkNBGKsWT3Xde5IaFAdJet1x8+3eH4hhGBUBgMnnohHu o1F6SeK9No4bqctOi1KdrFcNbvhhRy9yYlMHts0/T+L9wbf/CqxHxOglDrH1OW8YZ5cQ== X-Received: by 2002:a05:600c:4fc4:b0:490:6889:202 with SMTP id 5b1f17b1804b1-490a29639e6mr15945915e9.29.1780084293478; Fri, 29 May 2026 12:51:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 13/17] accel/tcg: Convert AccelCPUClass -> new TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 21:49:35 +0200 Message-ID: <20260529194940.97143-14-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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: 1780084407942158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084371; cv=none; d=zohomail.com; s=zohoarc; b=BmEQhlS8yQcbkvgew90IzHlc/tpZnSn21nvrbWNIR4XURGX50pA7h+La4TKV0MCagJYwKowfXBZJyWWD9c1rFpPyTzbfeGP8fxwT+CgIEwDXMH/oAIQpWlcEVo1yX3hFyJlRSwutHQ3e3ZjI1j6Z0xsBbAulCYIDMxuOcs/WsjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084371; 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=WnMiDonv1YO14rMlbhW2kVzk+7R9nLq/lyljZBG8qv0=; b=Gojh7RDoaTykowgbRU6S9WDN4nsMx8BXle0fZXd0/KHV0h4TmxHR1oYglZUwpCjaNjWuKtfdjM77HCg/+xOZ0F/y33rmlA0gPjiS8Em9zlnb5GE2dIiPXvz0H38UAZlcPv49Jnin2fFuDuSq90P3UV2MiADtMmJJHleDaRagPao= 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 1780084371048158.72403916278995; Fri, 29 May 2026 12:52:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3FX-0001dJ-WE; Fri, 29 May 2026 15:52:08 -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 1wT3FC-0001EV-Nz for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:49 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3F9-00059H-1U for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:46 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4903d730b1fso74470095e9.2 for ; Fri, 29 May 2026 12:51:42 -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-4909c12359bsm25514985e9.4.2026.05.29.12.51.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084301; x=1780689101; 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=WnMiDonv1YO14rMlbhW2kVzk+7R9nLq/lyljZBG8qv0=; b=TJseCz0/dbwKmJWYGurhwcJj9Jw6QFbgL1bMibMWsagFEh2j866WlsFc1cJ8ZwPycS M9PARSwQ/NF3Vu4N8XBZBpn52L4aAhfL4PyI4dRRQ++o/9YXM+LnctVrK9mH9M8K/Xq3 vR8cDpntIwF3vrAKoiKd4euVsGfwrDWvj+jhDpJ8XdjSAH7TlQ0r55LMS26YaZJazp9R iFtjuJxqjvXQc+OgBQEeFIeiiT2/QY9vzdjEwZm34WxOaoRqzm2lTc2gx5oT88A9n8qE jEdXRX4eeOSolMNjD81hgxX7XjidN3wvym/vJCeQFpPxvwqwcDVRMQc+32faHLVsCE7T l1mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084301; x=1780689101; 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=WnMiDonv1YO14rMlbhW2kVzk+7R9nLq/lyljZBG8qv0=; b=YHAmDlLVuaZHX4O+6UGg6Ow+vQgzi9t1ighnGKkUiPV0jiSOn9Dy9T57Wyo0cbo0h1 n1LwWm6A51zclRgo5h3aCN7V63RsR6KSxbMp6nwSJAqJvud3Hxj4oO4cWGhyiX02LPTp tfEAqIEAuMg9J0ymv0QyIoLOOmDH5N389Gor5CuC4es+Y3V0nrvbw7i10kqPEfK3bD2q lKxNozGW7viXANq/ApuIH+iai1uJrUv0nhnbN5MOejNHyQBven/XnekbyhryeWO9Zqig N+7n8FuePyjzgnBSszuKDJnARjNULwA4k0PqCbq3K86bniHbTY6MLkLeo5yoZnopi2s+ KyaQ== X-Gm-Message-State: AOJu0Yxp4Oo0ThpFTBDNg+3gY7oifn6VGWQ94QtqiHiebR1H5DJKjIlT LVeoc3b9bBB5MrY0UswZjhHI+NtW787Wwkex/FT98JLTOra7Pal5yF04gLt4pbfSrqPxU51p/fi 837ZiuoOtpg== X-Gm-Gg: Acq92OHLLeQS53FIH4r+Vs0ZUJhRfK/7/CL07ayl6zrhlBhK9SkAI4zp/0q/26d2b8S hTzI0eY11qkDoGg7vL4llP5VtvzAsAbOs/MdoIPzC5S4N26Ceab0+mVVZUwU1pS4MiuVIMhrAya kn51BWdxuQC3XrAAU4e4GGUcvKGlxsIEYaI4sYw+PSlZCsWlfADix4KnuYnS5/5Dx3TBKm97iEj uvNIv6BzJoC0P7CH8PbBmOVrx3ksURBaC3O7m5HuXEiGRxk0ATRPESEmlQKHN9n9zhBB0QDFULA oz+OgGHdbCu4kW5KGKfM70iTEelcQiWIM6hSzsk+3hne63pYJ97MYIlfG2sM5ad41irDPW7jSTC NTsgbkTlLG7RFXHyT2XlNTVjnx8T3HUg7KyIwl1YY1VCyBTyw/cdb7rV3D6nFUR9ebIWauFXhg3 GJ75Zic63YXA+9n6vAm2p7hKXjhZsmfaW37kHUBKq7DBJpBmMwfaYDPkL+TZ1oE57gHA== X-Received: by 2002:a05:600d:848a:b0:490:58ef:cea7 with SMTP id 5b1f17b1804b1-490a293dcefmr12453125e9.22.1780084301545; Fri, 29 May 2026 12:51:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 14/17] accel/tcg: Convert X86 AccelCPUClass -> TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 21:49:36 +0200 Message-ID: <20260529194940.97143-15-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: 1780084371765158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084405; cv=none; d=zohomail.com; s=zohoarc; b=MjKZs2NNfJwJ3MsbEqVxE+l+HwRsuEsgbueL1mmZ6odRbjJLYxBZplS+Qb2CqxWlF583yW7qruT6P9UGm7qkOuQ+wu0dCUq+L+/TrfVn8gZ+fuYIdRekTFws4t0rkH6TmIr72IR8tS+0OZGDuLvryr38puXIqgdLkb64Fyd9H+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084405; 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=g/8lHSi3EP+6l9bUS/wKfhybD6uSaQVMlqXN20XnJKM=; b=F+sTuB0FtY7MhWtQlMXBwoDqp0LAb8+EA+MtozYLhElDSxyLxjKYYn69azNuGU5BQG0ObtTa5qt9n+sJfFHgGknhgiUzi29oEhSbj1TRFgmke0C3WMA+26NCv09sgOc9WbtqhnjDv0i5h9OuKbumyAJI5fsIC8FrYm3i0u9p0Zg= 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 1780084405178847.6579902842003; Fri, 29 May 2026 12:53:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3FY-0001h8-9u; Fri, 29 May 2026 15:52:08 -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 1wT3FK-0001Px-L2 for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:56 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3FH-0005Au-OR for qemu-devel@nongnu.org; Fri, 29 May 2026 15:51:54 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so147884515e9.0 for ; Fri, 29 May 2026 12:51:50 -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-4909d68980csm69622085e9.1.2026.05.29.12.51.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084310; x=1780689110; 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=g/8lHSi3EP+6l9bUS/wKfhybD6uSaQVMlqXN20XnJKM=; b=R01vJtRvTg7X6pKqlCaMyVX0ZGOfT4oUTJWOXwPf53GQxzI03X40yZKmuYUOGqPswS PtkXbMffkBtVmN29OEOGzDZf0UERIR6PGyLXL0hZuN4AGims9iyXiBaedN9tcCztkh3+ z26yeawI3heeSjeG584JUO7SsQY5xLvtNc225DSXlg7w/6fKUlSJ/rA2Neepfvq28NTc iSZ65CHVg7Aatzbnp5qWpfZnWGkgqsGAh1/jSpJQbSeYhDgQDddxxeslktULWh4m9feG yzWVnq+8AbsC6pzKBj5itlFbuWB844g0K9ul+0tz9wNiCF+zqtM8Zka+9f13/0k1M+Zv T7og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084310; x=1780689110; 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=g/8lHSi3EP+6l9bUS/wKfhybD6uSaQVMlqXN20XnJKM=; b=qcoSEeGVf2mQgPCTxwj+sSdalUnvy8mZ35VxrRFLyJXCn1ZIxhpda2RBWVMmEqXPtu 4E1IJ31e5nt/vP1nKs74rg7D+4jpRPk9Guk2i5bgCwi4lkXd1EVkiDV6uvmrfWtniNwG o+mihQcnZuusuMIPjUYxe5qYqA0wPZThgnuZLVSCKzTUERRDdqYxRcXzfQByfJLY9v6C uyshcfWKUZOerxMahS62ieJHBxz2V8STCA9Nhz/bG6BVrUtDZyBRbUg3zpkEwo48JN7U lpXSIB1IUPvSFQhg0GGaRO49DtYsiLiY8H9VTHvhgPqejIf8ex8mQLXFcM+STi+h6wCY KKJQ== X-Gm-Message-State: AOJu0Ywc3p9gjyf+w3bjcITNje1yYadHJ9x6V/Eo/hh47nYUV8Z8bat8 rDV/nUsEpKyFf7RzmY3386TKwO5JeE2gSpA2HvafP5CpnCAvApsTcfii9T6w+7muugWkF3X4Bor gpiFZAbnF3Q== X-Gm-Gg: Acq92OGQ0ARt2JbeAFg/QDp5kEpcSeLkRXZzarFw06MPBsJh49LImjhcGQ/Fu9wr4py rHyBt5cVlZpXdROzFToFKlzjaXiSEr7jXpjNdtuojAeSrIBM9RHi/FKiO2+FNP7HV444sPyvlPE vlWxW/rAJ3G6P1Qkim8y0kZICBYpgtIlS9wtHqeva8Jdm0alLVVzbtuP4lUxCXAGgfQX6om6MSY rls266+IlLc/Es3kmvBYOisXfM9DrMNzYU1L22noM0sIZfz3yLKX5cl18ycroM7z8POQeq3gFF9 9lEMR9pEdC+xkWc/BBLCi5GfnIG4j76AIS8tBJ/BUsk8G9MJgRtogz41eOMvmRcYyyzHGZMYLe7 DK6AfCDgJaGkRBiWf2mPCH1cV4qRZVYvhp5sbyV/MCcGBJLKq0pR4gGuaIC7bSeTfmizEo3MQJ1 agsmp+klfUA8XZB7L1C5SvTCf1KyChTtAfeMUdLFfk4ySrfnFmDGb6TwY6hoGTEPNmwA== X-Received: by 2002:a05:600c:4f08:b0:490:5149:a242 with SMTP id 5b1f17b1804b1-490a290d4f9mr16749005e9.5.1780084309682; Fri, 29 May 2026 12:51:49 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 15/17] accel/tcg: Convert RISCV AccelCPUClass -> TCGCPUOps::cpu_realize Date: Fri, 29 May 2026 21:49:37 +0200 Message-ID: <20260529194940.97143-16-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: 1780084405945158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084392; cv=none; d=zohomail.com; s=zohoarc; b=cVcsueAz9VRB6pA2r0AjVpoxQF/Kb0B7jsNN2I5ZQdxgnr/D/KmB2nNp2G0Rt2jl/LF4BWAcGmVoLd5JDicuMyXMpmA0BKAbrtJMxAmjAuzIVm46UgoLhEJ8luVdm0qRAA5k4Q7vNqA87jSDUooRLlpm/QJ7zblrpYM2gTZfx3k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084392; 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=Q7VQCJEvvCPJhqeFVLwDWN0jMeOhEhmoHcnTRqEwJrI=; b=QNDIv1W1w14irZpZrNdOvFOrQZAW3eZ64JUXDoTALcyVEehzqq9IiD23hCiCPHj2E8H8uJ/hdzlxw9xhdwujRz1RSPTfw9OXgq0Am3543ZInUckKuvjVKhYjpE69R9wGoNHrskZH0JTRfJwNlwR4Fx/YxmIWzVmwxJcbyRZBq+4= 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 1780084392370655.2660238584449; Fri, 29 May 2026 12:53:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Fc-0002Cv-JA; Fri, 29 May 2026 15:52:12 -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 1wT3FX-0001d0-LQ for qemu-devel@nongnu.org; Fri, 29 May 2026 15:52:07 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3FP-0005Di-UF for qemu-devel@nongnu.org; Fri, 29 May 2026 15:52:02 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4891b0786beso95443015e9.1 for ; Fri, 29 May 2026 12:51:58 -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-4909d68b853sm62908705e9.3.2026.05.29.12.51.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084318; x=1780689118; 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=Q7VQCJEvvCPJhqeFVLwDWN0jMeOhEhmoHcnTRqEwJrI=; b=knX5VHM+wAgvJ34ztiGL8xuEEkhxiO5Cv+80ubUmk/OXKvJnN3zAq2u7eaCJMz8lT/ 0gVO4sduPX+4oFR+Oej2umc3F0DR1Xt+/weAXlXV8bZEqi7Pp/+EFPejMFaLJCXrHSfk 1zBoryJXtEKXT6tlis56OZwfFUiNrfDg8AZ7e5rRxOQrD2L1Z7ZPdxLz4IPzJ6u/HTdW X/ND1D3hT+/1jraaaiEiIbSB7k1aqEo/aBqH76vMWTGxtHKgBX2HH5aMhfSuIpBzlaXm yJRH4yqTKx3lXfdfJL2jaN3pQSDalCv65hr/wuvD1GAUltnaGvVESTmTJg5oxSYDHNNY 0f0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084318; x=1780689118; 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=Q7VQCJEvvCPJhqeFVLwDWN0jMeOhEhmoHcnTRqEwJrI=; b=nSiWMzX9h+VuxPbyhquOTY9DDYsiwZAKbLK8aDPtI+d23WekMR2k9aaWngJVSLkIbK 66CeffNnGcweRTgBTlp5WhZXhqfPK/8Ki8QUkaX7n35vyvEkeiXvoNa6uOiJSIQcv6ps rA4VFWCyV7JkRsXbnh9gdi/o4Z8aJns1XQAHgviF5hNu2b0cULD7tVoVz7d9f18/d7UD sN3cKl1a3nVbkSeSg15oh9qT6+frC2bMoPreVktu+O/hKdTuRsIFGf/JKNpvPdYNQJ5Z owo5JwLXCRNN012IYxM72O9fA2X3lLWCbj2Wj+S1za7iCH2tydFhPoKchoqHSSK5JbiU Fakg== X-Gm-Message-State: AOJu0YzwBfgA8jc/e7qd4dM67JhgSstGytWqWbBoxmki9XLBtoehUw9M uLJtr2IgyUAkD2ktPlKocda18I2fafurX+s+eTKh9q7pB0lkoZJzQhL/ato/PdaQMFoOXfDz4IS PYXnGFglQ1Q== X-Gm-Gg: Acq92OENNY0NVWuUpr9gkxSmJzZ4y3/i6lUrhKA8aEnB0+OebAOtYVHL9hYti4CEogK /P9x4HcTA08eLvwaHOHG6ucz0F7S3coDf/PnK1CCo9QNdFIaQ795i65AGI3H+J8o+clYSM1W4SC oMeVGThQSusiOm3VbCzEOtSjaTlVYQHRT2Nij8lEVKXfd7Nxm0gWYXiy2QwreRyGYe7IMxLzhsU EYi22B+I3Uh2nkTQNbOuEltqUxikNEt4FfhP4P70XcuybcsRzpybdLUpVvOil0ToVij/CJs3Xso n3zsQyrUtNPTM0X7ipRox1ZFctiFr6L2OQbb+mB2vMWBDnZu+z4dqywNxsRTSlZeMZ7mCuo7AoA YX56hG4ZAD/j0WjXkg8ZWvQv7M9T3vvVubZRDQis+xbP1HEoDTcQ+Oe4ycALlVt0ij8pYXzIHeH 2LkVPZoS47P2n8Xxrob/ETgzbhMyfCnAHdVsO+ONeTtPuaebhfcFfLl0AUm4U988P0hu/xxDLB5 2p0 X-Received: by 2002:a05:600c:4f05:b0:490:50e8:45c3 with SMTP id 5b1f17b1804b1-490a28cf434mr17780735e9.0.1780084317679; Fri, 29 May 2026 12:51:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 16/17] accel: Remove AccelCPUClass::cpu_target_realize() Date: Fri, 29 May 2026 21:49:38 +0200 Message-ID: <20260529194940.97143-17-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: 1780084393810158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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:12 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=1780084342; cv=none; d=zohomail.com; s=zohoarc; b=g0lLEgOuD+z9rOk2igLLfy0vef1AjrmC0k4Q9ESmhY0Mbyd5V44qF8TFaoSSYdbZXr/TtGdTjY26dEmDI1HgFbvvKK3pOlN4MVjESNwrljgmG/vSgV7gNuchRodnEnNAz+YkuTcXiXd2cIavx6fd8mIVqbSJqICPakxCl3rqrn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780084342; 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=Je8q/HCAd0aP2wgv5J5zrln6ORTrwi01jkqwR3v8AHc=; b=PINk981kyJ4ysgB5Xp6w4FFIhNK1a84Wak0Lg1J1S5J+qUf1+uPvy6gdp470Paurea2jBFx8ow+p2yX/svLzKeLnF3745fIStsOMj5kTkRLSvxnLc+ymqeE59S+9FjJKzo6kdpjfdEtL/0zmBd2Dkxr8Fr1LkO7Q6+4g7ZJ1Bsw= 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 1780084342968273.28375721547116; Fri, 29 May 2026 12:52:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wT3Fd-0002M0-PR; Fri, 29 May 2026 15:52:13 -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 1wT3Fa-00021Z-Ol for qemu-devel@nongnu.org; Fri, 29 May 2026 15:52:10 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wT3FY-0005FO-EF for qemu-devel@nongnu.org; Fri, 29 May 2026 15:52:10 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-45eeba68948so1476547f8f.1 for ; Fri, 29 May 2026 12:52: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-45ef34bd896sm5336956f8f.14.2026.05.29.12.52.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 May 2026 12:52:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780084327; x=1780689127; 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=Je8q/HCAd0aP2wgv5J5zrln6ORTrwi01jkqwR3v8AHc=; b=beB6F2aXLhiQma7R/YJAHFVZIGBZuqmPSzClBr5IZMPEmsVGLh6/9Ua6vWD+6ipz/n x05nuTYKnoo0gOa5q61bReBEtzm0JggMcsKMTtCZt5S+iAu4Va7UTSe7c9oeI1LRXXy6 l7pGRP2l41g+mdA6Y2XcJaWaBZogRlvG9Wqoq4BcRijlMxoESivyMV7SIMQN0Ig1meDx XpNGa5PSnTMJEbl35TA1hvuJ8iDsnvBa4QjnWyNdwUPfCL4mSkYbnw74ncozGeUJQhOb k9EgTUL6XbKkvcK093GliP80wOP8dHLFXDYQdRbD4T9qeZ1zVHUf7juhyADG/rFdKPlQ RuDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780084327; x=1780689127; 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=Je8q/HCAd0aP2wgv5J5zrln6ORTrwi01jkqwR3v8AHc=; b=I2hs1kuTg1cFl2NhbsuhcJx6cD2VGsaUby9OSq6wPAbhv7AXZt1WpML5m44PCvY6H9 UU6lemTfOD/TlsamTmsQVRIDtEn/EsGsdwKfkw35nJpFA5f9NKyZbkY0N1nJDYzBt9wD Bfh/JBdq/bi7EtieN0IdBnr1u+S5U1D1DLOwM5cOxGGF1BcrYqV8gOQ/hGoL2eAKqmH6 pPyXiB0qVmEQuevIFhqK+xwsTZ2FUcby951rYUZYez7Xya9eLYYd/SDs2ghKTu4Mvi9m b7z0kI21t5gvckZiwMLi6C0wJr6jjvljBRFltD9vPsOZwosIacQc3pg+IqYZbP1L6M5j ewyQ== X-Gm-Message-State: AOJu0Yw959udaCQs3Bq6heA5W9P54ZahtTmuwG5KZG29IyNAfNIr0jY+ fsOyEOn1tbPoVdn7Fgj4xrXKXWi23cjCud4alpIK/lG7hqUdZOooJNiLAPduPPUxOwrOhEQA0Fu mr/h9p4wx7w== X-Gm-Gg: Acq92OFf09z76z++NIINp5v/C28eaz6RsOoMAZIEdFx/CQQNbn6L2MWX2t+PWkWHz8M w7+qfONTSZipPeldUpeyoRVLxWQLJaIRRCdncu/ShWDJ+Njp4sTkgLAEV+kqpeF5QXPhDZ/bAqM ldw8KDugqU6zSoiiLT3dnrTtVzB1rfhxKeE/NguVO/S94XsBTLkLFpAoUZl6Rm0HrOrm/bTVCej t+aofPAhMBVbkuOnhyIzIZAgMm4QcuWS1SNip6tN+G0wN34oF9UtACErVCsNwg5m9ZA/25OmYfv eG3/Ha9k+IyKqYOho38YV6HRKw8TanZBEkLaRBYc9vpb+K8GajaE8wgkRlzZu9Rl73JxE6NusgB +mG/eXvkXmAx745vneuEZT/lud8aAvMvcjhvpRoRYcFJv5CK3nS1c//wg3ZCId4fXoI4kzGwtcR f0xpYdf7KQwmLx++XNNV7pJyCMTYIOENLGvnFUeqWlF1km1UZIHjB9uHZq6x3emM6esA== X-Received: by 2002:adf:f089:0:b0:43d:77c6:be78 with SMTP id ffacd0b85a97d-45ef6ba1425mr1556824f8f.39.1780084326851; Fri, 29 May 2026 12:52:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , Weiwei Li , Glenn Miles , kvm@vger.kernel.org, qemu-s390x@nongnu.org, Chao Liu , David Hildenbrand , Pedro Barbuda , Mohamed Mediouni , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Song Gao , Paolo Bonzini , Matthew Rosato , Peter Maydell , Liu Zhiwei , Alistair Francis , Marcelo Tosatti , Palmer Dabbelt , Anton Johansson , Claudio Fontana , Eric Farman , Alexander Graf , Chinmay Rath , Christian Borntraeger , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Ilya Leoshkevich , Pierrick Bouvier , qemu-riscv@nongnu.org, Roman Bolshakov , Daniel Henrique Barboza , Cornelia Huck , Nicholas Piggin , Phil Dennis-Jordan , Reinoud Zandijk , Halil Pasic , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 17/17] accel: Remove AccelCPUClass and 'accel/accel-cpu-target.h' Date: Fri, 29 May 2026 21:49:39 +0200 Message-ID: <20260529194940.97143-18-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260529194940.97143-1-philmd@linaro.org> References: <20260529194940.97143-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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1780084343659158500 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: Richard Henderson Reviewed-by: Pierrick Bouvier --- 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