From patchwork Thu Apr 17 16:54:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 881867 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp421155wrs; Thu, 17 Apr 2025 09:55:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqh/Cp9W9Dli1i6S7k+cTBFlTl7qz2ctYE9aBEAaHa1tmFf6eaxaM5FdE/VbNWrkUA/CZLWg==@linaro.org X-Google-Smtp-Source: AGHT+IFO4Xl0wXBJI6+woqioPsfQb5xXVmb+ixgwvMXLwOo+dWiaO6BM8SOyVN5uJ5Mr9uuyLrbM X-Received: by 2002:a0c:ed52:0:b0:6f2:bcbf:101d with SMTP id 6a1803df08f44-6f2bcbf11f5mr39336526d6.38.1744908924005; Thu, 17 Apr 2025 09:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744908923; cv=none; d=google.com; s=arc-20240605; b=DjwSWOGgWFodNiM3rzs7OhjALzMjbtkhH7nhoGJ0Tvz2BceoGbE8MwiZuE/Xru2qJs ufPYXgTYk6VHEkH1uiXBCT4kZ8oHiYcAAR9XX7JNZJ5Jyh3YD///Z0/MiaK/9lh4joFd 3gzSpRQM3yNNseK1FkRdHJVPNndVGbhIkLet4o7hPol6qX1EtFg8q4q0jYmnPKsFNFSg hdCUZIlwvvY0p2oWUph1h01uzeVdIFR6g6nNM5Y7oSHPaXA9MTKbAL/DLrgIMWFAs6Ah /mvIAwuhyySA70pD3X3EmOpPvaHh2PiseVX8XGIoZ2tm15f/aoHkZG+VkVU7fYKzzsj1 YN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=uZ9eXIXnL6BmIju3Xf84AVwZP1NVgL6vTrZkgK7VLps=; fh=EdwQll4Nj4en1mxLjxvOM0ZFr9f5v2TmHSEkzQX8uRE=; b=T+HROYlocVhZG2htNGdK0bKH848GbZymlwfasM0YFeFeX+HnlerwKSqzx0nmkI1Zxi 2U/JCVytKXiQC9xu9MDuaGmvRm0HKklBNST+F8xeLJUkpnn0GUEU4gtw0Hiotb6MaNaC d2heGv7NSRDnbDrA397NYyE2b3sxhxOsLaWv8l75rCpcapHJIGhwI4Mmh/ergg0YkUZJ 8Uriq0IwHM3O0COoNb6IZzMAgugQrGLcXhaL+USJ6Sacz2bhyQqrOMe0QnYpup8+xUue 2WULF/yyo90Jy/PVYqr9xad1wnpdRdLUFicW5+nuI3dpaw2uEfRf8Ws/qH2lr8Td26Xk nQaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3WjTVA9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f2c2b053edsi1903726d6.97.2025.04.17.09.55.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Apr 2025 09:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3WjTVA9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u5SVe-0008O5-SU; Thu, 17 Apr 2025 12:54:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u5SVa-0008NT-1R for qemu-devel@nongnu.org; Thu, 17 Apr 2025 12:54:38 -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 1u5SVX-0003cZ-5i for qemu-devel@nongnu.org; Thu, 17 Apr 2025 12:54:37 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-39ac9aea656so1294107f8f.3 for ; Thu, 17 Apr 2025 09:54:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744908872; x=1745513672; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uZ9eXIXnL6BmIju3Xf84AVwZP1NVgL6vTrZkgK7VLps=; b=u3WjTVA9atFCPkjifL3Lo5ygS96c99bekh7TA0klE9jPnOKazI4If7G73i0twiuRcH KAbk1nqw9DPGdh5w2H0KGohmabI1KLNwmwjWOYJ73F73Md90uK8XFpN+nxciiCA+34z/ Hnh88eTUeuQ1wUKIEjg9BPz7XviQGjicFmJuyFlY5N94PF0cLtTx/78Q8poDaDLzwaP5 ECPpjNvUcEMV4z58TEFPht9hMByqaGm+3APzQDddtrTP2SJ9C/7fvzyqio/xVKVLMbKv pX7w9z7iUouYRjiuzX7oIzwVSYh2nxsMTgI5OfHZ1gfXWulrcenxuY/n2j9+6KBPFjTs oyPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744908872; x=1745513672; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uZ9eXIXnL6BmIju3Xf84AVwZP1NVgL6vTrZkgK7VLps=; b=rGfjuh/xUDX4xf6e9bha4CA63+xBDI2OBZCd7lXkzJ7o9pjTIqapCRZPHxWeNXivY0 puQPWItgQkQyDnHNrTFJr0d0pqglPnOtcF/ufP0Hk/Ul27BjFpD3aTFnrwQU7Y+u+7ag E8uFVL2zROTznCiTa6bCSzxSEoj/zVdiGs+EDy6AGvMhKZ6hHa1rA2Qlqor58PXsq/nT 3YLTD0vXUd7J147VEXT9XpO7N7DiZKt576EmgGbXTyCE2SggRqUOJny/XVeTJ3nP33Y8 9SVKrHXXT5s/VZJFUAkouUANWsROFxsPOVYVFsBf7XfP8JlAnA0njofPRjogeuYgROxg RoqQ== X-Gm-Message-State: AOJu0YwoV4fyIQkqeTBeHhWndW4ogA64CFpezKM9EQlkUzZL9cRYsG8X N4J/NlLhVu02dT9eXkHakdwV9BvWCj+tp+TWJD+PtQH45hvj2hgnI5nZRRIBUpzNygywjKtDiYI G X-Gm-Gg: ASbGncsqrb+8TsKpo80pbbvjEgpaPaQs1yrCl+I7DNkGPCuoh/mTX5oXvxF24fAqjjI TjHfUAorvXdXqcSHzOclBPkql1DBF//lpj2jYYnP6YJfNwkwbdduwm1vkXppgz5YcgH5MxuHRfl k/cIiK+YzaKMK2+Kbq6Y/5FLoBodVY2vcPGzOz5A6EZcD1Prle1H+EYtLZHKT6xzjn457vTcJry iZkqrpspa1z4pIxJjEHFVoV3+WMgnUpF++wyUkQTF1AILiuBNyCw2zRO97zNZQ8ryuSUGFybo6H HHiH95aQifmUNB9005e7GQlBlPU1jeiJ0GkZGwNsGcitS/BITZ7kj4KNMRmbqujS5uykykVTfa9 xp3BGr4BZeHmleDc= X-Received: by 2002:a5d:6485:0:b0:390:eb50:37c3 with SMTP id ffacd0b85a97d-39ee5b37b83mr6263062f8f.27.1744908872562; Thu, 17 Apr 2025 09:54:32 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39efa5a2300sm106600f8f.101.2025.04.17.09.54.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 17 Apr 2025 09:54:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Yanan Wang , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Zhao Liu , Marcel Apfelbaum , =?utf-8?q?Daniel_P=2E_Berran?= =?utf-8?q?g=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Eduardo Habkost , Richard Henderson Subject: [PATCH 0/7] cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type() Date: Thu, 17 Apr 2025 18:54:23 +0200 Message-ID: <20250417165430.58213-1-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org (Series fully reviewed, I plan to queue it via my tree) This series replace the target-specific CPU_RESOLVING_TYPE by calls to the target-agnostic target_cpu_type() method. Since RFCv1: - Split from bigger/unrelated TargetInfo series (Pierrick) - Added Pierrick R-b tags - Added commit descriptions Philippe Mathieu-Daudé (7): qemu: Introduce target_cpu_type() cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type() cpus: Move target-agnostic methods out of cpu-target.c accel: Implement accel_init_ops_interfaces() for both system/user mode accel: Include missing 'qemu/accel.h' header in accel-internal.h accel: Make AccelCPUClass structure target-agnostic accel: Move target-agnostic code from accel-target.c -> accel-common.c MAINTAINERS | 4 +- meson.build | 2 + accel/{accel-system.h => accel-internal.h} | 10 +- include/accel/accel-cpu-target.h | 12 +- include/accel/accel-cpu.h | 23 ++++ include/qemu/target_info.h | 19 +++ accel/accel-common.c | 142 +++++++++++++++++++++ accel/accel-system.c | 4 +- accel/accel-target.c | 134 ------------------- accel/accel-user.c | 6 + accel/tcg/tcg-all.c | 5 +- cpu-target.c | 76 +---------- hw/core/cpu-common.c | 74 +++++++++++ target_info-defs.c | 16 +++ accel/meson.build | 1 + 15 files changed, 299 insertions(+), 229 deletions(-) rename accel/{accel-system.h => accel-internal.h} (56%) create mode 100644 include/accel/accel-cpu.h create mode 100644 include/qemu/target_info.h create mode 100644 accel/accel-common.c create mode 100644 target_info-defs.c Reviewed-by: Richard Henderson