From patchwork Thu Jan 23 23:44:05 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: 859409 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:18c8:b0:385:e875:8a9e with SMTP id w8csp531928wrq; Thu, 23 Jan 2025 15:46:57 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWHIShFfF/Owctgt3eJIJP6MlYJGLKttZmQxxTrVSvb4I7gpSJTDR26F1l1UzSwgnq0HPDVKQ==@linaro.org X-Google-Smtp-Source: AGHT+IFw2d3HOJre/bWox+xQvh058cKZLQ9DUgC3lxsTrMxhWZwpyERZSExyYrP4w6KYwkcbPKbl X-Received: by 2002:ac8:7d52:0:b0:467:8651:40a2 with SMTP id d75a77b69052e-46e12a55c06mr445117761cf.13.1737676017399; Thu, 23 Jan 2025 15:46:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737676017; cv=none; d=google.com; s=arc-20240605; b=OKteWAj+DxPpwaM//eYnKCi4Xcy7CqszZ02knehioCQJve0EW1LKFo+kgoyX8v1cbX Ls2B/XjY16dPvpjMBSOIkv+EsAdjPloDw1OSUMKvYRoYxOS9aULl+JFv5uLTRXmwZIoh kd7hU/iCdxFxTbUgg8ebuuNR5cpNGkPZJNv/Po1VHfDZQMjnHqa5q9pB5tI3zIQX3Ab1 N9gg5MlOz8GE7i3WHdNCFlLxvJuQ4qVTz5priZ0FOr5E2YiXDTHaMzlVuYJqBAlIIa6A 6yOcrnBkVa/uIWRDpq+EvaBhDZUxghC3qCR0O7Yv6hprKHrqfVy9Il+cvmbq1Eg14USe eZkQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KLiVQy6/uYr9fS/vE5notUMei/mcFiOsSDRea34SIY0=; fh=n8P8n8mjPTF98Ox3aCUz2zCvv5jUpnKQrp7JPLvRSRI=; b=boQncJClxc6kSC3f/9aj19tmNMcFQkuQ3ziUy1rP519DQ2cow0xw51cwAwvZgeTLn2 1P+9PhR6PFmo2bQagT/rirsa7aptdFAnH+8qVb4mWbaphJl8JeBHtTfWVfR4xEY0Whww x21jGMgiFEo4LbAeQNFrEY49b3TscXi8i4pAlSNmAgJ6Lp/UkF1V9x6SjVAD6xHQEHYb Z+IF+m4JCTi+2XH7h8qRxDP5KGr+Vp44hjDKzhJvgcafkLXNx6Glj6Cd4IA4oex7N+Z3 SmoPCJpmBGavFSW4tr6bnk8sTTcC3hkjzWu3ixA+/P7m5Hi8f5IwS3UraYgUv+fL4tda uJgw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6937nvE; 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 d75a77b69052e-46e66bce101si9446791cf.671.2025.01.23.15.46.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jan 2025 15:46:57 -0800 (PST) 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=h6937nvE; 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 1tb6t6-0006yA-Cp; Thu, 23 Jan 2025 18:45:28 -0500 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 1tb6t3-0006rQ-Ho for qemu-devel@nongnu.org; Thu, 23 Jan 2025 18:45:25 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tb6t0-0004Gy-AK for qemu-devel@nongnu.org; Thu, 23 Jan 2025 18:45:25 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361f796586so16011755e9.3 for ; Thu, 23 Jan 2025 15:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737675920; x=1738280720; 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=KLiVQy6/uYr9fS/vE5notUMei/mcFiOsSDRea34SIY0=; b=h6937nvEdYMeCIIS+GtLYVN4CwpFkVX0s57GdJkeLhjh6qm4EyFz3ODp0dXigT5pE+ 4ruophxsuGWTrolSobuDG+uQdjcQcUWFMTk8Ow1++nb/bAkLQwVvJPx/T85TmLswhoLd UzqRhZhOV+jQOKMk6C5a4VfsCOlH6bny9oW7DaBcadGneHg60FMSyjli7Z+n9DOiR5Cx goJpKtG6zv6gpd2AFGh02+Qgcl9cx3re08r+OuTRhijdQ86ipocS526+RScZmIBrwMye piSRPQGCRytBvPSK1H80S17NGwqn2mtzb+v9Sq0NPZAf6KoHpk435yCVqoNGi2gwYvDC +BeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737675920; x=1738280720; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KLiVQy6/uYr9fS/vE5notUMei/mcFiOsSDRea34SIY0=; b=VtQwZl8flg5t6RR+GYWBVj4WFH8fAO7F2mRmy/5rXF4ZZUmFyDY1MtcX6WkMkjciys hciwbUGlRYGfP4yPfZRkQ6pbJ5or89Y3oe5o8FabEwAd9/n8qP3IWDTVpeTuwhC/RV4A 8WQT81dcIIQYf7lIdNRLohGsJk1/hnXswXDth3O+ENebJ9T+kRMJZeW52VgX41oO9qts k2h7Fc4asIfwQfQv+RTehpptmUWVhF1BqaO1/Bjn2oV9CRCH6//kzsjnvNRXOxWfZNj5 BhycWaV4QijveQvzYqnpgeWWRofVWUD8xKd+NIsTpANPRADlDAyf4wMdO6U1tHx2+Hn2 f65Q== X-Gm-Message-State: AOJu0YwD4N1YopVn+mZ1w3W1AC2Xl6zWwgTVkzSOQkV9mV972eCsyl3w mDqUObYWQox/SM+UvUq4B2dhZQeK30+lTSyYJ3hbvY1f5eWLpl2moSXR9xbDusTed/C4xrIc2Sz WpE4= X-Gm-Gg: ASbGnct8mNy3R8UqVqohvItEGJhWzFBEQ744ttX1Nd7E2fDp0bwCjj2a3nIlTMO3ky3 Q960SZ0Ywc1gw1fQGCOVogEAnLoGlY1Gl8NV/mLMkliYKJ2SXpLidkVnSHwS9WO4xKRpO74tbx3 Xjsw9yalaFInz7jerLQBcNO4nMG7z5XSEhgvVoU5hDjWpIj3zZjE2nUPbwQwqQAxImoHFoPaYL/ jVYKkr7qNCkFP3mmbJNWdy7S6r7h45BUvfDefGqgLnigLhMMzB6h7f6N57SvTmti/RwI/jcKvRC wV7lMtz3nTdEeXHcDaRTJn2KHqoRv2vtGbkdBRhHKPi1eWowVLzFXdw= X-Received: by 2002:a05:600c:1913:b0:434:f4fa:83c4 with SMTP id 5b1f17b1804b1-43891453fa7mr280858325e9.29.1737675919693; Thu, 23 Jan 2025 15:45:19 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd54c0f7sm6499935e9.28.2025.01.23.15.45.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Jan 2025 15:45:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Igor Mammedov , =?utf-8?q?Alex_Benn=C3=A9e?= , kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand , qemu-s390x@nongnu.org, xen-devel@lists.xenproject.org, Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 11/20] accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h' Date: Fri, 24 Jan 2025 00:44:05 +0100 Message-ID: <20250123234415.59850-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250123234415.59850-1-philmd@linaro.org> References: <20250123234415.59850-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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 AccelCPUClass is for accelerator to initialize target specific features of a vCPU. Not really related to hardware emulation, rename "hw/core/accel-cpu.h" as "accel/accel-cpu-target.h" (using the explicit -target suffix). More importantly, target specific header often access the target specific definitions which are in each target/FOO/cpu.h header, usually included generically as "cpu.h" relative to target/FOO/. However, there is already a "cpu.h" in hw/core/ which takes precedence. This change allows "accel-cpu-target.h" to include a target "cpu.h". Mechanical change doing: $ git mv include/hw/core/accel-cpu.h \ include/accel/accel-cpu-target.h $ sed -i -e 's,hw/core/accel-cpu.h,accel/accel-cpu-target.h,' \ $(git grep -l hw/core/accel-cpu.h) and renaming header guard 'ACCEL_CPU_TARGET_H'. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- include/{hw/core/accel-cpu.h => accel/accel-cpu-target.h} | 4 ++-- accel/accel-target.c | 2 +- cpu-target.c | 2 +- target/i386/hvf/hvf-cpu.c | 2 +- target/i386/kvm/kvm-cpu.c | 2 +- target/i386/tcg/tcg-cpu.c | 2 +- target/ppc/kvm.c | 2 +- target/riscv/kvm/kvm-cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename include/{hw/core/accel-cpu.h => accel/accel-cpu-target.h} (95%) diff --git a/MAINTAINERS b/MAINTAINERS index fa46d077d30..e4521852519 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -499,7 +499,7 @@ R: Paolo Bonzini S: Maintained F: include/qemu/accel.h F: include/system/accel-*.h -F: include/hw/core/accel-cpu.h +F: include/accel/accel-cpu-target.h F: accel/accel-*.c F: accel/Makefile.objs F: accel/stubs/Makefile.objs diff --git a/include/hw/core/accel-cpu.h b/include/accel/accel-cpu-target.h similarity index 95% rename from include/hw/core/accel-cpu.h rename to include/accel/accel-cpu-target.h index 24dad45ab9e..0a8e518600d 100644 --- a/include/hw/core/accel-cpu.h +++ b/include/accel/accel-cpu-target.h @@ -8,8 +8,8 @@ * See the COPYING file in the top-level directory. */ -#ifndef ACCEL_CPU_H -#define ACCEL_CPU_H +#ifndef ACCEL_CPU_TARGET_H +#define ACCEL_CPU_TARGET_H /* * This header is used to define new accelerator-specific target-specific diff --git a/accel/accel-target.c b/accel/accel-target.c index 08626c00c2d..09c1e1053e0 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -27,7 +27,7 @@ #include "qemu/accel.h" #include "cpu.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #ifndef CONFIG_USER_ONLY #include "accel-system.h" diff --git a/cpu-target.c b/cpu-target.c index 75501a909df..f97f3a14751 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -44,7 +44,7 @@ #include "exec/tb-flush.h" #include "exec/translation-block.h" #include "exec/log.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "trace/trace-root.h" #include "qemu/accel.h" diff --git a/target/i386/hvf/hvf-cpu.c b/target/i386/hvf/hvf-cpu.c index 560b5a05940..b5f4c80028f 100644 --- a/target/i386/hvf/hvf-cpu.c +++ b/target/i386/hvf/hvf-cpu.c @@ -14,7 +14,7 @@ #include "system/system.h" #include "hw/boards.h" #include "system/hvf.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "hvf-i386.h" static void hvf_cpu_max_instance_init(X86CPU *cpu) diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 1bda403f88b..6269fa80452 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -15,7 +15,7 @@ #include "hw/boards.h" #include "kvm_i386.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" static void kvm_set_guest_phys_bits(CPUState *cs) { diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index f09ee813ac9..b8aff825eec 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "helper-tcg.h" #include "qemu/accel.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "exec/translation-block.h" #include "tcg-cpu.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 966c2c65723..216638dee40 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -49,7 +49,7 @@ #include "elf.h" #include "system/kvm_int.h" #include "system/kvm.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include CONFIG_DEVICES diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 23ce7793594..7e4443c5bda 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -32,7 +32,7 @@ #include "system/kvm_int.h" #include "cpu.h" #include "trace.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" #include "exec/address-spaces.h" diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index e40c8e85b26..79345e4b89d 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -30,7 +30,7 @@ #include "qemu/accel.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "hw/core/accel-cpu.h" +#include "accel/accel-cpu-target.h" #include "accel/tcg/cpu-ops.h" #include "tcg/tcg.h" #ifndef CONFIG_USER_ONLY