From patchwork Sun May 2 23:18:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 430458 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2371893jao; Sun, 2 May 2021 16:20:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2mU7CUFAvDBtrHc8z5ase1Wnk1QCDW9voDX/DePpzWjw711oiUAyX6C5jHPGKGacIPQLl X-Received: by 2002:a05:6e02:15c6:: with SMTP id q6mr13699280ilu.17.1619997605619; Sun, 02 May 2021 16:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619997605; cv=none; d=google.com; s=arc-20160816; b=Yjx3f8rw98io43YLY/gqC5ymxb5dP37pohrQD21Ccwu+f6RW+s5cJgyuTdN91N2IGm /bNBsWj311zn5sL8QzhoMKJ39YGxilrKMOr14U1LyUxyIQXm+QaRtfcrQzmqaDKj2Cps 228IHGsf6y4RMdHKRCvQ3uZC6ixqw1OTz5fLoj+im7P65RjnEl4StIVJgUAhIOkIgepC V48ET10yJ84ig8c3/jsk1oqJk08/U2oV6Xf4SFZH/KdyW3MdF+mCz1mDqs4HSnonIq9G 7VVOJ8nPgNvl/SNbxXwjbswbC45lXpuWoPE+2xjyYle6GTWWwbHdSXGPy+K5LbG6r0ch iRCw== 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:to:from:dkim-signature; bh=FnKIvYRhqbh2eE+ZT/G5+WgVP1rbStnMg2rdovvQbUc=; b=cCRUPuE25RWhA9IgImvjFVQRwDXM6hR0apnaZm7T7I2MOTziMQTFUi40JSz4oHjDnF 3MoEx41Xxe0EY6oRUHRZeTmzV5Qj/jYcimxadZ+kn+eHQflXt8O6xiZsciD/gSP9oEo6 j45ggrTDZOIbyvYZQVQERq+S1StDYzpFbeMhst1kKjXWNzh/mdiR/QOrL9ShvPQIUDJB XLyFGEvbrQxxu/ujf5EPV2oyxRpgQpmZJHlLINwtRsGRji6gBDMb8jZj9S0KGqvsCLe7 xpphP50t1qtRhE3tZnIGH+t3e4pbzvoH/J9ZBsrotv4mmXx/zeLB4mSkN1d8AyWbzIK3 sSUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hlzpxXye; 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 p14si8756708jao.70.2021.05.02.16.20.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 May 2021 16:20:05 -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=hlzpxXye; 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]:58910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldLNc-0008B8-S6 for patch@linaro.org; Sun, 02 May 2021 19:20:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldLMQ-0008Ag-Rm for qemu-devel@nongnu.org; Sun, 02 May 2021 19:18:50 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:42731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldLMO-0002pE-UH for qemu-devel@nongnu.org; Sun, 02 May 2021 19:18:50 -0400 Received: by mail-pl1-x62b.google.com with SMTP id v13so1856070ple.9 for ; Sun, 02 May 2021 16:18:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=FnKIvYRhqbh2eE+ZT/G5+WgVP1rbStnMg2rdovvQbUc=; b=hlzpxXyemqnUpFGUdmieQ059keX+5iRJY+ZQtDzHhYAF7pCmEqIhRPR6aUx8WObmIv a/cNIeic5V22Ze+uL6UPWyzr+/v23Qx8XQhErUFJmipN+/f1L6hCTihSMwziIwXhZ9Kn EJQ/Y6BvpSiRfe8C/gJ2lqOb5Ue+4G13Yo/SsEpj+Xi9Dsso05/M5GXfLr4OaP2MUVES kd+UGLN8jfxrv1D9/b2M2/p7jO188AiDiaDISAXKBGDjUT+Lk9t8eJRfUqGLpaD4wuxd GPoXOWGC2eRtSa/EqH43l43DLkKWlH3ZHcEXmmKE2B0+kSTs8uxoArkh232b4jgg7CFp NZPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=FnKIvYRhqbh2eE+ZT/G5+WgVP1rbStnMg2rdovvQbUc=; b=MABWtwVG1tF+gCbqGO5GdKmZRlbNoquJtt20QSMVkmitk/SVNZhuPgh9PEbMOEUu95 7P4IosyIpZdMALphWFbv3x5e94ZIsIkH1CsQsvYzT0mPsL1y0ajtB1NugkG18BgW4DIY EqnWvs6naGsNSMJFJn5UxuwUo+0Vtv9b69nMzFJfC7e+hZtIP6vapAK5cPicV2vJheNS jFKpdkiPLA8KgFNQoF8QfVphNbuoPe0XN+MQKwmoy09wdZu21vsE2RbWxgzfW9TrhNEe RvWz8ZVltO+C9fTC2YvP1cmu5wPyAOd1nv7kYsdnVKFLmELb25B8jN7pM5jR29+XCZbe E5cg== X-Gm-Message-State: AOAM530qhxyZnKwxDBVrLQbAlO+Ny//cMYao+bve1fFVviP++ymi9WTp 34fJPvPu9dRkomIA1ync6ho2+GeylTAe6g== X-Received: by 2002:a17:90a:4dc7:: with SMTP id r7mr18559403pjl.174.1619997526086; Sun, 02 May 2021 16:18:46 -0700 (PDT) Received: from localhost.localdomain ([71.212.144.24]) by smtp.gmail.com with ESMTPSA id k17sm7146236pfa.68.2021.05.02.16.18.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 16:18:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 00/28] tcg: Clean up code_gen_buffer allocation Date: Sun, 2 May 2021 16:18:16 -0700 Message-Id: <20210502231844.1977630-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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.23 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" Supercedes: <20210314212724.1917075-1-richard.henderson@linaro.org> ("tcg: Workaround macOS 11.2 mprotect bug") Since I ran out of time at softfreeze, I put in a much smaller patch to workaround the macOS bug. But I think the cleanup is still a good thing. r~ Richard Henderson (28): meson: Split out tcg/meson.build meson: Split out fpu/meson.build tcg: Re-order tcg_region_init vs tcg_prologue_init tcg: Remove error return from tcg_region_initial_alloc__locked tcg: Split out tcg_region_initial_alloc tcg: Split out tcg_region_prologue_set tcg: Split out region.c accel/tcg: Inline cpu_gen_init accel/tcg: Move alloc_code_gen_buffer to tcg/region.c accel/tcg: Rename tcg_init to tcg_init_machine tcg: Create tcg_init accel/tcg: Merge tcg_exec_init into tcg_init_machine accel/tcg: Pass down max_cpus to tcg_init tcg: Introduce tcg_max_ctxs tcg: Move MAX_CODE_GEN_BUFFER_SIZE to tcg-target.h tcg: Replace region.end with region.total_size tcg: Rename region.start to region.after_prologue tcg: Tidy tcg_n_regions tcg: Tidy split_cross_256mb tcg: Move in_code_gen_buffer and tests to region.c tcg: Allocate code_gen_buffer into struct tcg_region_state tcg: Return the map protection from alloc_code_gen_buffer tcg: Sink qemu_madvise call to common code util/osdep: Add qemu_mprotect_rw tcg: Round the tb_size default from qemu_get_host_physmem tcg: Merge buffer protection and guard page protection tcg: When allocating for !splitwx, begin with PROT_NONE tcg: Move tcg_init_ctx and tcg_ctx from accel/tcg/ meson.build | 12 +- accel/tcg/internal.h | 2 + include/qemu/osdep.h | 1 + include/sysemu/tcg.h | 2 - include/tcg/tcg.h | 15 +- tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h | 2 + tcg/internal.h | 40 ++ tcg/mips/tcg-target.h | 6 + tcg/ppc/tcg-target.h | 2 + tcg/riscv/tcg-target.h | 1 + tcg/s390/tcg-target.h | 3 + tcg/sparc/tcg-target.h | 1 + tcg/tci/tcg-target.h | 1 + accel/tcg/tcg-all.c | 33 +- accel/tcg/translate-all.c | 439 +---------------- bsd-user/main.c | 1 - linux-user/main.c | 1 - tcg/region.c | 994 ++++++++++++++++++++++++++++++++++++++ tcg/tcg.c | 636 ++---------------------- util/osdep.c | 9 + fpu/meson.build | 1 + tcg/meson.build | 14 + 24 files changed, 1141 insertions(+), 1077 deletions(-) create mode 100644 tcg/internal.h create mode 100644 tcg/region.c create mode 100644 fpu/meson.build create mode 100644 tcg/meson.build -- 2.25.1