From patchwork Tue Sep 6 10:09:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 602987 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp4397978mae; Tue, 6 Sep 2022 03:34:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ZNPTHkwEdoSjwcmfGFTXB5wqWQb7Nyyfae62VBpxvYB3B06/qamBlAADYxsZC8xtXvudU X-Received: by 2002:a05:6214:301d:b0:499:3cf:c95f with SMTP id ke29-20020a056214301d00b0049903cfc95fmr37206749qvb.75.1662460453004; Tue, 06 Sep 2022 03:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662460453; cv=none; d=google.com; s=arc-20160816; b=fV1N8RA3dSlRQURNzywca1EdL8QEnC1nkpSpnlAaNZr7Q96mbHasTq9MaP0VydLlfg GLsQWVFnduH6zyGR/8oKnF8MrTsQud6wgvVa4oXyPFvo+A910VfvxEy+mIeIJdQkXXfV pPNdtJZGxVrLGQL6Zwr23a+6V5ztdgIemJx4NEb/zIiJ4UqppB0mPnMoL/O5oxavwmYA zCYBSQ1loXugzFxO8zCjWdP38Ahqq56czymT29bWB5+XYpta8t/JgoFCE1KDmYIl80wi jH2W/gIg4VuRCb2iOW+fnan99vGSMPgmyKi1AgRjchJxLQrFPDVe24kz79v4KCq+ajgU v0JA== 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=wtGyGiaIDUuPk8pdoR3gaSixybR0rPlWbYrtsheehh0=; b=zlcUzIup7/S7qLPYad+IshfQy0+vIrb9axIJ/YWswKcybFtrpber7/D17Je2GgrGDf usGJCZSqKlKooGYnHUYV8OBYtmrVFzrl3Wj3tplCON2RL6qc+0O5y1KXJtn4AtnPi6+t YJd9+8bWh8Ju6LZSnW5SJrzEGV5qQc7snz366MZF9zGHD5308+6VuAEMuGf9jMudUlre 56MpeERd87neOcW4Y18y8rPytZnm2qzo3NCE01SaW5h0OmRhiDgZKumREvRfmAP5JLU5 TYMOLoAo1tNYhmD61hFRTqy2/yBnDheBlOX4QngBaHIa43+DVvRRZH4CqvwgF3Nfluw7 m/2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=clCN6sjU; 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 q3-20020a05621419e300b00496f092b5cesi7689667qvc.181.2022.09.06.03.34.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Sep 2022 03:34:12 -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=clCN6sjU; 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]:46932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVVuG-0000qW-K2 for patch@linaro.org; Tue, 06 Sep 2022 06:34:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVVWU-00008m-IL for qemu-devel@nongnu.org; Tue, 06 Sep 2022 06:09:42 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:37771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVVWR-0003YD-TM for qemu-devel@nongnu.org; Tue, 06 Sep 2022 06:09:37 -0400 Received: by mail-wr1-x433.google.com with SMTP id bq9so1754211wrb.4 for ; Tue, 06 Sep 2022 03:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=wtGyGiaIDUuPk8pdoR3gaSixybR0rPlWbYrtsheehh0=; b=clCN6sjUKAWTFRjinesEU8+T3jkCspsg+6yO2bhYJzaAqIiKSp3EPWa4qO4JcBokXY 3Au0n4NOohSg9AH3ux3l+qauCJELtc6TG3wtSRADMcJKKn1mCz368pJdcN/Pvu+zEGve Fvl1M5KcRRQcq9/lU4vqK0S8N2IqjSp0UbuwXQqstxp9PxosA2T3zjTciE5Res1H4Cig 6IQglnEt3xNa61xkPHVLWYJGm6Emy73CbYu+8+eZs29loBNVKArnZx2q8mSZ9p/DxrY8 Qskf0y64g1A3I5Biq0r9Rz8b2sWdpIV6fWv475R93xUBgtOQgygk3PUcNLOyGgQFgznU yIow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=wtGyGiaIDUuPk8pdoR3gaSixybR0rPlWbYrtsheehh0=; b=Q05XZXRt0XYYlVbIe42IvPVj994R8AZKfr+Eut2ghijfdCDmWN/+R22Cz9k8KXMR1D y3QyIMZFTM8tuX56WBwm+ghd4HY67EpQ6H0P8ZxGMXyp5GafvzJYXQrds9OhjPX5kLwB Lfp9X1DiEJa3mMRptkiRfKy4l7zqIyGA/0ZzoMlguHwpl+bIPKpbEqFDgdgEpBK+3ljt nZtm/yQ2R2ixUc1PdJGEXZRz7lfXcEiaf/lV4lqeCZpV5PdxlSdA6kO0d1UaVRzeqiNV hsKcW4fRuhztuXKFaji6LqTQXN52mivzFbNvGbP+YqUkNi+hDhYRzd8tgzfiR8hHBnuQ ZzGA== X-Gm-Message-State: ACgBeo1Uset5tIKWdgQus4gxq/Mb30HLYX22IJf46ZIP/EQF2UFXC3yq itY1pZYr9Wj+VOZI2GgpDMWnW9ZWQUcDOOOa X-Received: by 2002:a5d:59a6:0:b0:228:ac72:3c27 with SMTP id p6-20020a5d59a6000000b00228ac723c27mr4336997wrr.73.1662458974370; Tue, 06 Sep 2022 03:09:34 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:a5c0:5a80:ba98:3a71:8524:e0b1]) by smtp.gmail.com with ESMTPSA id f25-20020a1c6a19000000b003a840690609sm23125014wmc.36.2022.09.06.03.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 03:09:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com Subject: [PATCH v2 00/23] target/i386: pc-relative translation blocks Date: Tue, 6 Sep 2022 11:09:09 +0100 Message-Id: <20220906100932.343523-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x433.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" This is the x86 specific changes required to reduce the amount of translation for address space randomization. This is a re-base, with no other significant changes over v1. r~ Based-on: 20220906091126.298041-1-richard.henderson@linaro.org ("[PATCH v4 0/7] tcg: pc-relative translation blocks") branch: https://gitlab.com/rth7680/qemu/-/tree/tgt-x86-pcrel Richard Henderson (23): target/i386: Remove pc_start target/i386: Return bool from disas_insn target/i386: Remove cur_eip argument to gen_exception target/i386: Remove cur_eip, next_eip arguments to gen_interrupt target/i386: Create gen_update_eip_cur target/i386: Create gen_update_eip_next target/i386: Introduce DISAS_EOB* target/i386: Use DISAS_EOB* in gen_movl_seg_T0 target/i386: Use DISAS_EOB_NEXT target/i386: USe DISAS_EOB_ONLY target/i386: Create cur_insn_len, cur_insn_len_i32 target/i386: Remove cur_eip, next_eip arguments to gen_repz* target/i386: Introduce DISAS_JUMP target/i386: Truncate values for lcall_real to i32 target/i386: Create eip_next_* target/i386: Use DISAS_TOO_MANY to exit after gen_io_start target/i386: Create gen_jmp_rel target/i386: Use gen_jmp_rel for loop and jecxz insns target/i386: Use gen_jmp_rel for gen_jcc target/i386: Use gen_jmp_rel for gen_repz* target/i386: Use gen_jmp_rel for DISAS_TOO_MANY target/i386: Create gen_eip_cur target/i386: Enable TARGET_TB_PCREL target/i386/cpu-param.h | 1 + target/i386/helper.h | 2 +- target/i386/tcg/seg_helper.c | 6 +- target/i386/tcg/tcg-cpu.c | 8 +- target/i386/tcg/translate.c | 712 ++++++++++++++++++----------------- 5 files changed, 369 insertions(+), 360 deletions(-)