From patchwork Thu Jan 25 05:46:27 2024 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: 765937 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp2456199wrx; Wed, 24 Jan 2024 21:47:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoUBlXbrtNQ7elPHCiLYNHEpBV5EhG54TaVD2fZJJxZ2unScSSBCQ2SMJp6jCyta5yf6ay X-Received: by 2002:a05:6214:5292:b0:685:8ac0:c027 with SMTP id kj18-20020a056214529200b006858ac0c027mr592475qvb.23.1706161664614; Wed, 24 Jan 2024 21:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706161664; cv=none; d=google.com; s=arc-20160816; b=t099eR6Ide/oA818Q0UtqJCewKSF0uZ2OFcNNdX+AxOYVj2fpt/gx339onLxzG1S/A KraUIbMLizayjKwfIEIcsPcMgVdaU1f+XKn4nk6KVRQRzrJARFlQUo3CU3jalkzTe6td WoGYnPNv921cpAlYBMuN1Ohwv92mWxPC8TwFzRAKGdBl2OghbUTfTXQHj3MG9D9e5w12 P+uaTML5kosYdF81AIlNV8WLdoMKHU4i48Oor4HtU8bnzUFWc2Y6glC1IpVSkdnDpu9a 5zoy0Knk4Fc7bAF6UHq9tnxltam2RiA8U2QF6bybIuDNd994BgwxE/SOjSrbdHYs785f cOlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=gtZZ56sUzFTpCzbFwRT2nXA8GRG0nPaTQ7hzW7FZp3I=; fh=PH6DK3Gz+jGX07KZsiFCSUMSkLbLwqId1g9Ie1oeCso=; b=wK/qJft/u6eoP42eBz/K503TPCQE+/wwcd8+CReK7M+8ToY7syzTs2pOcvxwufHr8b ofyaeBMDpmhwnllCKvL3qk7QvafaFLLz7+i+TNsxpWLf3MWBRU10+4Afdf8uB4GhelcI 6/Ef1K38Qj1jNnDWiUWSLfZUjOsOJ/mnpXOGv1WQXynodHiA7ENN5YNA1Wse2Yay6df0 186a14Yykci1rVhoTplj6B8j+TAheJgRef6PVJJFGq3cN7jsQ9AVwj1x7zwvUj824ncA mC6ArscUBs38eMBm4Hm6W8UaOnAE/egvrZ4A+sLS5VtUAGNwoMI9PfB8hsPEsEE/oK+E FyPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AkxVy75D; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q15-20020a0c8ccf000000b006869f273a31si5713977qvb.123.2024.01.24.21.47.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2024 21:47:44 -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=AkxVy75D; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSsZZ-0007oj-6F; Thu, 25 Jan 2024 00:46:45 -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 1rSsZX-0007oG-DV for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:43 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSsZV-0008B4-R9 for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:43 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40e80046264so79231245e9.0 for ; Wed, 24 Jan 2024 21:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706161600; x=1706766400; 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=gtZZ56sUzFTpCzbFwRT2nXA8GRG0nPaTQ7hzW7FZp3I=; b=AkxVy75DKF4EkwXLLXBgyzngW34vQl7rQLgjYulZTAWHoCZZxkkUv+KqkLnuRBfCqV 01j6o7U/IbynYDX2JzDj6bHd7OU2ROtHQy/MOM37iEAy8MmtaQdW1THvDTsozpNrtwba bADqrmM3iGMEzn9zNcE9zXw6hQJFhW5R5CQUK5WbG73dwpBUlJPAFoT+sxv+KTCOx73j vvliK53+kChDxI7x9K3pzJKHbbixzBC/wAAbAZxIKGN2IBxnWTprsER+E1x6s0SR5NGS +t3QBn8qxks1itb1iHYsZYzb7rhdyLv1zfCozwof3yygczohrr5/z2MeNMtYy/VUfNgu Xjhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706161600; x=1706766400; 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=gtZZ56sUzFTpCzbFwRT2nXA8GRG0nPaTQ7hzW7FZp3I=; b=VoILyxI2+QKSQ7CE/Xat6sP/n8MfnkAQHuGvSEDTIfBb3OC9kfftGDTB/zXSxFGfra cm8REk3R27I51AsRIQ/jYVCd6rGZR5z+thIN7G7a0Tw9aQLdwvjteyDtkF9WeOqXsK97 6MdyxqFFfixXviIKs9GENHkjEwWX+0xaLwSBJIS4kEBBwfX6MGEjVFA4mmJl9BNfoPy6 33Koq+udyixfoHmKOb6HkH9zgscIE3CyX7vhYctzuWSTcSQO4TK7Wu69aZiVXKe51IqN bHwqKrMta3vRY6P1UalZwRRBJfYJN02B8fPhQRyAd54JVxZki9LDb5tuGdkd/nsFMeLn z7Rg== X-Gm-Message-State: AOJu0YwJB9CrgTE6KmyDHBNGwfaRLK3HevmElXHa50zc5mGuFH7f7iOt AFnl6nO+VCMxTJfEzvyxbo4W2DMRtzgPmmvHFVKpVPTJXvXYE9F/oVWBC8zodjLfS0NBk1XOCOo q X-Received: by 2002:a05:600c:1911:b0:40e:a7f0:a0f8 with SMTP id j17-20020a05600c191100b0040ea7f0a0f8mr173352wmq.33.1706161600099; Wed, 24 Jan 2024 21:46:40 -0800 (PST) Received: from m1x-phil.lan (lec62-h02-176-184-19-125.dsl.sta.abo.bbox.fr. [176.184.19.125]) by smtp.gmail.com with ESMTPSA id b1-20020a5d4b81000000b0033920dfd287sm14975418wrt.19.2024.01.24.21.46.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 Jan 2024 21:46:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , Richard Henderson , Ilya Leoshkevich , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH v6 1/4] accel/tcg: Make use of qemu_target_page_mask() in perf.c Date: Thu, 25 Jan 2024 06:46:27 +0100 Message-ID: <20240125054631.78867-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125054631.78867-1-philmd@linaro.org> References: <20240125054631.78867-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich Stop using TARGET_PAGE_MASK in order to make perf.c more target-agnostic. Signed-off-by: Ilya Leoshkevich Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231212003837.64090-2-iii@linux.ibm.com> --- accel/tcg/perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/perf.c b/accel/tcg/perf.c index cd1aa99a7e..ba75c1bbe4 100644 --- a/accel/tcg/perf.c +++ b/accel/tcg/perf.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "elf.h" +#include "exec/target_page.h" #include "exec/exec-all.h" #include "qemu/timer.h" #include "tcg/tcg.h" @@ -335,7 +336,7 @@ void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, /* FIXME: This replicates the restore_state_to_opc() logic. */ q[insn].address = gen_insn_data[insn * start_words + 0]; if (tb_cflags(tb) & CF_PCREL) { - q[insn].address |= (guest_pc & TARGET_PAGE_MASK); + q[insn].address |= (guest_pc & qemu_target_page_mask()); } else { #if defined(TARGET_I386) q[insn].address -= tb->cs_base; From patchwork Thu Jan 25 05:46:28 2024 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: 765936 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp2456197wrx; Wed, 24 Jan 2024 21:47:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNvsUCVYbpMPxO4agHQwdwDrYpATiufqVdS/cfbwdBJ710++AIYYg2DopqsB5ZIy7Dabnn X-Received: by 2002:a05:620a:469e:b0:783:9b8c:9df1 with SMTP id bq30-20020a05620a469e00b007839b8c9df1mr769433qkb.109.1706161664657; Wed, 24 Jan 2024 21:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706161664; cv=none; d=google.com; s=arc-20160816; b=xgA/Oc09FZQAl2K/Hruh73tF1mWIB2DlrYBNxhokafbc1evKMbRRyQxeYAHX77+BGW XKH/cp+Q3Ag4RfdYQIRsUIbX4F8TaZRiPJTOBfMNtQ9ZJ4w9bPNhcf1iaOe9qvzDhiOw 0zTw7yCw457j+kgGBOwa1nuz40qQ747ZHB37yPS5tnBHzb9UH9qfspBdq1z6z2pqB0mN H+IW4b1tqONqK5YL1a73lo/G0LHZbx9BtSdRdgEfbZ58v0MIGUo8+LQ3Cvw/YNIAaUm5 9F8C0FmwoKL8xl0+sPIwrwHnnKm2c9NvxmzTmy+pVTCchPpn8yYRi+zhLLuRh0R0GrMW EK9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=mlziz7lxiFfxqERLwu2Z/ykkuXDC5BV2AXyrO7ib6Qk=; fh=0Le5rrZoRzk7mp1WVwZvEmf4sg2/sCIatJkU6I7fkh8=; b=ZO/RcYrLuRd3Vf/nLI5YeIE3OVoWkvmtwSRhUJQTw08rvivaOOupNt1bTw//6Yv547 x/GfUYUa3qd+LB5oQGJ8Zb6eN+19LZAnz121TAT6DDGIZsR+bL/tbEYOJ6d8pVi1YAPf fvQ8u31VquKrU3rzlir7CM8icCjBZ7YE4WQP1fj5c675/b88Fl+fW9xhMTA062w7hxpG 5AmESDq+CN8Wb9Eo4S8j0x6LZohgQUGGh5YtP5hUPYSP/D/pl1srL5r7Xc5fLahUnm8p vGw1KLIycbXcPESsDlbaNYw1vy298B8XFD8a04NxU1dSVajAdqyj6VRnCiWcODUMzjhC HGeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VO4ZVAdV; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e4-20020a05620a12c400b007831f959d9bsi11580385qkl.213.2024.01.24.21.47.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2024 21:47:44 -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=VO4ZVAdV; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSsZe-0007p5-Tu; Thu, 25 Jan 2024 00:46:50 -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 1rSsZc-0007om-MQ for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:48 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSsZb-0008BU-4D for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:48 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e9101b5f9so69801065e9.3 for ; Wed, 24 Jan 2024 21:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706161605; x=1706766405; 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=mlziz7lxiFfxqERLwu2Z/ykkuXDC5BV2AXyrO7ib6Qk=; b=VO4ZVAdV+T5IgDe7+YwXwH0qcmoZKow9WlwrquRaB/gTn0cpds4HehsmzHb5ij5pWQ XQYWw52OrqvA5ZTC3o+avpGha28q4ZITle4HWcAfPCJb/JwfmMsTrlUp9WlNn7BOlUC4 2tcpdvubYecwWsyXDTxpEysM0avEQyREd4fRt3fSI/iEGKcqwK6eDHWu+mONXsj6+lbq qN52nVd0XDucGV+VD7GFFTBmkiKtHjRaHlCpIuWO/X+VqdjyHk2vyxxRhaE7P91iX1c/ eVflRhV7A+ZjphldR1Oru38IiF4Uq8UY7dsDmxL9fsjK/m9nKAx7vNGsIh2qVhK37d93 bapQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706161605; x=1706766405; 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=mlziz7lxiFfxqERLwu2Z/ykkuXDC5BV2AXyrO7ib6Qk=; b=ocMgAA9bHxOghMlEfZbrZSRYq6wKB/LQu7K1goVfHlbds11wlS0G2bnxwsx3gwiI2Q f4YkM2SMfoAFevz61uZaErmDmhHtf0ETvpPmUPxycvnyNmP+ptN3TE1bZVhLM9tD9Udn 3Z4dbnb+SEMvn+0v0OARFwKF0sGr0PMfFKbmbeLbq1aGxm3dh4ZfO7/etSrUf/JGk9O0 gTQVyhoExLy4eFehttjs5+jVBpe28s/Z4fw60rEJ5iy+wHPCZrrteg7hS7D0tAO9LAV1 /nih08wRRDQl5KbSLnRlffiZG9U2NGU2jQd99fLeEhqRZcgGalk4eaVnPY/htpXOXRCt J6iQ== X-Gm-Message-State: AOJu0Yzm27rzMB1DAh7wqEycmcFnc2Zvz72y0m7BeDKHllKPV6rEkgak QZBNl+1xF9ALsAn9mbNWxz7Xi4znBSDi+k9yjD7FLgHS52sUxAiw/PtLDTL210BYAs0NPqduOif 8 X-Received: by 2002:a05:600c:2196:b0:40e:71e7:b2e4 with SMTP id e22-20020a05600c219600b0040e71e7b2e4mr196531wme.60.1706161605577; Wed, 24 Jan 2024 21:46:45 -0800 (PST) Received: from m1x-phil.lan (lec62-h02-176-184-19-125.dsl.sta.abo.bbox.fr. [176.184.19.125]) by smtp.gmail.com with ESMTPSA id m33-20020a05600c3b2100b0040d81ca11casm1215329wms.28.2024.01.24.21.46.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 Jan 2024 21:46:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , Richard Henderson , Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 2/4] tcg: Make tb_cflags() usable from target-agnostic code Date: Thu, 25 Jan 2024 06:46:28 +0100 Message-ID: <20240125054631.78867-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125054631.78867-1-philmd@linaro.org> References: <20240125054631.78867-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich Currently tb_cflags() is defined in exec-all.h, which is not usable from target-agnostic code. Move it to translation-block.h, which is. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-ID: <20231212003837.64090-3-iii@linux.ibm.com> --- include/exec/exec-all.h | 6 ------ include/exec/translation-block.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index df3d93a2e2..ce36bb10d4 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -459,12 +459,6 @@ int probe_access_full_mmu(CPUArchState *env, vaddr addr, int size, #endif -/* Hide the qatomic_read to make code a little easier on the eyes */ -static inline uint32_t tb_cflags(const TranslationBlock *tb) -{ - return qatomic_read(&tb->cflags); -} - static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) { #ifdef CONFIG_USER_ONLY diff --git a/include/exec/translation-block.h b/include/exec/translation-block.h index e2b26e16da..48211c890a 100644 --- a/include/exec/translation-block.h +++ b/include/exec/translation-block.h @@ -145,4 +145,10 @@ struct TranslationBlock { /* The alignment given to TranslationBlock during allocation. */ #define CODE_GEN_ALIGN 16 +/* Hide the qatomic_read to make code a little easier on the eyes */ +static inline uint32_t tb_cflags(const TranslationBlock *tb) +{ + return qatomic_read(&tb->cflags); +} + #endif /* EXEC_TRANSLATION_BLOCK_H */ From patchwork Thu Jan 25 05:46:29 2024 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: 765935 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp2456201wrx; Wed, 24 Jan 2024 21:47:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4qWI89x3QFzh/a8d1M8LGtPrW/J/J2fftZiDQbMUb0xX9VnLWC/F3bhijk1aveURn3TQJ X-Received: by 2002:ad4:5ce5:0:b0:681:7ae4:bce3 with SMTP id iv5-20020ad45ce5000000b006817ae4bce3mr549122qvb.128.1706161664944; Wed, 24 Jan 2024 21:47:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706161664; cv=none; d=google.com; s=arc-20160816; b=Q1A/CTMq7UehBndE/2NXtfMn7wo+Pw78qNjyQsrwCYrU0YFeqpsrraIx2H3Zmyq0XQ /7zxqmG8vRiFljviliQbnCI0h4zaEoMaBeGC6bpD3mu3PKAyTTTqFrgKC/1dIHLT5rkt Ej2dENkl9+kMEctQHfzyWFopGv9nAm8liqclLt84a62Tmz3kv3gCNMRYMDqoGIV9VbNM 3B5t9SilBkgy5B/oQbRlFgkP0I8T5euVGuYEjMxl0Gc32g9OCPCuDSPhNNXkqnBF4emj 6JJcBTITTegdyGMDJzJgYSoYnqIeH93ktlaTi3A0CUBMLhe4BOmiiYjc78ne3+FviVli OY6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=1YhPWyC91/ZoF+G+aVXM2Nb81LOfH7Ct4OFLJMJHbq0=; fh=vc3ketqcBesVEenIlg0vbHcSP7M/GhvjFrsk8EgMEqc=; b=AYDVYUls2FvBFSCkdO2Ge2rmmJCP6Sg2s45tFgka0kSWYIpct3HF+Ls4eAkrY5X/bi u2ZkJrdfsaGEBk6uYTY48hZLs2RH0lGavRoCyTw/8uYmCWHli9/FwIAtJ9NxUG+AYibr 2folH7j1u5N7KekL4HjeTdA0l94YpDePvV5rYo7mznRvlmhZV8UatF7mXXpR/97YPYSt cob/SiLRpdrmZZLRfhaL1KcVpznxYS4tODodS5kiRuDAQeaBk1xhjCtEWh+02MPEPPm6 3ysyuHRR71scroT5jV3XyOhWAloNgbfZ3tcnxjFj0iwaIrRXFwu7SGHzDc6aLewZ3XX2 Y3GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lE7cZ+tS; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e16-20020a0caa50000000b0068197b8c045si11520897qvb.461.2024.01.24.21.47.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2024 21:47:44 -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=lE7cZ+tS; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSsZj-0007pr-GZ; Thu, 25 Jan 2024 00:46:55 -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 1rSsZi-0007pX-8r for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:54 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSsZg-0008Bs-Jl for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:46:53 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40eccf4a91dso9144015e9.2 for ; Wed, 24 Jan 2024 21:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706161611; x=1706766411; 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=1YhPWyC91/ZoF+G+aVXM2Nb81LOfH7Ct4OFLJMJHbq0=; b=lE7cZ+tSYh99SwXHQvvviK700CjV2y9Yh7mBE/hcBQ5ohjCQm+5NnkFwSZTqeXMHOc AJaxo5+MT4KZhWMcMSreL2JI6FMOdka/a3YPeisFWEFWxHHLMaxzwVpdaIGYZVXUvuPB BvZa/odiNE8vstXVZeHsRAX9ozE6HKj2gt6jXno0AY4FEnwigZmG6E4dk8QgICgAitRO plahEzohegurcVoBpynnnQVPERk6jB/qIsyWcXzu09VJkAXkwE5TjFWOwBBSFxjxZa6i larVLzaL5h/gSt7yrLzhtcliYeZ5cAMmWs3LDlQ7E2n6yc1S38H+/F87L4c0Q2dDfdps 0W7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706161611; x=1706766411; 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=1YhPWyC91/ZoF+G+aVXM2Nb81LOfH7Ct4OFLJMJHbq0=; b=uZ0qpKgr54gWvSYWLQ/BBZTtGE09p8KEy720sVnNOn+mguIVISIxm//E+E81Bae/RR ICTi15efPf9r0hQ9/pLmV9l8340JV7wK9eoc5pV6XXD0sAOyLV2dngi63p/hd0fLtC79 +OdusxJL9j4D4O65j00PCXZaU+vRwgjUEiq+06ZmaJM67fuO1+sSy8y1KO2CxZy6hL/B UGSlWO+shjaiVx1Ju20R0GOyeiT4onIoEY8DFb++j8+nFU+Bs4nBtOZ+8fl86p3SGr6+ wzqi4aULV3KraTe5z/6GRaedvn4UEpyrZcAn/13BryO3zGWQATUMfEmf8xG1ZneEk6mR Dfjw== X-Gm-Message-State: AOJu0YxhFfsbZHBAmoTCI4bXyvTtd7hGGhUjbI0Mk8m6pg0n/Hs8wRLU EeutYMpA4dy+FRLsVnVg6Za9dyt+z5nPod4Iqnai6hSAbkNZ0RXXzAlcb2CCxngWRBEyq003q9D R X-Received: by 2002:a1c:740d:0:b0:40e:55bb:a0b8 with SMTP id p13-20020a1c740d000000b0040e55bba0b8mr151428wmc.157.1706161611046; Wed, 24 Jan 2024 21:46:51 -0800 (PST) Received: from m1x-phil.lan (lec62-h02-176-184-19-125.dsl.sta.abo.bbox.fr. [176.184.19.125]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c4e8700b0040e4914f28dsm1228615wmq.18.2024.01.24.21.46.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 Jan 2024 21:46:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , Richard Henderson , Ilya Leoshkevich , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v6 3/4] accel/tcg: Remove #ifdef TARGET_I386 from perf.c Date: Thu, 25 Jan 2024 06:46:29 +0100 Message-ID: <20240125054631.78867-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125054631.78867-1-philmd@linaro.org> References: <20240125054631.78867-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich Preparation for moving perf.c to tcg/. This affects only profiling guest code, which has code in a non-0 based segment, e.g., 16-bit code, which is not particularly important. Suggested-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-ID: <20231212003837.64090-4-iii@linux.ibm.com> --- accel/tcg/perf.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/accel/tcg/perf.c b/accel/tcg/perf.c index ba75c1bbe4..68a46b1b52 100644 --- a/accel/tcg/perf.c +++ b/accel/tcg/perf.c @@ -337,10 +337,6 @@ void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, q[insn].address = gen_insn_data[insn * start_words + 0]; if (tb_cflags(tb) & CF_PCREL) { q[insn].address |= (guest_pc & qemu_target_page_mask()); - } else { -#if defined(TARGET_I386) - q[insn].address -= tb->cs_base; -#endif } q[insn].flags = DEBUGINFO_SYMBOL | (jitdump ? DEBUGINFO_LINE : 0); } From patchwork Thu Jan 25 05:46:30 2024 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: 765938 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:10c4:b0:337:62d3:c6d5 with SMTP id b4csp2456316wrx; Wed, 24 Jan 2024 21:48:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGZUAOR1SQYURc8Xu1MzPRLsxDUnfqwLQRYKXEuE+mnL0QlTxg1h7QpkCExgHccSDR/7J+ X-Received: by 2002:a05:6808:654b:b0:3bd:9443:a565 with SMTP id fn11-20020a056808654b00b003bd9443a565mr464553oib.67.1706161687571; Wed, 24 Jan 2024 21:48:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706161687; cv=none; d=google.com; s=arc-20160816; b=kygTeEqvFUaNzORcpwJQmC0HaoFFwOwAJA3Sc651DH5AXxT5iGONu5AuR0lcZ7b6nl 7bhh3dQJgF9EB09g4eN+7Tk1qIfH1TdsimI8f+bMitUwIOzQ7fMo31GIxx0MXSn2WvRb a/AOcJKTrpMckOjd+x2TxUXdt5dcZH8nCxvB0jafVtWHEtu5bxHaQmzxsxcq0YD0fadv cAOdcfeRAIm4dKckRNvRh7Bf4l2GCSiAa7O4LJ3YR8jtFlc3scoHWwVTvczfEquzCtHX IwwRfpMlBOHmrkX54sczzogqbgplDTWbQI2uuNnxISRvKQEd4rx9vtV16kjbqF2d22xX Rjrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=AgoSHvj3ItDsNB7xFCor4QnrVXlVBkw1Thjsp8Wtfjk=; fh=0Le5rrZoRzk7mp1WVwZvEmf4sg2/sCIatJkU6I7fkh8=; b=Ikj0lN5IYbtxEqhViWHq9WuUVp+wcTWtm8tjKtNMG3r6x7gPwpe5s+JbDUyqGI72J9 g9AYq0Wfg9o7aoYgqeKEBdz0HxJevGgbwR6Mrba8Dg+1h7AiMW7gFo/ulJXsFaHtuqe2 BimFLxGxdevjou29kzaBQgdzx6FCgfhw5/CU4RmNjpcJ0GppOhMo3UO3Uvk1tXd9sEcU BIBMbYR9kxlsxD48J/S7giNTOB33SByyYc9EaBOETkiObXqbiYUqepXIuM/Ndg7ZKTxD 4F0SxiYVICTC7BfDFHRolwQr5YoskSXJA0TQQOC8dFuhoDV5PugEGWkLEKsY5TnAoh5T k6VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gB472egg; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f3-20020ac85d03000000b0042a2e150cf5si12256774qtx.756.2024.01.24.21.48.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2024 21:48:07 -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=gB472egg; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSsZp-0007qQ-K8; Thu, 25 Jan 2024 00:47:01 -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 1rSsZo-0007qG-FM for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:47:00 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSsZm-0008C8-C5 for qemu-devel@nongnu.org; Thu, 25 Jan 2024 00:47:00 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40e9101b5f9so69802385e9.3 for ; Wed, 24 Jan 2024 21:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706161617; x=1706766417; 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=AgoSHvj3ItDsNB7xFCor4QnrVXlVBkw1Thjsp8Wtfjk=; b=gB472eggtugrdtFfXOJbeMGTw0ff5kTewRCsTJB6t8CuB6Tek1ou0VpsPJZqjWwfDZ 3YZv0Ndr5UA8qYZAcug+rxfKbWr3H3sq9fHAyfQGO98qX7gDLGwL4tyiGCBd+zASiKqo dZm5lVz3at/cU10tPDaH8hB065oThtAwp47l5B+PAdGy/k6QVSQQOMN8xq4V1iea6K2c DBUTruo2q8RY2LRp7qqNW9Crsam8pj6krp6ytPlR4f66gH0jx985Elmh/2nT8jUv+Ew5 c8Tz26M3ccpkgyyy+y/Zxm3cNZFR1vMXOBC8BkqasDemX7Vz83AiaazuPpKVNAFu3mKU 1Ptw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706161617; x=1706766417; 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=AgoSHvj3ItDsNB7xFCor4QnrVXlVBkw1Thjsp8Wtfjk=; b=M9WahJfyUE7/tOftMnJpo0jAGhJIjABK1sbfG6zzkd2ZA+JSzkLrmv423qkUFUVj7v qERaDUNQA2RlJXnqxv7yQIqLFO47DDqC7wo2SigyjHC6jbwB0hodBKfTPzTLkF/nf5t6 45qgsob+ysD3bxLZVz+Tc8z4+Ca9/ftQIIjmj6gRpTC3cQ+Z9q1HqNQQPduBgwc00/h4 f8Zv6EdmtOds3gmJaM7dPPqmSHTevuqEfTD5e4WYsjVsboEm6RX6R4pSvroK//owSbqM TphvpIVFnuVdteKMF8SiSls3SyZLHOZ/b12vFLcQd8OKLGcFRQ0S4oyhJfSVTWLW5Fzu Kiew== X-Gm-Message-State: AOJu0YzkdwMYMBoMrspwpy0cwEfAniAijT+WY9fx53xLVqEBPSqOmUq8 EBlxZYIBUvvVxj2ntysFN8c+sq5j/LX1UMOaM+vUjrqVuCa/GVq/mNIkKIseVjf4PVCpz9KHdv+ 0 X-Received: by 2002:a05:600c:4694:b0:40d:271e:67bc with SMTP id p20-20020a05600c469400b0040d271e67bcmr170448wmo.112.1706161616842; Wed, 24 Jan 2024 21:46:56 -0800 (PST) Received: from m1x-phil.lan (lec62-h02-176-184-19-125.dsl.sta.abo.bbox.fr. [176.184.19.125]) by smtp.gmail.com with ESMTPSA id iv16-20020a05600c549000b0040e3635ca65sm1242378wmb.2.2024.01.24.21.46.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 Jan 2024 21:46:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , Richard Henderson , Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v6 4/4] accel/tcg: Move perf and debuginfo support to tcg/ Date: Thu, 25 Jan 2024 06:46:30 +0100 Message-ID: <20240125054631.78867-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240125054631.78867-1-philmd@linaro.org> References: <20240125054631.78867-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich tcg/ should not depend on accel/tcg/, but perf and debuginfo support provided by the latter are being used by tcg/tcg.c. Since that's the only user, move both to tcg/. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-ID: <20231212003837.64090-5-iii@linux.ibm.com> --- {accel => include}/tcg/debuginfo.h | 4 ++-- {accel => include}/tcg/perf.h | 4 ++-- accel/tcg/translate-all.c | 2 +- hw/core/loader.c | 2 +- linux-user/elfload.c | 2 +- linux-user/exit.c | 2 +- linux-user/main.c | 2 +- system/vl.c | 2 +- {accel/tcg => tcg}/debuginfo.c | 3 +-- {accel/tcg => tcg}/perf.c | 7 +++---- tcg/tcg.c | 2 +- accel/tcg/meson.build | 4 ---- tcg/meson.build | 5 +++++ 13 files changed, 20 insertions(+), 21 deletions(-) rename {accel => include}/tcg/debuginfo.h (96%) rename {accel => include}/tcg/perf.h (95%) rename {accel/tcg => tcg}/debuginfo.c (98%) rename {accel/tcg => tcg}/perf.c (99%) diff --git a/accel/tcg/debuginfo.h b/include/tcg/debuginfo.h similarity index 96% rename from accel/tcg/debuginfo.h rename to include/tcg/debuginfo.h index f064e1c144..858535b5da 100644 --- a/accel/tcg/debuginfo.h +++ b/include/tcg/debuginfo.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef ACCEL_TCG_DEBUGINFO_H -#define ACCEL_TCG_DEBUGINFO_H +#ifndef TCG_DEBUGINFO_H +#define TCG_DEBUGINFO_H #include "qemu/bitops.h" diff --git a/accel/tcg/perf.h b/include/tcg/perf.h similarity index 95% rename from accel/tcg/perf.h rename to include/tcg/perf.h index f92dd52c69..c96b5920a3 100644 --- a/accel/tcg/perf.h +++ b/include/tcg/perf.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef ACCEL_TCG_PERF_H -#define ACCEL_TCG_PERF_H +#ifndef TCG_PERF_H +#define TCG_PERF_H #if defined(CONFIG_TCG) && defined(CONFIG_LINUX) /* Start writing perf-.map. */ diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 1737bb3da5..1c695efe02 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -63,7 +63,7 @@ #include "tb-context.h" #include "internal-common.h" #include "internal-target.h" -#include "perf.h" +#include "tcg/perf.h" #include "tcg/insn-start-words.h" TBContext tb_ctx; diff --git a/hw/core/loader.c b/hw/core/loader.c index e7a9b3775b..b8e52f3fb0 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -62,7 +62,7 @@ #include "hw/boards.h" #include "qemu/cutils.h" #include "sysemu/runstate.h" -#include "accel/tcg/debuginfo.h" +#include "tcg/debuginfo.h" #include diff --git a/linux-user/elfload.c b/linux-user/elfload.c index cf9e74468b..62120c7615 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -21,7 +21,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "target_signal.h" -#include "accel/tcg/debuginfo.h" +#include "tcg/debuginfo.h" #ifdef TARGET_ARM #include "target/arm/cpu-features.h" diff --git a/linux-user/exit.c b/linux-user/exit.c index 50266314e0..1ff8fe4f07 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -17,7 +17,7 @@ * along with this program; if not, see . */ #include "qemu/osdep.h" -#include "accel/tcg/perf.h" +#include "tcg/perf.h" #include "gdbstub/syscalls.h" #include "qemu.h" #include "user-internals.h" diff --git a/linux-user/main.c b/linux-user/main.c index c9470eeccf..74b2fbb393 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -54,7 +54,7 @@ #include "signal-common.h" #include "loader.h" #include "user-mmap.h" -#include "accel/tcg/perf.h" +#include "tcg/perf.h" #ifdef CONFIG_SEMIHOSTING #include "semihosting/semihost.h" diff --git a/system/vl.c b/system/vl.c index 788d88ea03..60fd1e56b6 100644 --- a/system/vl.c +++ b/system/vl.c @@ -96,7 +96,7 @@ #endif #include "sysemu/qtest.h" #ifdef CONFIG_TCG -#include "accel/tcg/perf.h" +#include "tcg/perf.h" #endif #include "disas/disas.h" diff --git a/accel/tcg/debuginfo.c b/tcg/debuginfo.c similarity index 98% rename from accel/tcg/debuginfo.c rename to tcg/debuginfo.c index 71c66d04d1..3753f7ef67 100644 --- a/accel/tcg/debuginfo.c +++ b/tcg/debuginfo.c @@ -6,11 +6,10 @@ #include "qemu/osdep.h" #include "qemu/lockable.h" +#include "tcg/debuginfo.h" #include -#include "debuginfo.h" - static QemuMutex lock; static Dwfl *dwfl; static const Dwfl_Callbacks dwfl_callbacks = { diff --git a/accel/tcg/perf.c b/tcg/perf.c similarity index 99% rename from accel/tcg/perf.c rename to tcg/perf.c index 68a46b1b52..412a987d95 100644 --- a/accel/tcg/perf.c +++ b/tcg/perf.c @@ -11,13 +11,12 @@ #include "qemu/osdep.h" #include "elf.h" #include "exec/target_page.h" -#include "exec/exec-all.h" +#include "exec/translation-block.h" #include "qemu/timer.h" +#include "tcg/debuginfo.h" +#include "tcg/perf.h" #include "tcg/tcg.h" -#include "debuginfo.h" -#include "perf.h" - static FILE *safe_fopen_w(const char *path) { int saved_errno; diff --git a/tcg/tcg.c b/tcg/tcg.c index e2c38f6d11..eeff4c1d51 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -55,7 +55,7 @@ #include "tcg/tcg-ldst.h" #include "tcg/tcg-temp-internal.h" #include "tcg-internal.h" -#include "accel/tcg/perf.h" +#include "tcg/perf.h" #ifdef CONFIG_USER_ONLY #include "exec/user/guest-base.h" #endif diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index c15ac9ac8f..46f7d53eeb 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -16,10 +16,6 @@ tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) if get_option('plugins') tcg_ss.add(files('plugin-gen.c')) endif -tcg_ss.add(when: libdw, if_true: files('debuginfo.c')) -if host_os == 'linux' - tcg_ss.add(files('perf.c')) -endif specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( diff --git a/tcg/meson.build b/tcg/meson.build index 5afdec1e1a..8251589fd4 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -22,6 +22,11 @@ if get_option('tcg_interpreter') tcg_ss.add(files('tci.c')) endif +tcg_ss.add(when: libdw, if_true: files('debuginfo.c')) +if host_os == 'linux' + tcg_ss.add(files('perf.c')) +endif + tcg_ss = tcg_ss.apply({}) libtcg_user = static_library('tcg_user',