From nobody Sun May 19 00:43:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) client-ip=209.85.221.44; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f44.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1621875912; cv=none; d=zohomail.com; s=zohoarc; b=CmYRLgZruWtyApnBUGiCAymE8Ryz+mwIgEvAfauaupQQzG0lPK2wadeYf0VA7J3iT2dKmA/JS7GTDYPeleiIqQGNejjpGL8OGQRUrxrN6ZDHqGDZjVJDj9mKYGtvA19BCMhF4pIa+rE6Q76ClLgiRRc6421JrxxDZpTy237+cUY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621875912; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JGCm35wR+sSDjvNwlH4jC86gmJH/U5RiSisP7sgjn/8=; b=P2cF1voMA5bc8PQH1/TNcxnK7FZhopaiikc3aPkR1oEeuItdxEHc417M/vempv8KTXKeC63IbDSIo7rbzOpFCvBI3KIC7j1KBFuESjwSvtMT3jb4qSQT4u7nlW7NwSWOerCwYt1gSiz3Xs+7TVv6P9KA6P7i7vOdT0pC0Y3SWRE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.zohomail.com with SMTPS id 1621875912292387.5022667778429; Mon, 24 May 2021 10:05:12 -0700 (PDT) Received: by mail-wr1-f44.google.com with SMTP id j14so27523291wrq.5 for ; Mon, 24 May 2021 10:05:11 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id c7sm12810058wrs.23.2021.05.24.10.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 10:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JGCm35wR+sSDjvNwlH4jC86gmJH/U5RiSisP7sgjn/8=; b=jMkPpgyd/aAWIGzQHDpc+JEjgsX9bgWg32ynCI5ISYj8ShMuxVSCaXQ0MWnnu36aPX gdQjI8gvflmA2CWLDZUJIArgO6JpFnpn0g6noKbK828qBdWW0tVonJeNVxuCrGz6pl/3 dfP1nMgdLY4ZkcEwVlE3NvHzc3t3uIOIP+2avuuMilF6SgHtTye0YBXrwA0smvywAb92 f+vyllIwD39Gg4R/6FvHSHU2QT273WrVh9LHjYvF7pn9t6vi2zNCpjvmmWdCaAPOgQRF wMPWpYhOzapCyKpxMRpHXfo3gR59jmzhk7iXO/X1bg0HCkq2EhvwINEYlNjr1RREynci cqfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JGCm35wR+sSDjvNwlH4jC86gmJH/U5RiSisP7sgjn/8=; b=ehfgB64M2Trd5PKBw3Ff91wZs8Cha6DOUH85uQhbGuymhi/vJKTOJSJ54wa8xr4Gk+ tHbXEtDGZ8oD/fK0LjRkNGB9F26CcyDqNSNAKdl3JtDYWJAyTJUWxLC0Bn0dkZa5AHfz X/ZZWYnaJXEzw5UvShKNEQ223F9Jyz8cjt3mQsDpRIwMD+og5E3S4cAeoVusbwPS5m74 thk0FtHQafHkKxKnz5iBTel4pEUBYieHQvR9l+uL+VnxWXb+22RhQ8OfOtHTpUKQTrOy E24V3U7L9Gyu9ufdEisoFRYKdN5NwlseJ7yaapAEx0Obtye1Yi0sGoThPG5zvuVPNE+f O5AQ== X-Gm-Message-State: AOAM530i+1+wjMHn650MO64wTqiEJYE5lFWrT+Ok0qpitSXBoYQA1rXU 0TvkSQdun3ppXKDOKqoJ8jg= X-Google-Smtp-Source: ABdhPJzeI5nvyYWDvECII21DQr/RvS8ydfKGH9ApgQhKA5S2WlYtTy6qTW67vNnbqShJh9pTA+mt5A== X-Received: by 2002:a5d:62cb:: with SMTP id o11mr24164918wrv.28.1621875910563; Mon, 24 May 2021 10:05:10 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] accel/tcg: Reduce 'exec/tb-context.h' inclusion Date: Mon, 24 May 2021 19:04:52 +0200 Message-Id: <20210524170453.3791436-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210524170453.3791436-1-f4bug@amsat.org> References: <20210524170453.3791436-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Only 2 headers require "exec/tb-context.h". Instead of having all files including "exec/exec-all.h" also including it, directly include it where it is required: - accel/tcg/cpu-exec.c - accel/tcg/translate-all.c Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/exec-all.h | 1 - include/tcg/tcg.h | 1 - accel/tcg/cpu-exec.c | 1 + accel/tcg/translate-all.c | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 6b036cae8f6..657e756ba44 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -21,7 +21,6 @@ #define EXEC_ALL_H =20 #include "cpu.h" -#include "exec/tb-context.h" #ifdef CONFIG_TCG #include "exec/cpu_ldst.h" #endif diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 0f0695e90da..74cb3453083 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -27,7 +27,6 @@ =20 #include "cpu.h" #include "exec/memop.h" -#include "exec/tb-context.h" #include "qemu/bitops.h" #include "qemu/plugin.h" #include "qemu/queue.h" diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 0dc5271715e..10e11f27bbe 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -31,6 +31,7 @@ #include "qemu/rcu.h" #include "exec/tb-hash.h" #include "exec/tb-lookup.h" +#include "exec/tb-context.h" #include "exec/log.h" #include "qemu/main-loop.h" #if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 640ff6e3e70..e9f4de5190d 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -48,6 +48,7 @@ =20 #include "exec/cputlb.h" #include "exec/tb-hash.h" +#include "exec/tb-context.h" #include "exec/translate-all.h" #include "qemu/bitmap.h" #include "qemu/error-report.h" --=20 2.26.3 From nobody Sun May 19 00:43:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) client-ip=209.85.221.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1621875916; cv=none; d=zohomail.com; s=zohoarc; b=TkaHDnwAZoSwDfVQ5sTZbyDYujURPjF4F3CYKo+11txLIDn4OCWBkM/aTNVHMKcbg02BBmO68xzgmTVguhSuT5YcLiWSB0Y9Ri1jWGlmkEw8F7Gr/ZRrJbyyc15whJtmpiF7fsdnNKez2q33SkllIvwmCwF54z6KIlvCzBUp9CQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621875916; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VNPWa+cTpvFPOmCcmkrw+1H8tZqA2fr+Oi3ez/kimWw=; b=SDyJModaj3Qq6jFCY8MWiCeGMdGdCNRQaBdqMLWFQgexcHF8MifnhgUS2mqKzbxftILgpoBVcTk5QBocqTbHve3G7ombJNfic22/Vwq3dGyazpIWJzyZ1iTET9T2MfzzBd9lYWAFReHRJdxGC45sYxrUfsbQ/n0o7B5xxrePpI0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.zohomail.com with SMTPS id 1621875916905384.8006352848871; Mon, 24 May 2021 10:05:16 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id r12so29276059wrp.1 for ; Mon, 24 May 2021 10:05:16 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id a11sm13024252wrr.48.2021.05.24.10.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 10:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VNPWa+cTpvFPOmCcmkrw+1H8tZqA2fr+Oi3ez/kimWw=; b=iGngkWfPk4JO6u6IU1cdKIgWNoZzsyR18+kdoRzzA2uxWnvwY+xXY66HQpXR2KADGC 1xWH89+XFCfwyytwcw9vhESXLI1yvTIg5c/43nnY/jBgHy9PwhuqZMOMkcNXYIR4lk63 FBnVzdid3jxQQglrPFwCYZ4P+oXtRXYD65YAxl45E3SpepMWIXi3J1ekJTtzGzOsQ+di DP1axjW2eaH5PilzeRPZWnWpknqe/Uis27pjUiWu5g/0Mjw1bOcO6dKeCXT1suKXHYGM B0pi0tNcIJ48eoxb5l3t/StzXvHF/ar10bQP0K4AuLFXDp4aqiMBDZRBmPL1MoV/3c1S sMow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=VNPWa+cTpvFPOmCcmkrw+1H8tZqA2fr+Oi3ez/kimWw=; b=Fi5VUygb2GJKt9GX2XarCU+Kcw/TJXfc0LAzuWHPcswPzkuovg0iFYJJbYGZNIuyyw OsD9Zrk0PZH4K/+fTkIMdZ+wCY3UnWNbLat/jeu4AS/6YNniz0ZyRVLOgBlPSwQGHpp2 si28YXJ48P7hwo6PI6YMb51xCsCNEp5TP68EyOWURnhfNWxqFpRfVqRqDZFujJQEMgSv Xc4s/m3C7ta6QG2aIWAI/ReFyo2yDiCSSxXxLvEgSdTPkYrwqsBPPuD4o82Z53e7ti48 htAENIGFqGoDV6U+lRjFmY4Z+VSN19JhZH5C9wqSh5+TGmvodYDfg9KAyBkVx9UhgITZ x2Tw== X-Gm-Message-State: AOAM531frmpC7TxZw5U6ZfuQ7zrzQjOHtG8rfxofQ2o4qACCOjRefLBZ BwSwNFTCseZ2Yy3eOuJSrm0= X-Google-Smtp-Source: ABdhPJzZWHyz1/QCgtHusYOFQhXCYwyGW4Fk/TtXhgRtKq8ylFyVrMgFP6ZgbJJbS6aeg74v3Dobfg== X-Received: by 2002:adf:b1cf:: with SMTP id r15mr8248926wra.399.1621875915073; Mon, 24 May 2021 10:05:15 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] accel/tcg: Keep TranslationBlock headers local to TCG Date: Mon, 24 May 2021 19:04:53 +0200 Message-Id: <20210524170453.3791436-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210524170453.3791436-1-f4bug@amsat.org> References: <20210524170453.3791436-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Only the TCG accelerator uses the TranslationBlock API. Move the tb-context.h / tb-hash.h / tb-lookup.h from the global namespace to the TCG one (in accel/tcg). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- {include/exec =3D> accel/tcg}/tb-context.h | 0 {include/exec =3D> accel/tcg}/tb-hash.h | 0 {include/exec =3D> accel/tcg}/tb-lookup.h | 2 +- accel/tcg/cpu-exec.c | 6 +++--- accel/tcg/cputlb.c | 2 +- accel/tcg/tcg-runtime.c | 2 +- accel/tcg/translate-all.c | 4 ++-- MAINTAINERS | 1 - 8 files changed, 8 insertions(+), 9 deletions(-) rename {include/exec =3D> accel/tcg}/tb-context.h (100%) rename {include/exec =3D> accel/tcg}/tb-hash.h (100%) rename {include/exec =3D> accel/tcg}/tb-lookup.h (98%) diff --git a/include/exec/tb-context.h b/accel/tcg/tb-context.h similarity index 100% rename from include/exec/tb-context.h rename to accel/tcg/tb-context.h diff --git a/include/exec/tb-hash.h b/accel/tcg/tb-hash.h similarity index 100% rename from include/exec/tb-hash.h rename to accel/tcg/tb-hash.h diff --git a/include/exec/tb-lookup.h b/accel/tcg/tb-lookup.h similarity index 98% rename from include/exec/tb-lookup.h rename to accel/tcg/tb-lookup.h index 29d61ceb340..9c9e0079dad 100644 --- a/include/exec/tb-lookup.h +++ b/accel/tcg/tb-lookup.h @@ -14,7 +14,7 @@ #endif =20 #include "exec/exec-all.h" -#include "exec/tb-hash.h" +#include "tb-hash.h" =20 /* Might cause an exception, so have a longjmp destination ready */ static inline TranslationBlock *tb_lookup(CPUState *cpu, target_ulong pc, diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 10e11f27bbe..ad1279d2ed7 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -29,9 +29,6 @@ #include "qemu/compiler.h" #include "qemu/timer.h" #include "qemu/rcu.h" -#include "exec/tb-hash.h" -#include "exec/tb-lookup.h" -#include "exec/tb-context.h" #include "exec/log.h" #include "qemu/main-loop.h" #if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY) @@ -41,6 +38,9 @@ #include "exec/cpu-all.h" #include "sysemu/cpu-timers.h" #include "sysemu/replay.h" +#include "tb-hash.h" +#include "tb-lookup.h" +#include "tb-context.h" #include "internal.h" =20 /* -icount align implementation. */ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 84e7d91a5ca..8f4925680c1 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -24,7 +24,6 @@ #include "exec/memory.h" #include "exec/cpu_ldst.h" #include "exec/cputlb.h" -#include "exec/tb-hash.h" #include "exec/memory-internal.h" #include "exec/ram_addr.h" #include "tcg/tcg.h" @@ -36,6 +35,7 @@ #include "exec/translate-all.h" #include "trace/trace-root.h" #include "trace/mem.h" +#include "tb-hash.h" #include "internal.h" #ifdef CONFIG_PLUGIN #include "qemu/plugin-memory.h" diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 49f5de37e87..66ac830e2f2 100644 --- a/accel/tcg/tcg-runtime.c +++ b/accel/tcg/tcg-runtime.c @@ -30,7 +30,7 @@ #include "disas/disas.h" #include "exec/log.h" #include "tcg/tcg.h" -#include "exec/tb-lookup.h" +#include "tb-lookup.h" =20 /* 32-bit helpers */ =20 diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index e9f4de5190d..1eefe6ea8d4 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -47,8 +47,6 @@ #endif =20 #include "exec/cputlb.h" -#include "exec/tb-hash.h" -#include "exec/tb-context.h" #include "exec/translate-all.h" #include "qemu/bitmap.h" #include "qemu/error-report.h" @@ -61,6 +59,8 @@ #include "sysemu/tcg.h" #include "qapi/error.h" #include "hw/core/tcg-cpu-ops.h" +#include "tb-hash.h" +#include "tb-context.h" #include "internal.h" =20 /* #define DEBUG_TB_INVALIDATE */ diff --git a/MAINTAINERS b/MAINTAINERS index a77f2465694..5f55404f2fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -128,7 +128,6 @@ F: docs/devel/decodetree.rst F: include/exec/cpu*.h F: include/exec/exec-all.h F: include/exec/helper*.h -F: include/exec/tb-hash.h F: include/sysemu/cpus.h F: include/sysemu/tcg.h F: include/hw/core/tcg-cpu-ops.h --=20 2.26.3