From patchwork Thu Apr 18 19:24:59 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: 789828 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp733963wrm; Thu, 18 Apr 2024 12:25:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNJsDmSjs/7D06Wo98w4UsAYE2I+pXcCcR2C5Rbjsw4InRyLPb84CBnRd1Dwc1CZBQUmtoMzXaL5XLIBRaXpD9 X-Google-Smtp-Source: AGHT+IGGYOprANFHb0CDMaIvVF1yU8RQjatygHBb79CA8YMiiyEoLXGnMM9NLog/EtqFRtsr7h8r X-Received: by 2002:a25:943:0:b0:dc2:171b:3b07 with SMTP id u3-20020a250943000000b00dc2171b3b07mr3910535ybm.43.1713468350839; Thu, 18 Apr 2024 12:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713468350; cv=none; d=google.com; s=arc-20160816; b=vSWi7T3tvDX+J9TC3TQSyO5ZqfwNzdhmhSoIEd98KXq4OapeuO+GOFU6aBZcknyoMK R8WWa8QB/PFiXJMxE4xMIy/urqGwJ9bArz1Wtp/KlTee/QZ5dz++lZHTWg9WgNBawRjY /8nxuFHrOQiAcEjj+W3w/7W7jl9Foq2Wn7BeCaU8BihZ1AX/oCGZRAAktP4DNcxEZNRv VDt9izNSoQA8FLFdPoeD69gqAlDkzjKwr3m5enEedtYrZE3s9rpfRg8cNC1rFHe8gOkw 1yvZzKp1Ul982eFZmSzIue1b6yoItC12sPX42tenqL2QdXxSz+OxCsirM6+LrrNKH1Pd JJcw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=UatYjw6LkKqMQcEs0xLI/ll8in5w62RsbSuNUqaD+hU=; fh=HuUGtbX8o6ZGsA6d5kREcj9rQCUzryTrBO0g7t4l1d4=; b=i+uV9LYBGaXDIWQ0Pmio/YE3f2yl5FtZdTuZ9q4P9GCGI1YSVCQMqKRAh2RyJovSUF P2pW6uNAUlpDpWFpDr8IGqy43IXxNI5RRPVHSSTLmT3BEnO/RGTSHWRjoZ1u23xt9Ky5 zXuuDVCTDE7mWcAw/QEcqiqQ35BF/gUr2lRpfDqDXy4TCqe4nHwkzGzPTy2Bi/H3IhKS DCwvkSpNkxXfSbWJ33Quk6eAKqb4ab9SA9/GWR2cerwfkA0E29pGntN0XM6L3Gfy78bh WMQmm7th1IayE1uZULbf7AtBXaqd7MXLUn0CDi9hpGtusTQ9uv6hj+PZuHNTHAnxCHFK fghA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHL2q8P1; 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 gf7-20020a056214250700b0069b242d5754si2107196qvb.99.2024.04.18.12.25.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2024 12:25:50 -0700 (PDT) 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=yHL2q8P1; 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 1rxXO5-0007TC-9k; Thu, 18 Apr 2024 15:25:37 -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 1rxXO2-0007RI-68 for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:25:34 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxXNz-0007EM-3b for qemu-devel@nongnu.org; Thu, 18 Apr 2024 15:25:33 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-571c25a329eso1058865a12.0 for ; Thu, 18 Apr 2024 12:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713468329; x=1714073129; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UatYjw6LkKqMQcEs0xLI/ll8in5w62RsbSuNUqaD+hU=; b=yHL2q8P1Dwav1dlPbpPB+CtOWXCNvtxHmw0gOWZ53mU72BFSPeQYfUrM8UUWKt3Tjy rUUyRUmxkpEeET4otq3n4TcghYa6gxmjL7LntEFhsZEeaANddgNJr5C+Q4/2h0ADdLVu vheK6sFIsgP5jcAO/6rGcJq8SRsP0bX6Xbc7X0Bc+2VQi5rMxT4Zm+Rc/8JMk/3d0SLH TMIJp1g/wUZ+ySXg0Eyc1REOU6T2TKxnouo5waIwkzHmJ2v9dJbQqr/b42rawV+ES4LJ kvFulMocmexrUckSR7LuKZOWE8HD+q2HzzY6bzg6Gao1Ev6S+YEFe0fuhSfAIGmbbE5c Sg2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713468329; x=1714073129; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UatYjw6LkKqMQcEs0xLI/ll8in5w62RsbSuNUqaD+hU=; b=lLaGzcYFKAjs0pRBkOcSsgwpXEKium86NlJVyYZ/PvQyibpq6/ftZqPoYu9UoT3dWI pbe8CNRDa+hSEdeezI8WodaZy64EBri3Y7wbrkhXEGt/e4ARL5sinzK1doupH/FXDRi9 LHsDP2pQkyLRqnITCS3LzJyeFsj57Wf2njyGb2sSWWLiJ96cyJCu/UckUxEBpoM8zzdK ezNpHgcNVmHW8TOddDUmMOKADqbf4YTlSwLTxPOymDsisz3hu1IH0ohwvFMarXQf8+F4 8aqbbwW0G9gRjFdCcxDyUTARB+I0sK2ux6YFygmKSq43O5/6O/4HzUMUf2LLqRaMMCCW YC0Q== X-Gm-Message-State: AOJu0YxiHPcV5+kHqwnjDDwPuQOHRL0Gsj5RnXo+E5W0mdAPVFDhcjz0 BOTIYfQwqw+kOtTy2TRjyTv3dcvFFtkTwMcifKhTuAwMgJMDQ7RJdzcS6ofe8pjuZdEh7xCjzKD x X-Received: by 2002:a05:6402:35c5:b0:571:bc64:f8bf with SMTP id z5-20020a05640235c500b00571bc64f8bfmr2699703edc.14.1713468328813; Thu, 18 Apr 2024 12:25:28 -0700 (PDT) Received: from m1x-phil.lan ([176.176.151.213]) by smtp.gmail.com with ESMTPSA id b10-20020aa7dc0a000000b0056fe755f1e6sm1202106edu.91.2024.04.18.12.25.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 18 Apr 2024 12:25:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Anton Johansson , Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH 00/24] include/exec: Rework (part 2) Date: Thu, 18 Apr 2024 21:24:59 +0200 Message-ID: <20240418192525.97451-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reordering exec/, second round. Mostly splitting: - TCG LDST API (to "exec/cpu_ldst.h") - CPU TLB APIs (to "exec/cputlb.h") from "exec/cpu-all.h" and "exec/exec-all.h", and reducing inclusions of "hw/core/cpu.h". Based-on: <20240417182806.69446-1-philmd@linaro.org> or https://gitlab.com/philmd/qemu/-/commits/exec-next Philippe Mathieu-Daudé (24): exec: Declare MMUAccessType type in 'mmu-access-type.h' header exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h' exec: Restrict TCG specific declarations of 'cputlb.h' exec: Restrict 'cpu_ldst.h' to TCG accelerator exec: Have guest_addr_valid() methods take abi_ptr/size_t arguments exec: Un-inline tlb_vaddr_to_host() and declare it in 'exec/cputlb.h' physmem: Move TCG CPU IOTLB methods around physmem: Restrict TCG CPU IOTLB code to TCG accel exec: Reduce tlb_set_dirty() declaration scope exec: Move tlb_reset_dirty*() declarations to 'exec/cputlb.h' exec: Move CPUTLBEntry helpers to cputlb.c target/sparc: Replace abi_ulong by uint32_t for TARGET_ABI32 exec: Rename 'exec/user/guest-base.h' as 'user/guest-base.h' exec: Restrict inclusion of 'user/guest-base.h' exec: Move GUEST_ADDR_MAX definition to 'cpu_ldst.h' exec: Include missing 'qemu/log-for-trace.h' header in 'exec/log.h' plugins: Include missing 'qemu/bitmap.h' header gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h' hw/xtensa: Include missing 'exec/cpu-common.h' in 'bootparam.h' plugins: Un-inline qemu_plugin_disable_mem_helpers() exec: Remove 'exec/tswap.h' from 'exec/cpu-all.h' exec: Remove 'disas/disas.h' from 'exec/log.h' exec: Remove unnecessary inclusions of 'hw/core/cpu.h' hw/xtensa/bootparam.h | 3 + include/exec/breakpoint.h | 23 ++++++ include/exec/cpu-all.h | 39 +--------- include/exec/cpu-defs.h | 1 - include/exec/cpu_ldst.h | 122 ++++++++++--------------------- include/exec/cputlb.h | 58 ++++++++++++++- include/exec/exec-all.h | 26 +------ include/exec/log.h | 2 +- include/exec/mmu-access-type.h | 18 +++++ include/exec/ram_addr.h | 1 + include/exec/user/guest-base.h | 12 --- include/gdbstub/helpers.h | 3 +- include/hw/boards.h | 1 - include/hw/core/cpu.h | 24 +----- include/hw/core/tcg-cpu-ops.h | 6 +- include/hw/ppc/openpic.h | 1 - include/qemu/plugin.h | 7 +- include/sysemu/hw_accel.h | 1 - include/user/guest-base.h | 18 +++++ target/arm/internals.h | 1 + target/ppc/internal.h | 1 + target/riscv/debug.h | 2 + accel/stubs/tcg-stub.c | 4 - accel/tcg/cpu-exec.c | 1 - accel/tcg/cputlb.c | 53 +++++++++++++- accel/tcg/translator.c | 1 + accel/tcg/user-exec.c | 7 ++ bsd-user/main.c | 1 + hw/arm/boot.c | 1 + hw/arm/npcm7xx.c | 1 + hw/mips/fuloong2e.c | 1 + hw/mips/malta.c | 1 + hw/ppc/sam460ex.c | 1 + hw/ppc/spapr.c | 1 + hw/ppc/virtex_ml507.c | 1 + hw/sh4/r2d.c | 1 + linux-user/elfload.c | 1 + linux-user/main.c | 1 + plugins/core.c | 5 ++ system/physmem.c | 58 ++++++++------- target/arm/gdbstub.c | 1 + target/arm/tcg/helper-a64.c | 1 + target/avr/gdbstub.c | 1 + target/avr/translate.c | 1 + target/hexagon/translate.c | 1 + target/loongarch/tcg/translate.c | 1 + target/riscv/vector_helper.c | 1 + target/rx/translate.c | 1 + target/sparc/gdbstub.c | 2 +- target/sparc/mmu_helper.c | 1 + target/tricore/gdbstub.c | 1 + target/xtensa/xtensa-semi.c | 1 + tcg/tcg.c | 3 +- 53 files changed, 300 insertions(+), 226 deletions(-) create mode 100644 include/exec/breakpoint.h create mode 100644 include/exec/mmu-access-type.h delete mode 100644 include/exec/user/guest-base.h create mode 100644 include/user/guest-base.h