From nobody Fri Apr 4 05:08:08 2025 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=1742273553; cv=none; d=zohomail.com; s=zohoarc; b=Sqjns6ovyGRrRsXCokDLpVWsU5oKKwNlBU5GTLfMkX0135E7xrBuymSBytUMlyqhfowSBooIPH6sU2XwMcE1TWSxuIClZmZq1DgfoXhiVwHvp6xPxAmUdGXESm76sEq04AMoqMo39aUs3bQVkXmftgCty4cv3aIyfuE9tiq72cg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742273553; h=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=vWIezDEnsVaTp50avzaVFN+/54kZx3DW446tGxF6xYk=; b=kAr9WmZogDh7bs0yGI2rZSMaaL1KKAZetTjYhGYxmxj4hLzPidBHY4YinzyVOs1lBgx+SvaRvhU+hirELFRQKgZNBl6iLoyWhJwH/ti3i4NSsqMsBVdqVU08B4U2XvVJO8RLsRQKitfROmDrInuUXNBhZOGk/9BCVejxpPP3pzE= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742273553170378.5835766272386; Mon, 17 Mar 2025 21:52:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuOvw-0001LZ-DY; Tue, 18 Mar 2025 00:52:09 -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 1tuOvX-0001EM-Fb for qemu-devel@nongnu.org; Tue, 18 Mar 2025 00:51:50 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuOvS-0008Sj-EC for qemu-devel@nongnu.org; Tue, 18 Mar 2025 00:51:41 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-22423adf751so86808835ad.2 for ; Mon, 17 Mar 2025 21:51:38 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711694b2csm8519195b3a.129.2025.03.17.21.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 21:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742273497; x=1742878297; 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=vWIezDEnsVaTp50avzaVFN+/54kZx3DW446tGxF6xYk=; b=bURNFUCFanUVdGsPAdZtuPijDBHLWkSZIaA/GDC04doZz+tfv+QLBKMXPpMNn6ELij kBvDEa42DyXc1fAY2zsIH5zYS8tCcbqseeQm8rch0Gb1XIYUciLiaSKPeoCc/i76uqIW wCNIZobD5j9dc30kvsL92662NGolcYRykOB1pdq3PLj2+YK99zhuv7uwUrSDvDJ2nS7w VPw9yiu9TVKRQfjiw6PN7xOb529dudC+G1ExbOZ4nM7Mjoo+fgBHHpO9h6ukocYh2nMI OT63y9sDQKyhpbouKRyqDYSfesejsyOIQYgwirnmegUdt3le6LZk55HKKXakXm44hxcX WfHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742273497; x=1742878297; 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=vWIezDEnsVaTp50avzaVFN+/54kZx3DW446tGxF6xYk=; b=ZPFVoD/G0y7UM4FIFAdxysqplsIYmd2gmbygY00yHSa4GplSvBKUuHjcwJqBoa7pWX GH8f9yR5r2pf6sDT9BsMaDkaYDtjh1FwencYZWKU7Kw1fK32fZ10nWuAOjzDWbArEV/7 9nc3RjdSM1AiCklD6Qd/aoyPPo7RkltX0iG9tR4Ck5UFPEg7Uc31g40PtkNQgm4fwon5 ysEWsrqbvmyXH/qQEm4AQ3rZyPuthIKkgy5X3H43Z1XzxqmsT8gjbhxDQpAqCg7kDU7d RhYjrZCp9Oh8Lo7IKb1Q3QRv+aCX7dIcC9ur9kdotfktzW8CbRhVQVA9fRIVQ8UEJHAu x9vA== X-Gm-Message-State: AOJu0Yy5Sib0Xzcim6o1YPmdT+IR1ldUvNfNp8wjnsMGH3KbZCtHWtX/ JZFGZC5d1iE+rwwooAI3CetE1i6TEC026TU3yA9X/qtSvWMcWtUAObjQuznyU7smYPWM2ZpkwPk / X-Gm-Gg: ASbGncv+UVKeXBj3PwxCmgja5nOC6IMRbf4ANSkEtYOONzwwSaH/MWmpQ9aONaLggFh yxzf84WWroFOcxtBrUYTS03TCYsLdM2a0wWzGqZO1LU5EGf/dEZ3Xg5ruB/DvDoZaE6+91GSHO1 XKuSxRolneas6vAAto4V6hAQXYQxW3LrJy96nEgihriaBgTbrGZiBsBLh84deIKch/ldEOSFWID uZ0CBuBMl6+NguH/68KC5JoUQSOG4hNkmdEtsmk/ezYlHcOxAkUy/Ycn0moNiSMLdnG0q+c32vj IvNGrEGriW0xoKNdRSJVjM8BJaSV86QRYTCer4vw8bYj X-Google-Smtp-Source: AGHT+IGfVS9r67mKi+C/QhYaIcplE7qOFrPBNlW784RCUzNr+6ZfRfHv2pwT7sOIOfbETdELQgrdAg== X-Received: by 2002:a05:6a00:3cc1:b0:736:ab1d:83c4 with SMTP id d2e1a72fcca58-737222535c1mr17970185b3a.0.1742273496888; Mon, 17 Mar 2025 21:51:36 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-arm@nongnu.org, alex.bennee@linaro.org, Peter Maydell , kvm@vger.kernel.org, Paolo Bonzini , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH 04/13] exec/cpu-all: allow to include specific cpu Date: Mon, 17 Mar 2025 21:51:16 -0700 Message-Id: <20250318045125.759259-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250318045125.759259-1-pierrick.bouvier@linaro.org> References: <20250318045125.759259-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 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=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x631.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742273555626019100 Content-Type: text/plain; charset="utf-8" Including "cpu.h" from code that is not compiled per target is ambiguous by definition. Thus we introduce a conditional include, to allow every architecture to set this, to point to the correct definition. hw/X or target/X will now include directly "target/X/cpu.h", and "target/X/cpu.h" will define CPU_INCLUDE to itself. We already do this change for arm cpu as part of this commit. Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 4 ++++ target/arm/cpu.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 7c6c47c43ed..1a756c0cfb3 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -46,7 +46,11 @@ =20 CPUArchState *cpu_copy(CPUArchState *env); =20 +#ifdef CPU_INCLUDE +#include CPU_INCLUDE +#else #include "cpu.h" +#endif =20 #ifdef CONFIG_USER_ONLY =20 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a8177c6c2e8..7aeb012428c 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -31,6 +31,8 @@ #include "target/arm/multiprocessing.h" #include "target/arm/gtimer.h" =20 +#define CPU_INCLUDE "target/arm/cpu.h" + #ifdef TARGET_AARCH64 #define KVM_HAVE_MCE_INJECTION 1 #endif --=20 2.39.5