From patchwork Thu Sep 14 18:57:07 2023 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: 1834406 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=t0Mi3kXu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmmd1YdTz1ypL for ; Fri, 15 Sep 2023 04:58:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrWu-0007q3-F6; Thu, 14 Sep 2023 14:57:32 -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 1qgrWs-0007pU-Hq for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:30 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrWr-0007SW-1I for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:30 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-52bd9ddb741so1638682a12.0 for ; Thu, 14 Sep 2023 11:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717847; x=1695322647; 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=WvL3ArqDJTyQMa7Dhgweczo+eomNigdqJoFYXgKa+wU=; b=t0Mi3kXu6kKqN5Eo5ESu/k0OyC2spq01VIl2JNbcQNOphJuzBwbuMr0AoRhxU8OB0J KPQEYbauPzIEw3sD+qgJcO+z/NKQ4bx9bYOxd25s7nmDMA1UoFz3bdqYIfK3GS+wrHip ySryFQ1TIppkOL0bKAeaWOqIV7YrGOKGi0/ZtaLy/hRz35svLUO4AL0UkMaH34gCQy3W eTCvkCeWjLdk0rhwEytgZr9bNvXFwo1pmT0kGgOk9ebs3ofEoAXoMYIoaOVZa5V3ixS3 uY59TNQ3mSbkInXPz8U6UKTKYnV0tYIkeh0NLlgLZF9CzHak5P/TUKCAgDPosdPvQMMa OKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717847; x=1695322647; 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=WvL3ArqDJTyQMa7Dhgweczo+eomNigdqJoFYXgKa+wU=; b=SA/af6iuXl3ih1Jc3/yKUZBAlQCTqzw5ue6F9TTbbdiOnEiTprtKshy+NG3MKCWa7h ohx4Kav19dToW9DjWkWrjl+bTisyJIPUk3ECxQVSivcBYkUT4l/7B0a45xzFEcjwsICq GyP17/H3/JKQ8OoSVTkDzyFmjStPjRsCVFYzpNBoQ+APvh8sE/7IEfh2Wz6rKJCj7Kvc LZCQiQefVzgzEQukBQ1vZe2elu0rxxNFdjvc3UVz/owVDFVBTQJtghBimg9czRVM70vJ DlHemTPECAQp2ytKVHdQd/hPqEC05RyWdpXYMAW5Oy29oAiDSd/CtPWvObSnWKL0pBSW 4pVg== X-Gm-Message-State: AOJu0YxU1Q/iBcJ+1DbIJGf2wJUH4c8ffwl7TpxrkxEnFXJjZFTzsLi5 roEGv+wkDa+aAn9ltByXW/O69NJnrBQgjjsiW54= X-Google-Smtp-Source: AGHT+IHDYAEa5TZcbZhYbmcLS0ut7IVlOIzUfaZHdYGWcp9X52P2PwS+2Kzs2P1w9NaBSDHLB/o1eg== X-Received: by 2002:aa7:c147:0:b0:523:d51:bb2 with SMTP id r7-20020aa7c147000000b005230d510bb2mr5420515edp.15.1694717847409; Thu, 14 Sep 2023 11:57:27 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id c11-20020a056402120b00b005232c051605sm1259921edw.19.2023.09.14.11.57.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 01/11] exec: Make EXCP_FOO definitions target agnostic Date: Thu, 14 Sep 2023 20:57:07 +0200 Message-ID: <20230914185718.76241-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The EXCP_* definitions don't need to be target specific, move them to "exec/cpu-common.h". Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h | 7 ------- include/exec/cpu-common.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 3b1cec390b..71efc2d404 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -26,13 +26,6 @@ #include "hw/core/cpu.h" #include "qemu/rcu.h" -#define EXCP_INTERRUPT 0x10000 /* async interruption */ -#define EXCP_HLT 0x10001 /* hlt instruction reached */ -#define EXCP_DEBUG 0x10002 /* cpu stopped after a breakpoint or singlestep */ -#define EXCP_HALTED 0x10003 /* cpu is halted (waiting for external event) */ -#define EXCP_YIELD 0x10004 /* cpu wants to yield timeslice to another */ -#define EXCP_ATOMIC 0x10005 /* stop-the-world and emulate atomic */ - /* some important defines: * * HOST_BIG_ENDIAN : whether the host cpu is big endian and diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 41788c0bdd..360b8298a4 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -7,6 +7,13 @@ #include "exec/hwaddr.h" #endif +#define EXCP_INTERRUPT 0x10000 /* async interruption */ +#define EXCP_HLT 0x10001 /* hlt instruction reached */ +#define EXCP_DEBUG 0x10002 /* cpu stopped after a breakpoint or singlestep */ +#define EXCP_HALTED 0x10003 /* cpu is halted (waiting for external event) */ +#define EXCP_YIELD 0x10004 /* cpu wants to yield timeslice to another */ +#define EXCP_ATOMIC 0x10005 /* stop-the-world and emulate atomic */ + /** * vaddr: * Type wide enough to contain any #target_ulong virtual address. From patchwork Thu Sep 14 18:57:08 2023 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: 1834407 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hwf9dN1X; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmmd1JJ8z1yh0 for ; Fri, 15 Sep 2023 04:58:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrX1-0007qs-25; Thu, 14 Sep 2023 14:57:39 -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 1qgrWz-0007qX-Pt for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:37 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrWx-0007Y7-3R for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:36 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-52889bc61b6so1546038a12.0 for ; Thu, 14 Sep 2023 11:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717853; x=1695322653; 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=zPNAVtdj61Dd1NsUTVG5W7vZpG0MSnrlxikP0a9bkyc=; b=hwf9dN1XiBHf4iQ7HLqcVWH/kHVlli89AYCXEfqIFJjBWlD8MIES8nF/fJ+zXIWIBA OYoWk2gwTMFiZh1GL58JdlGub6CKL1HbSdcmggDwuJt2Ti/PbEMlzXsKgJlhAHjLKy3q NUGyzwg3sup6qGB4PKBrrLI6XcLhABkkNkiKtSBlD+SDyWWpLNUpFrNYRpC7II1Qrb9m MlzcYKZ1z3uc/mQYs8hHsSdE9try4XqYzOu25IStELkgqEblBz/3OluInqauc8Eow5Y1 R7zVNSCSBKE7VBu9/CTBlUN5cNxkkCuyy0HEnbCl5dvq0Yiwf8HWfoRYV6NibWQF5iTg w5pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717853; x=1695322653; 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=zPNAVtdj61Dd1NsUTVG5W7vZpG0MSnrlxikP0a9bkyc=; b=DZctj64ikthrC1GQZ9cGb/yUZlgnvnfev0v0OfeiNIuZ+eOygQ93u48zfvhFAwlnJh x4IC+FOSPEhzx89CzVWGV4n0z56E4KFOaMb526l8qUUfTMNddtloe7W/GQdYcjEMpiGy g3Cut0hbX3xsDSBfBreaD779SAkY3TpLJXPb6BNfbkQqkDHTgdcabARnnKTkZWH5WD9n ZP7dRY5OTdCAVKwMN33UCaENQ7vES0/AsOB4QzEJq9xIWkp/zOjrOYdLpzPZeREGHQVC ViphhA623F6XxIv7lXZ+2pXrIRG2m8egDrUwbbYB2ET/a0++t1Yj5oc1ODCPuMRUyMKz rijg== X-Gm-Message-State: AOJu0YzcKSk3+lKQ0OfkP1agqlqLe48PjU4jLSeWVGmhdQ8PQo2+X6hI f7lYx9eBoEMmIYQ5dfe+B0dey7LwDRtbxPR6SS0= X-Google-Smtp-Source: AGHT+IEBHI2bnWjF/vO/vnRzYHHXrViIg1z0542VFhKQTp34itEBvMtALuwL4XqQAQX28yghg5wLRA== X-Received: by 2002:a05:6402:517b:b0:51d:d4c3:6858 with SMTP id d27-20020a056402517b00b0051dd4c36858mr5669878ede.12.1694717853497; Thu, 14 Sep 2023 11:57:33 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id d15-20020a056402078f00b0052f8c67a399sm1273708edy.37.2023.09.14.11.57.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 02/11] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h' Date: Thu, 14 Sep 2023 20:57:08 +0200 Message-ID: <20230914185718.76241-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org While these functions are not TCG specific, they are not target specific. Move them to "exec/cpu-common.h" so their callers don't have to be tainted as target specific. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 32 ++++++++++++++++++++++++++++++++ include/exec/exec-all.h | 30 ------------------------------ 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 360b8298a4..605b160a7e 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -173,4 +173,36 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, /* vl.c */ void list_cpus(void); +#ifdef CONFIG_TCG +/** + * cpu_unwind_state_data: + * @cpu: the cpu context + * @host_pc: the host pc within the translation + * @data: output data + * + * Attempt to load the the unwind state for a host pc occurring in + * translated code. If @host_pc is not in translated code, the + * function returns false; otherwise @data is loaded. + * This is the same unwind info as given to restore_state_to_opc. + */ +bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data); + +/** + * cpu_restore_state: + * @cpu: the cpu context + * @host_pc: the host pc within the translation + * @return: true if state was restored, false otherwise + * + * Attempt to restore the state for a fault occurring in translated + * code. If @host_pc is not in translated code no state is + * restored and the function returns false. + */ +bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc); + +G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); +G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc); +#endif /* CONFIG_TCG */ +G_NORETURN void cpu_loop_exit(CPUState *cpu); +G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc); + #endif /* CPU_COMMON_H */ diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 2e4d337805..ee90ef122b 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -27,36 +27,6 @@ #include "exec/translation-block.h" #include "qemu/clang-tsa.h" -/** - * cpu_unwind_state_data: - * @cpu: the cpu context - * @host_pc: the host pc within the translation - * @data: output data - * - * Attempt to load the the unwind state for a host pc occurring in - * translated code. If @host_pc is not in translated code, the - * function returns false; otherwise @data is loaded. - * This is the same unwind info as given to restore_state_to_opc. - */ -bool cpu_unwind_state_data(CPUState *cpu, uintptr_t host_pc, uint64_t *data); - -/** - * cpu_restore_state: - * @cpu: the cpu context - * @host_pc: the host pc within the translation - * @return: true if state was restored, false otherwise - * - * Attempt to restore the state for a fault occurring in translated - * code. If @host_pc is not in translated code no state is - * restored and the function returns false. - */ -bool cpu_restore_state(CPUState *cpu, uintptr_t host_pc); - -G_NORETURN void cpu_loop_exit_noexc(CPUState *cpu); -G_NORETURN void cpu_loop_exit(CPUState *cpu); -G_NORETURN void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc); -G_NORETURN void cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc); - /** * cpu_loop_exit_requested: * @cpu: The CPU state to be tested From patchwork Thu Sep 14 18:57:09 2023 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: 1834410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HNjGM8Ac; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmmd5jG5z26jQ for ; Fri, 15 Sep 2023 04:58:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrX6-0007ru-OG; Thu, 14 Sep 2023 14:57:44 -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 1qgrX5-0007rR-6J for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:43 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrX3-0007bt-GZ for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:42 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-401b0d97850so13488665e9.2 for ; Thu, 14 Sep 2023 11:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717860; x=1695322660; 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=9zKv/AFUEShTVcBgdcujYDWfR46YFV/IRpKp0NuzD1I=; b=HNjGM8AcEJEyYaFv9ELrtim5YO2zMU/Rsz6I1aHW2F38CvT6QXCVbQnXV1uiscL1E8 4WFlvroD9MY55Iuf0kwHIaw/f1DWXW/cvFAd20eoMETVw9weOurvsNXG3/ysNaQThxr6 mbnkh+sYHjkkQw/jMC+TPbamsxUi1oQU0S/tsYVJxVAZgjAisag+bnegcrtUHz914xuN Gc434icm8QDBpCzLrPOFVNrqW9OAXSdLVllmgc8nZ/nWiUPo87feKtp7w0UjKpZxU5fl T8yHdY/zlWU7ZSYehiNNfVsb4pZuMu4UQlU47cj2gWeWGCiqzITX2iAZULBsgjHE2/Zx mj8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717860; x=1695322660; 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=9zKv/AFUEShTVcBgdcujYDWfR46YFV/IRpKp0NuzD1I=; b=pQVIyXaVY1Nz16iaZ052VZ3WgPJNWcrfmU+nnpWBEbbLCsWXgJ1OIO1sZIoG3blXS+ lt2bUBI9sb3sR2Ru60AT895XEBe0ovn+n4HR5wbInvvsuP1YmYtAM0GkFEblSJ/V+Ofa WljXJdg6pveBeZwZrqy2VDRIhITmv5P5pE9H+/h+ZdcybGjpMMwS56lxqbPHeEON79EN bN1fCPL2lDH+sa0rn6dXNGtuq8Gla9wJlV5F6uMkLo3mYZ/0D+aHRWA2BRkDGPY4ukhN /UOmG1p2nWjmfpt07W7SFhXJYsp6Vj0hW9g8koSOfvRz2noLEHTyrQtPu2DSlmAA/6u3 nbbg== X-Gm-Message-State: AOJu0YylJt/u/xyuKBkqGb329EmROkDzHNWG1ymonKdsmnFxM98Zb8mG E3n9UW9aPaui7jgyJqTwwoOuKiHUouANNkaNaDA= X-Google-Smtp-Source: AGHT+IEHFtbFmNTS8niehLXaXXrkhluRaMDyOB98q1d86LQhOmgI9PXQC4RcZMY3IeN0e/LtUxlpGQ== X-Received: by 2002:a5d:518f:0:b0:31f:a9db:b838 with SMTP id k15-20020a5d518f000000b0031fa9dbb838mr5850535wrv.15.1694717859697; Thu, 14 Sep 2023 11:57:39 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id e10-20020a50ec8a000000b0052565298bedsm1262703edr.34.2023.09.14.11.57.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 03/11] accel/tcg: Restrict dump_exec_info() declaration Date: Thu, 14 Sep 2023 20:57:09 +0200 Message-ID: <20230914185718.76241-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-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=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org In commit 00c9a5c2c3 ("accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation") we moved the definition to accel/tcg/ which is where this function is called. No need to expose it outside. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal.h | 2 ++ include/exec/cpu-all.h | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index e8cbbde581..cd6b9eb7f0 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -102,6 +102,8 @@ static inline bool cpu_in_serial_context(CPUState *cs) extern int64_t max_delay; extern int64_t max_advance; +void dump_exec_info(GString *buf); + extern bool one_insn_per_tb; /** diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 71efc2d404..221ada2b6d 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -406,11 +406,6 @@ static inline bool tlb_hit(uint64_t tlb_addr, vaddr addr) return tlb_hit_page(tlb_addr, addr & TARGET_PAGE_MASK); } -#ifdef CONFIG_TCG -/* accel/tcg/translate-all.c */ -void dump_exec_info(GString *buf); -#endif /* CONFIG_TCG */ - #endif /* !CONFIG_USER_ONLY */ /* accel/tcg/cpu-exec.c */ From patchwork Thu Sep 14 18:57:10 2023 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: 1834416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=C64I2qwS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RmmpQ6xppz1yh0 for ; Fri, 15 Sep 2023 04:59:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXD-0007sg-9x; Thu, 14 Sep 2023 14:57:51 -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 1qgrXC-0007sP-Dl for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:50 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXA-0007d3-Qk for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:50 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bcb89b476bso21877711fa.1 for ; Thu, 14 Sep 2023 11:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717866; x=1695322666; 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=Dh8+LaQRQPmPlmPUdoCBAfz86Ho/nQrcFJbdDxanoB0=; b=C64I2qwSafRk4RtkOmEWuhwMN+vVjU56ZuW2XVVhEOLWcZFTMJgJXSbb/e4A66trow gQ3Uz1Tmk5qS9eogtd0YNfBz5gkJSLbV53skSeW2EPW/tpect0vS17N5Nm8Ff2F8sEnP HWPIRGf8WjNu/BVvIlPeSGqZm+nkPUGvaKSwSunDsR8DgYoQFEzOOnZSH1OO9zAPlWhY xk2xDoKLGNekgWfOQB5YkW201/KqnwVpbKWlDQMoFvGam+I8Qp87bcCCSMAuR1Y+VxJ/ jHpbA2ox0qz1dwOwegfiob8qAoUZKVoCT+QzhILnqIPXKSzzdnF+NNkZD/TmBFHV3Zok ex5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717866; x=1695322666; 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=Dh8+LaQRQPmPlmPUdoCBAfz86Ho/nQrcFJbdDxanoB0=; b=D5A27cseDScVqaZZF/JMMvXjy7HXj7W/YU799S5+IrVFtku8EKL+TMN44XfsRKMpde Yrl1yfhEsQ3p3LRnf9HqhdnR+s0EYg/jDj1bXWKeccYz83YIMHQWAc813K2FdIV98mEE BkdnKlr2QohlRa85pz3cd2wdwTKdQRQqRCsCB/t6Eb8WLMavMwvj37Z4ROS57LUydFD4 8JWx4AcXEJHcFPbJvPPjER74nW9pHiXR512jobJBk+Gh5lzPwce8rm+TxyCKMPfKVsL3 UASIi/TCGBtSNEJ9nRgoyY9/a1CPYjfZwNJnPDwEWxMZol4/pfmPcmXTBObNcrsP+2l+ Kwcw== X-Gm-Message-State: AOJu0YzHTnFpZdzfvkhMebPdUvQux5Hc97Tr+SMT9Ao0dMcWdKvKpCpz lSn4W1BNOtXACOHu6pE51CW4CQ7CFrYrGTcNhlE= X-Google-Smtp-Source: AGHT+IENqwwpP5sU+cDZK2nYF0CKO0oQIMhho0iZB262wD1FW0LHcCWWNmzAHRHWV7kk7+XA+S7SFQ== X-Received: by 2002:a2e:990f:0:b0:2b9:412a:111d with SMTP id v15-20020a2e990f000000b002b9412a111dmr6442567lji.42.1694717865804; Thu, 14 Sep 2023 11:57:45 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id z18-20020a1709067e5200b0099d798a6bb5sm1358420ejr.67.2023.09.14.11.57.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 04/11] accel: Make accel-blocker.o target agnostic Date: Thu, 14 Sep 2023 20:57:10 +0200 Message-ID: <20230914185718.76241-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org accel-blocker.c is not target specific, move it to system_ss[]. Signed-off-by: Philippe Mathieu-Daudé --- accel/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index 638a9a03ba..76f3cbc530 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -1,5 +1,5 @@ -specific_ss.add(files('accel-common.c', 'accel-blocker.c')) -system_ss.add(files('accel-softmmu.c')) +specific_ss.add(files('accel-common.c')) +system_ss.add(files('accel-softmmu.c', 'accel-blocker.c')) user_ss.add(files('accel-user.c')) subdir('tcg') From patchwork Thu Sep 14 18:57:11 2023 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: 1834409 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Ngm65eBn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmmf1P1cz1ypL for ; Fri, 15 Sep 2023 04:58:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXJ-0007tr-MT; Thu, 14 Sep 2023 14:57:57 -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 1qgrXH-0007tO-8r for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:55 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXF-0007eB-OF for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:57:55 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31fa666000dso1164438f8f.2 for ; Thu, 14 Sep 2023 11:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717872; x=1695322672; 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=DMn38YaRL7n1ZrYU6enGHYkM4IPLYAQFbb/wgKNFsZs=; b=Ngm65eBnmiHgPbVZqDaNQ9i1iuI5/FqXHvwYxFDoEc7G+xOHfpQkgTf3vhw3dmNgIp hZT7ezioSFeEUgap7GxvWkvEGBYmFkCPOzVT9s6Q+1uFlhTzSUIuDEDJ+hNmNj/ZOutf LGj83M4euoVh1/nJYKwXOlKEm5toqc0Ouww+mZVy597v9zeYgoQKuIHdvDu+yGuwNI9h kFwpCnl4z2Zu2uNaXl4++Z1OQAe3eT1lT3MqHBL0OXgepXnEAi3Tq3IfDFR/j4CLv5XG j9jNR0lSA7wyRY9gfT9HwaJbCVyaRoNFDowzcVCT5QilQa+2BP1U/zfYvdm4NIGEUo2S j5YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717872; x=1695322672; 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=DMn38YaRL7n1ZrYU6enGHYkM4IPLYAQFbb/wgKNFsZs=; b=WM/KxlXk5fvZk+QEEI6FB74Cn9TG0N63d1Zr8EbCj8ztGFcEzV4duUkvyY401GGm4E 4x6mv6/NkA20SjUrVMqWq5CpJD5Ut3AEXLwflFiZClXXb+6aTOJkN/TkqvcDEnAT/8n3 Xp2acuLP3hnb/13p5oThskAI7rfgkWx8zIHD0ohzefxTCXIyRwx6JQhprPNyaD5IWAW1 MZmxOUCjixme2gaNkpoPyDyduOZvv4Gn9p9WN8lK1uevOOr/3vTuCUBjRnBydmNsJLMS CJfX3aaw/Phirzwq1uVlqT64nOMKl1OEddupDckgPf6ArJc7OqaVdWplKsNin5jAjkVu BBrg== X-Gm-Message-State: AOJu0YxiX2vNJsOI7H8LZ1f4cddrqjTqO2fO0gaQ1yk/dRh0xfxziCW/ TMSOmlR+t1qBiDR/RL1W1qDe/3sBH8sLvcCVbrk= X-Google-Smtp-Source: AGHT+IGTT96e/Ayp6To+jfGLrVaLcHYvpRhziH0s7AkzerW8QC3la5axOhrxs7z1xe44B5VI9Z8HOA== X-Received: by 2002:a5d:67c5:0:b0:319:775f:d553 with SMTP id n5-20020a5d67c5000000b00319775fd553mr5521834wrw.9.1694717872003; Thu, 14 Sep 2023 11:57:52 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id p13-20020a056402074d00b005224d960e66sm1243411edy.96.2023.09.14.11.57.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 05/11] accel: Rename accel-common.c -> accel-target.c Date: Thu, 14 Sep 2023 20:57:11 +0200 Message-ID: <20230914185718.76241-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We use the '-common.c' suffix for target agnostic units. This file is target specific, rename it using the '-target' suffix. Signed-off-by: Philippe Mathieu-Daudé --- accel/{accel-common.c => accel-target.c} | 0 accel/meson.build | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename accel/{accel-common.c => accel-target.c} (100%) diff --git a/accel/accel-common.c b/accel/accel-target.c similarity index 100% rename from accel/accel-common.c rename to accel/accel-target.c diff --git a/accel/meson.build b/accel/meson.build index 76f3cbc530..fda3157a6e 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -1,4 +1,4 @@ -specific_ss.add(files('accel-common.c')) +specific_ss.add(files('accel-target.c')) system_ss.add(files('accel-softmmu.c', 'accel-blocker.c')) user_ss.add(files('accel-user.c')) From patchwork Thu Sep 14 18:57:12 2023 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: 1834413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WTWXyOiS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmnn6RW3z1yh0 for ; Fri, 15 Sep 2023 04:59:09 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXP-0007vD-Sy; Thu, 14 Sep 2023 14:58:03 -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 1qgrXN-0007uP-Ja for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:01 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXL-0007fM-W6 for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:01 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bfb17435e4so20873701fa.0 for ; Thu, 14 Sep 2023 11:57:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717878; x=1695322678; 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=t5Rz8HKuvZLDU2N58zBMis6gb93UGW7YVVT09iNRQGM=; b=WTWXyOiSigJOjXcwGBKxGooXul2ODrYEjkF9Db7pafPvUSR7BZbV9wMVEDuXxLpY/Q RbFu2RLAULYwrmx1WHzilpR3wzaTW5CZebfT7QxXlJAIlMgv3FAkj4zAzt7nAqdEHrdJ cXO2jS7VwwCcajDgbFODnAkPpatTYJXFHSjpO4hM13n3hiyH4FTQwyNP/sCX/Qs4oL5l onNq2GZKZHLHh/v4aZNSXFNrdnuRQh0zAqW3bqn9evlugvU77d7BfghsXSZpL5oaSvZj cs2SppSuruq+dzZoSuDahlXHR9zUV5Tqt9rBk+NAdp0oPd7Cz1kVqtlrUU3t3Usa9PDG ZITQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717878; x=1695322678; 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=t5Rz8HKuvZLDU2N58zBMis6gb93UGW7YVVT09iNRQGM=; b=CZWKtZE21RTz0YOyK2RK6hLbkdTVStej0YCpzGYpMexc8/6y2hIp86/jx86sV6zai7 dAEOi6HFbzfUPL1vdk7oE/l644jbtaQIPUIwsB1oH+Yd1frusqLjkvxFbdmrtwE8P5un 4L8hn+L+Hxctb70brSyxN9wC6cToGRwzQZr8kkb9/YSOOlwFei5CynDvAFRHxC/wxHHW 0nTIUAnGp61KO/Byt01idS0FrVxXEvjFfz+w9h/dMZRu8/csmogcNkRBY8DpKf4YIZyr LT6QLC+38pyLc/d3Dz2s5Defp1XMX3rhl4FJIkkLSUheij+/5bhtu/80BsR6YlzyPbdh JhNg== X-Gm-Message-State: AOJu0YxRmFARkNQUoKmNCcoXGx0yOmRY08bDCpngs2Vn+P3EAIsoWqoA ltEgP33fk88pFKW7GSNmak+xd3iWX1VZkbWOhBs= X-Google-Smtp-Source: AGHT+IFrpywYo6gUXk0tKxFk2qDI44GdC/4tVbLXtZSg9Lz27cqZI4oR40375IwXBR6x2ixBjchAvQ== X-Received: by 2002:a05:651c:8f:b0:2bf:9576:afd4 with SMTP id 15-20020a05651c008f00b002bf9576afd4mr5370974ljq.16.1694717878158; Thu, 14 Sep 2023 11:57:58 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id x7-20020a170906134700b00992e94bcfabsm1378249ejb.167.2023.09.14.11.57.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:57:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 06/11] exec: Rename cpu.c -> cpu-target.c Date: Thu, 14 Sep 2023 20:57:12 +0200 Message-ID: <20230914185718.76241-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We have exec/cpu code split in 2 files for target agnostic ("common") and specific. Rename 'cpu.c' which is target specific using the '-target' suffix. Update MAINTAINERS. Remove the 's from 'cpus-common.c' to match the API cpu_foo() functions. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 ++-- meson.build | 4 ++-- cpus-common.c => cpu-common.c | 0 cpu.c => cpu-target.c | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename cpus-common.c => cpu-common.c (100%) rename cpu.c => cpu-target.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 00562f924f..12261d8eaf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -139,7 +139,8 @@ R: Paolo Bonzini S: Maintained F: softmmu/cpus.c F: softmmu/watchpoint.c -F: cpus-common.c +F: cpu-common.c +F: cpu-target.c F: page-vary.c F: page-vary-common.c F: accel/tcg/ @@ -1772,7 +1773,6 @@ M: Marcel Apfelbaum R: Philippe Mathieu-Daudé R: Yanan Wang S: Supported -F: cpu.c F: hw/core/cpu.c F: hw/core/machine-qmp-cmds.c F: hw/core/machine.c diff --git a/meson.build b/meson.build index 5150a74831..3e86a6cebf 100644 --- a/meson.build +++ b/meson.build @@ -3416,8 +3416,8 @@ if have_block system_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')]) endif -common_ss.add(files('cpus-common.c')) -specific_ss.add(files('cpu.c')) +common_ss.add(files('cpu-common.c')) +specific_ss.add(files('cpu-target.c')) subdir('softmmu') diff --git a/cpus-common.c b/cpu-common.c similarity index 100% rename from cpus-common.c rename to cpu-common.c diff --git a/cpu.c b/cpu-target.c similarity index 100% rename from cpu.c rename to cpu-target.c From patchwork Thu Sep 14 18:57:13 2023 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: 1834414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=WXVUVxvT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmnp667Hz1ypL for ; Fri, 15 Sep 2023 04:59:10 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXX-0008CM-G3; Thu, 14 Sep 2023 14:58:11 -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 1qgrXV-0008Ba-Px for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:09 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXU-0007gN-55 for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:09 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a9d82d73f9so163797366b.3 for ; Thu, 14 Sep 2023 11:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717884; x=1695322684; 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=ERgMDJMkahr3XFEFhk4ErfsRHoVl4er/YInzsDCH4Z4=; b=WXVUVxvTCu8foWnNo9BRqqrz3tSdDe9Jre13jXMoN9/U3MunVIUWvg/RLDCSxeoC2y ZQlAcGCX+OzZwS65zQIxt6Eh83hkRZ3Wnrhs+/QE1Rmsq/Nc/wTxHNr1P35Mlh72/dkb T8w9y/1/M4cNxGmp30pxZ4wk8Rv+rj3c0xZHF4kQXuzJXad0uTEiDrn9HTU5oXlVdeoo OeIueVg3AdjAdU0pS/pBugKXToSmG3+hB/0Zx2I8UybD5x6WFgQ19rHZ1Kb7hDqYIkEL F6RCaQhzVhdQU9IUSFhesHm2aC+rbA0AI+b0nAmc9ujtFSVWq+MnsHXNmTa8DSLcrPy1 d0Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717884; x=1695322684; 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=ERgMDJMkahr3XFEFhk4ErfsRHoVl4er/YInzsDCH4Z4=; b=dR1kfpcGh+XWlOp35VlcTRa0fywLWZvhKepwgtZgniRAw5/uI09fhcNv1r2jI43lVZ uCaTcmt9wYJlCMVTV60ThMl/nrL2nUkCJ4AndMdmbpSnx90CvIGG7FDYqLIXzWxbRGSF UQ5Z/jd5KqvEMI+Eil4jyL+5W+GKvFDauvulNEp/bT6Sky+et2Gkm3Yi0eWbRMqNpBQj /B/IF3qVGztSvshcq1PKhPk2OXDgtgVtgoY7tehmZ19DSczs+/mOUzA9fPOhDeOZmAZN egNI8TSTqX6eGlnuOW7DT05o47zV+/1aKQ+DQlJpo6MzjNCLodIAj3ghnBnELmNBAFJJ Zb9A== X-Gm-Message-State: AOJu0YzZvEy+l6H/VFpQY5wIwHqiwIbUmZVAvcWcT2qxjvRPUar8u7vu +9WBE+29EASNi4Xm/nCPH5SZupiODJL7uREjDvI= X-Google-Smtp-Source: AGHT+IHmyV5+Uwpjq0FECFfVEiJ+NUP9C4xz1sxWkddBeIjyo/HJzPQ58NjmnNTkluGiYtrjjhCy6A== X-Received: by 2002:a17:907:1de0:b0:9a1:bcf9:4f99 with SMTP id og32-20020a1709071de000b009a1bcf94f99mr5196658ejc.36.1694717884400; Thu, 14 Sep 2023 11:58:04 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id z18-20020a1709067e5200b0099d798a6bb5sm1358721ejr.67.2023.09.14.11.58.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 07/11] exec: Rename target specific page-vary.c -> page-vary-target.c Date: Thu, 14 Sep 2023 20:57:13 +0200 Message-ID: <20230914185718.76241-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This matches the target agnostic 'page-vary-common.c' counterpart. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- meson.build | 2 +- page-vary.c => page-vary-target.c | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename page-vary.c => page-vary-target.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 12261d8eaf..ff436dbf21 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -141,7 +141,7 @@ F: softmmu/cpus.c F: softmmu/watchpoint.c F: cpu-common.c F: cpu-target.c -F: page-vary.c +F: page-vary-target.c F: page-vary-common.c F: accel/tcg/ F: accel/stubs/tcg-stub.c diff --git a/meson.build b/meson.build index 3e86a6cebf..3282f888a3 100644 --- a/meson.build +++ b/meson.build @@ -3439,7 +3439,7 @@ if get_option('b_lto') pagevary = declare_dependency(link_with: pagevary) endif common_ss.add(pagevary) -specific_ss.add(files('page-vary.c')) +specific_ss.add(files('page-vary-target.c')) subdir('backends') subdir('disas') diff --git a/page-vary.c b/page-vary-target.c similarity index 100% rename from page-vary.c rename to page-vary-target.c From patchwork Thu Sep 14 18:57:14 2023 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: 1834411 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=edF1e7Cc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmn04bNrz1yh0 for ; Fri, 15 Sep 2023 04:58:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXl-0008GS-11; Thu, 14 Sep 2023 14:58:26 -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 1qgrXc-0008Dj-HQ for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:16 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXZ-0007hx-DL for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:15 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-502e6d632b6so1820060e87.0 for ; Thu, 14 Sep 2023 11:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717891; x=1695322691; 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=G6XhQZvVBgWC3+5NPxxq2ysGkpZ/RJnJQOM81+rYNCU=; b=edF1e7CcdB8GQiaqS08m0eSaRV+oIC9431bmr6LlW5PrBliLA11KGDzluloDPejeDw npxKc7RRaDlY+ORzJizuKwyGehvLZ/T5vYq3MbUY9+M70/1cpNX+l1cfnHGfEmVOcFHW WQc689ufhgZnWy6ws+QxGbhIA2meNxoxkXRLFv5vdg4mf67SxfXwPK2rDZU5nIezbpcM FeKWEAyyNoypqC0vbkRsgt/l1LAIAPrEaiCKbvqnjleVI2Z3DLGaMWwR+3ZX9j3jmQf4 ezlbYO328CzxAH8lHOeXnpSZ6hCgbShpKj+f61mEl8Mp7zahskhMWfh6i2xRLZbtzsDZ hUPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717891; x=1695322691; 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=G6XhQZvVBgWC3+5NPxxq2ysGkpZ/RJnJQOM81+rYNCU=; b=Il33jqw6/V1NUW210s0H7fkL/b/2xDfXpYoCzZR0pxG3YG9ENozXk7xH6oLSopyPK2 Z6ZExclhq+D3UwkjZiHUVmJtFMOUqDcrqqt50nUXGp7ern6/JLnT3f8kgdfy8HrhNBfG RMAZhifAwftEREueIQHQJ5frQqI9FWS8Nb25rhlRRksZ0aIIE/sbKcJx/3dOX/PMUI6p SYAypsWP1+lsAThFQ6peDhr49S55CRd40hNITfBSvmelff30PMAoDWEXF4rYTQjX0Gea zq57rP2lg4xeTqiyoVY4TBvLVGBeDPX4viIhv5w3P2S3uTsrNJ7QB9nlvMQHgB9LMdCb HkPw== X-Gm-Message-State: AOJu0YyfkQx7dg8XZ+/qHm3Q68DRoUwlAYJz2/uIBVwPmuJU2AWNCwEp 9oHt9KGqzyP9MvpRzI3kGakszEcRoV/ii4dtEWo= X-Google-Smtp-Source: AGHT+IHC34KyrCVfawNGi1ABBB1sIvfem2FX8Jyt9TTVwAukqyD6G7zNvyZsmiqk2z47qQ8qTlaivg== X-Received: by 2002:a05:6512:1151:b0:4f8:74b5:b4ec with SMTP id m17-20020a056512115100b004f874b5b4ecmr6051126lfg.41.1694717890738; Thu, 14 Sep 2023 11:58:10 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id b17-20020a1709063f9100b0099cbfee34e3sm1370102ejj.196.2023.09.14.11.58.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 08/11] accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h' Date: Thu, 14 Sep 2023 20:57:14 +0200 Message-ID: <20230914185718.76241-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org accel/tcg/internal.h contains target specific declarations. Unit files including it become "target tainted": they can not be compiled as target agnostic. Rename using the '-target' suffix to make this explicit. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/{internal.h => internal-target.h} | 6 +++--- accel/tcg/cpu-exec-common.c | 2 +- accel/tcg/cpu-exec.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/monitor.c | 2 +- accel/tcg/tb-maint.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c | 2 +- accel/tcg/user-exec.c | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename accel/tcg/{internal.h => internal-target.h} (96%) diff --git a/accel/tcg/internal.h b/accel/tcg/internal-target.h similarity index 96% rename from accel/tcg/internal.h rename to accel/tcg/internal-target.h index cd6b9eb7f0..4ce3b29056 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal-target.h @@ -1,13 +1,13 @@ /* - * Internal execution defines for qemu + * Internal execution defines for qemu (target specific) * * Copyright (c) 2003 Fabrice Bellard * * SPDX-License-Identifier: LGPL-2.1-or-later */ -#ifndef ACCEL_TCG_INTERNAL_H -#define ACCEL_TCG_INTERNAL_H +#ifndef ACCEL_TCG_INTERNAL_TARGET_H +#define ACCEL_TCG_INTERNAL_TARGET_H #include "exec/exec-all.h" #include "exec/translate-all.h" diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index 8ac2af4d0c..55980417b4 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -22,7 +22,7 @@ #include "sysemu/tcg.h" #include "exec/exec-all.h" #include "qemu/plugin.h" -#include "internal.h" +#include "internal-target.h" bool tcg_allowed; diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 0e7eeef001..f5625e047a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -42,7 +42,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" -#include "internal.h" +#include "internal-target.h" /* -icount align implementation. */ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 31e34700ea..a912d746a9 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -35,7 +35,7 @@ #include "exec/translate-all.h" #include "trace.h" #include "tb-hash.h" -#include "internal.h" +#include "internal-target.h" #ifdef CONFIG_PLUGIN #include "qemu/plugin-memory.h" #endif diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index d48de23999..30724fdb98 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -16,7 +16,7 @@ #include "sysemu/cpu-timers.h" #include "sysemu/tcg.h" #include "tcg/tcg.h" -#include "internal.h" +#include "internal-target.h" static void dump_drift_info(GString *buf) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 32ae8af61c..85cf51445d 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -29,7 +29,7 @@ #include "tcg/tcg.h" #include "tb-hash.h" #include "tb-context.h" -#include "internal.h" +#include "internal-target.h" /* List iterators for lists of tagged pointers in TranslationBlock. */ diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 03dfd67e9e..b32e0b80ec 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -38,7 +38,7 @@ #if !defined(CONFIG_USER_ONLY) #include "hw/boards.h" #endif -#include "internal.h" +#include "internal-target.h" struct TCGState { AccelState parent_obj; diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 83e07b830f..6c09b7f50d 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -61,7 +61,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" -#include "internal.h" +#include "internal-target.h" #include "perf.h" #include "tcg/insn-start-words.h" diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index d9fcb4cbe8..65219b52eb 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -14,7 +14,7 @@ #include "exec/translator.h" #include "exec/plugin-gen.h" #include "tcg/tcg-op-common.h" -#include "internal.h" +#include "internal-target.h" static void gen_io_start(void) { diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 17f9aff0cf..f925dd0305 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -29,7 +29,7 @@ #include "qemu/atomic128.h" #include "trace/trace-root.h" #include "tcg/tcg-ldst.h" -#include "internal.h" +#include "internal-target.h" __thread uintptr_t helper_retaddr; From patchwork Thu Sep 14 18:57:15 2023 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: 1834418 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=avRAShtg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RmmpY3s4rz1ypL for ; Fri, 15 Sep 2023 04:59:49 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrY0-0000mD-Ib; Thu, 14 Sep 2023 14:58:40 -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 1qgrXy-0000aw-Pp for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:38 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXh-0007jL-V2 for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:38 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a21b6d105cso166936366b.3 for ; Thu, 14 Sep 2023 11:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717897; x=1695322697; 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=Y8/rRDkqjHLNiQmWwYh6x6u6ajkv9cBUtG5tp1iGRHE=; b=avRAShtgPYzb8lrsiYEXtqGaamTUo5OPDxSen32lR2UTRkUUcKaNk/MEOLxF5Q2g+R MBzdkrbY2vhcWliC9kX0aLs7c3rohagPjqrJBBjDdW8l5/oJzRo5MGKozHQnAYUnUmkL bHbCZ2JEhvw3IJDo3U3hTpnsuYxOYo18GBNBb/TfpEuXuEi7GTFadt0vGydIOZ02SdRi 9sClU+1v0Srk7atVVEB2c5OMafH4i/uvyhBCYRy2Cgw+3nKkRahGLNcq1gFksqVKaHw4 g6CXED5SVYZa2jdHo6+TnMezBHpnRAKZaptL2YCEHDe1T37NirWO6fQk99q9E1Wc6nrT NWDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717897; x=1695322697; 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=Y8/rRDkqjHLNiQmWwYh6x6u6ajkv9cBUtG5tp1iGRHE=; b=WlDU7drf/Ef1acvjKYRHtMyoEMLSxwUjnuvQCYCMOn2yjhywNc02C1IHir72xt7ABI Z/kbtlDwvr0AfpVJZgnfnouG7XXkl2XFji0luW8q5W0C1Y3M+B3ygVcuHx+2BAkswMWY B0ff2SjVnTx0isjfvxWk9Oe7yA7g+3pB43OcE25AyYbCvkik9KRbhHuTN8H467RgRDtf LvdY4rip5Rsr47dLW6E1qhBcj4QkSSeBuPvIIlszTuvsG/xrKU60AYflaIMSbcT79yg5 4t2YRe4ZropvcYofNyvW/aL8KPUHotJ2zaAWD5jtkA9ML1f6jlLjMVLhpBEm6RloUWV0 FHlg== X-Gm-Message-State: AOJu0YyvpFsiGDuy1wYa8hvTItD9W8xP5Xs4nARWKHHBRueggjFE9Xuc TbuEJHd5BADk8e8ViQYOFE1Sg3i9RGWjUwkrJ78= X-Google-Smtp-Source: AGHT+IG/XpvEcRog6FuOJv2pRpZKwamHI/xgWOUk2v23W3koz2iNfzjLlyVU3tRLDGFR4EJrXqFk+g== X-Received: by 2002:a17:906:5a5f:b0:9aa:20b2:35e7 with SMTP id my31-20020a1709065a5f00b009aa20b235e7mr5174112ejc.9.1694717897323; Thu, 14 Sep 2023 11:58:17 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id qx15-20020a170906fccf00b009a5f1d15644sm1360132ejb.119.2023.09.14.11.58.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 09/11] accel/tcg: Make monitor.c a target-agnostic unit Date: Thu, 14 Sep 2023 20:57:15 +0200 Message-ID: <20230914185718.76241-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Move target-agnostic declarations from "internal-target.h" to a new "internal-common.h" header. monitor.c now don't include target specific headers and can be compiled once in system_ss[]. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 17 +++++++++++++++++ accel/tcg/internal-target.h | 5 ----- accel/tcg/cpu-exec.c | 1 + accel/tcg/monitor.c | 2 +- accel/tcg/translate-all.c | 1 + accel/tcg/meson.build | 3 +++ 6 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 accel/tcg/internal-common.h diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h new file mode 100644 index 0000000000..5d5247442e --- /dev/null +++ b/accel/tcg/internal-common.h @@ -0,0 +1,17 @@ +/* + * Internal execution defines for qemu (target agnostic) + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ACCEL_TCG_INTERNAL_COMMON_H +#define ACCEL_TCG_INTERNAL_COMMON_H + +extern int64_t max_delay; +extern int64_t max_advance; + +void dump_exec_info(GString *buf); + +#endif diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 4ce3b29056..f9eec1ce28 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -99,11 +99,6 @@ static inline bool cpu_in_serial_context(CPUState *cs) return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs); } -extern int64_t max_delay; -extern int64_t max_advance; - -void dump_exec_info(GString *buf); - extern bool one_insn_per_tb; /** diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index f5625e047a..95dd8a30cb 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -42,6 +42,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" +#include "internal-common.h" #include "internal-target.h" /* -icount align implementation. */ diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index 30724fdb98..caf1189e0b 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -16,7 +16,7 @@ #include "sysemu/cpu-timers.h" #include "sysemu/tcg.h" #include "tcg/tcg.h" -#include "internal-target.h" +#include "internal-common.h" static void dump_drift_info(GString *buf) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 6c09b7f50d..8cb6ad3511 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -61,6 +61,7 @@ #include "tb-jmp-cache.h" #include "tb-hash.h" #include "tb-context.h" +#include "internal-common.h" #include "internal-target.h" #include "perf.h" #include "tcg/insn-start-words.h" diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 8ace783707..0fb03bd7d3 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -20,6 +20,9 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', +)) + +system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'monitor.c', )) From patchwork Thu Sep 14 18:57:16 2023 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: 1834412 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=vmguf1RO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Rmmnb3cD1z1yh0 for ; Fri, 15 Sep 2023 04:58:59 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrXz-0000bo-0y; Thu, 14 Sep 2023 14:58:39 -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 1qgrXx-0000Pp-Aj for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:37 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXs-0007lg-DJ for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:36 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-530196c780dso1187510a12.1 for ; Thu, 14 Sep 2023 11:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717903; x=1695322703; 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=59t4hOromC/PDn0NFeyyItwZmRcWGVlgWyhUfZ1MliI=; b=vmguf1ROAShC9f8ytMNAw2gQTfah2flbi7pR9qCw8/2DBUnjJoClJQNbUbXUtolIhc 33Apm5CD5BqrP1tm1v9rckseBCcdvJtPVSi87Ch+muRzGqgzQSio3VLmUl62RqymhYD/ vkukEAOhXu+kF1366/3nL1YmEoAEEd+Pk0NeVHdCiYLiYBPWPB1XAflo0K0QjW2pH3ai 5tRJ/Ms2k27r9gkJhCPo4TjbkGy24zcHPfK6OCAOHGLRIVWR44pIh6BxncOOkf294j7V lAn1wTwRi+9altJkDizZUPpUNDZKX1mj1yEsDDw7HB4QBnJMn7KJoYo0KAUayOqngqwH O9+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717903; x=1695322703; 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=59t4hOromC/PDn0NFeyyItwZmRcWGVlgWyhUfZ1MliI=; b=BPRmrhnF/LxFYSijV5gswX45/oBedLofvQ8K/ggbKWmBB1vnbEhd38u7hxFFZv6yn4 QCEaoszOQi+fKTqgqnDIdKtNJQ8tiFy0Tmz9I7u7y9UPGTlWQ+gGYVPC4MiLSOZZAqrP utx/bSXTOvOjYjyFP/oHzKs7EIxHOGJg4xGcmb0tMah1h3j6jm3SXnGcZUg4ezoYlD88 G2qHBDJgAiIr6GGV/9WT94lWrdU1oy2U2nBzojoi9y2yS64gUw04aYKkz/t8sLXEqdKt 4WZfEE8s02suEgZx71yt99is6nxPxyTftHqqgYvcVbcpEnZR6QMBWpgLKZerIsL3Z6+9 hTLQ== X-Gm-Message-State: AOJu0YwfUIGZv8i6oLSYWdimpBkum6vKx0Btjwg98RPbvudKQDpedZw9 RfvLO4UsssMPEVsgA3OW0Uz8C0ki3kDkOx0cKvI= X-Google-Smtp-Source: AGHT+IHZIaYFboZPt7VamwK55r3z9GjyanynqYAYesdJvbELELrbEi9DWL/PDnIzpVwjUxFy7xqViw== X-Received: by 2002:a17:907:1de5:b0:9a5:d095:a8e4 with SMTP id og37-20020a1709071de500b009a5d095a8e4mr4920652ejc.1.1694717903459; Thu, 14 Sep 2023 11:58:23 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id l13-20020a170906078d00b009a193a5acffsm1346112ejc.121.2023.09.14.11.58.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 10/11] accel/tcg: Make icount.o a target agnostic unit Date: Thu, 14 Sep 2023 20:57:16 +0200 Message-ID: <20230914185718.76241-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Remove the unused "exec/exec-all.h" header. There is no more target specific code in it: make it target agnostic (rename using the '-common' suffix). Since it is TCG specific, move it to accel/tcg, updating MAINTAINERS. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 - softmmu/icount.c => accel/tcg/icount-common.c | 3 +-- accel/tcg/meson.build | 1 + softmmu/meson.build | 4 ---- 4 files changed, 2 insertions(+), 7 deletions(-) rename softmmu/icount.c => accel/tcg/icount-common.c (99%) diff --git a/MAINTAINERS b/MAINTAINERS index ff436dbf21..047d143b9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2912,7 +2912,6 @@ F: softmmu/main.c F: softmmu/cpus.c F: softmmu/cpu-throttle.c F: softmmu/cpu-timers.c -F: softmmu/icount.c F: softmmu/runstate* F: qapi/run-state.json diff --git a/softmmu/icount.c b/accel/tcg/icount-common.c similarity index 99% rename from softmmu/icount.c rename to accel/tcg/icount-common.c index 4527bfbd6e..0bf5bb5e21 100644 --- a/softmmu/icount.c +++ b/accel/tcg/icount-common.c @@ -27,7 +27,6 @@ #include "migration/vmstate.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "exec/exec-all.h" #include "sysemu/cpus.h" #include "sysemu/qtest.h" #include "qemu/main-loop.h" @@ -38,7 +37,7 @@ #include "hw/core/cpu.h" #include "sysemu/cpu-timers.h" #include "sysemu/cpu-throttle.h" -#include "timers-state.h" +#include "softmmu/timers-state.h" /* * ICOUNT: Instruction Counter diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 0fb03bd7d3..4633a34d28 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -23,6 +23,7 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( )) system_ss.add(when: ['CONFIG_TCG'], if_true: files( + 'icount-common.c', 'monitor.c', )) diff --git a/softmmu/meson.build b/softmmu/meson.build index c18b7ad738..3a64dd89de 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -6,10 +6,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'watchpoint.c', )]) -specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: [files( - 'icount.c', -)]) - system_ss.add(files( 'balloon.c', 'bootdevice.c', From patchwork Thu Sep 14 18:57:17 2023 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: 1834417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=W5mcIvqZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RmmpX2ksMz1yh0 for ; Fri, 15 Sep 2023 04:59:48 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgrY0-0000js-SB; Thu, 14 Sep 2023 14:58:40 -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 1qgrXx-0000Rf-HH for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:37 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgrXv-0007mg-DR for qemu-devel@nongnu.org; Thu, 14 Sep 2023 14:58:37 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9ad8a822508so169822166b.0 for ; Thu, 14 Sep 2023 11:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694717909; x=1695322709; 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=2VXjZwiyUYtQa/HjRyWBFYizJrxQIbdLDkyfozxU6z0=; b=W5mcIvqZ505R07GHE8K8McFTzaK5esUE7rYfOXRYZ/vVQoRJDRWtKdj1mojhTW1AsE vmKGJQBgSqc7FuTkiNVRGkXZbRUmQQxx3c1/qN++Y4dtQNJ37UZIveCO2FjXQaVLqqt4 nRL2JDAyEAQc56LHU0cPMCjWaDlsyokxeIs5aGrS7mDm0UiN+kNkK3a5hqVu7bg7wPa/ nruRIFUtgz7aJ79vd/EqqVjDoz377FaxWsyDJ6PhWYf8waIaVmV9u/iOm7qWl4gdJNnD EFy/y760iH1TPG4fMJyXcQelgcJ9rm5p6uupb/3SUwKOAzJkIUfO5AWcJxXYhfc+c+Zf 3f8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694717909; x=1695322709; 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=2VXjZwiyUYtQa/HjRyWBFYizJrxQIbdLDkyfozxU6z0=; b=pzE1upRUOz6oGLHaesmyot0td7cvhgh7tsS2IWDcAKyBnm/DnnFwEKUaKlMap7hXVy vO9OJ9NBM5Mvb2i4UerjbLMLAowAjWXoSoWi8gwDELHkdflfJ7nYmbyDjICk64xpibpC OQN+kWJNcL3g/X076VFIxwerrLd5EWE/67ptCFd6eDZs5EHIllBY8mmphlAeLproNFRW EIMsc0CQVorugeHjnYEIk2v1GoEiO4U3y4KO+oCk8mnhh37sY8b8Qdc6WpRaUXcVvVEk iakgkYGTStZTypw3C+tz9X4nupMkxEYiv4/kTgBewXo3YHe/UWF4BUzBuZhT/vg57X8I bQbA== X-Gm-Message-State: AOJu0YykOq7/RxezX/LSr8rwApzI48s0u2/RoKiIhODAvuv7VRvMwDPw DNjjzKI3kyZEz9G1Sm/OxZteGP22lYjYs/vugCA= X-Google-Smtp-Source: AGHT+IGKF40QIV69DWwxTvDyEp8hMpVezuaP1v1XPmkn17+BFPp8vleSTB4JMvDtBjBt/DjOGZzwoQ== X-Received: by 2002:a17:907:75e5:b0:9a9:ef41:e5c7 with SMTP id jz5-20020a17090775e500b009a9ef41e5c7mr4957205ejc.8.1694717909682; Thu, 14 Sep 2023 11:58:29 -0700 (PDT) Received: from m1x-phil.lan (176-131-223-129.abo.bbox.fr. [176.131.223.129]) by smtp.gmail.com with ESMTPSA id v4-20020a17090690c400b00992b1c93279sm1351396ejw.110.2023.09.14.11.58.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Sep 2023 11:58:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Daniel_P=2E_?= =?utf-8?q?Berrang=C3=A9?= , Paolo Bonzini , Thomas Huth , Alessandro Di Federico , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Anton Johansson , Riku Voipio , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 11/11] accel/tcg: Make cpu-exec-common.c a target agnostic unit Date: Thu, 14 Sep 2023 20:57:17 +0200 Message-ID: <20230914185718.76241-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230914185718.76241-1-philmd@linaro.org> References: <20230914185718.76241-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org cpu_in_serial_context() is not target specific, move it declaration to "internal-common.h" (which we include in the 4 source files modified). Remove the unused "exec/exec-all.h" header from cpu-exec-common.c. There is no more target specific code in this file: make it target agnostic. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 11 +++++++++++ accel/tcg/internal-target.h | 9 --------- accel/tcg/cpu-exec-common.c | 3 +-- accel/tcg/cputlb.c | 1 + accel/tcg/tb-maint.c | 1 + accel/tcg/user-exec.c | 1 + accel/tcg/meson.build | 4 +++- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index 5d5247442e..3b2277e6e9 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -9,9 +9,20 @@ #ifndef ACCEL_TCG_INTERNAL_COMMON_H #define ACCEL_TCG_INTERNAL_COMMON_H +#include "exec/translation-block.h" + extern int64_t max_delay; extern int64_t max_advance; void dump_exec_info(GString *buf); +/* + * Return true if CS is not running in parallel with other cpus, either + * because there are no other cpus or we are within an exclusive context. + */ +static inline bool cpu_in_serial_context(CPUState *cs) +{ + return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs); +} + #endif diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index f9eec1ce28..932bbe4b63 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -90,15 +90,6 @@ static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb) } } -/* - * Return true if CS is not running in parallel with other cpus, either - * because there are no other cpus or we are within an exclusive context. - */ -static inline bool cpu_in_serial_context(CPUState *cs) -{ - return !(cs->tcg_cflags & CF_PARALLEL) || cpu_in_exclusive_context(cs); -} - extern bool one_insn_per_tb; /** diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c index 55980417b4..b6cc387482 100644 --- a/accel/tcg/cpu-exec-common.c +++ b/accel/tcg/cpu-exec-common.c @@ -20,9 +20,8 @@ #include "qemu/osdep.h" #include "sysemu/cpus.h" #include "sysemu/tcg.h" -#include "exec/exec-all.h" #include "qemu/plugin.h" -#include "internal-target.h" +#include "internal-common.h" bool tcg_allowed; diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index a912d746a9..400d9ee0d0 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -35,6 +35,7 @@ #include "exec/translate-all.h" #include "trace.h" #include "tb-hash.h" +#include "internal-common.h" #include "internal-target.h" #ifdef CONFIG_PLUGIN #include "qemu/plugin-memory.h" diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 85cf51445d..b194f8f065 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -29,6 +29,7 @@ #include "tcg/tcg.h" #include "tb-hash.h" #include "tb-context.h" +#include "internal-common.h" #include "internal-target.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index f925dd0305..5bf2761bf4 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -29,6 +29,7 @@ #include "qemu/atomic128.h" #include "trace/trace-root.h" #include "tcg/tcg-ldst.h" +#include "internal-common.h" #include "internal-target.h" __thread uintptr_t helper_retaddr; diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 4633a34d28..8783edd06e 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -1,7 +1,9 @@ tcg_ss = ss.source_set() +common_ss.add(when: 'CONFIG_TCG', if_true: files( + 'cpu-exec-common.c', +)) tcg_ss.add(files( 'tcg-all.c', - 'cpu-exec-common.c', 'cpu-exec.c', 'tb-maint.c', 'tcg-runtime-gvec.c',