From patchwork Mon Jan 9 20:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 640667 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2334286pvb; Mon, 9 Jan 2023 12:09:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsFi1yfN7pp6yjox34YMGjDzBX0xnAdlV61NzqdY4Vk2Sii+Bmg11PxOloAlxiyjBJFsm6G X-Received: by 2002:ac8:60d3:0:b0:39c:da20:d452 with SMTP id i19-20020ac860d3000000b0039cda20d452mr328415qtm.43.1673294958974; Mon, 09 Jan 2023 12:09:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673294958; cv=none; d=google.com; s=arc-20160816; b=FvFddDF2rLapBKftHeD7XActIz28XArUnMQGcDFivG2lc8DwDfn3w9JyEXOyFSPWNJ Nwz86o1lI7KecQmpojJtjvZf4LwRwQwgIw24Uq+832qA7TbfWca29za9uVXugJXfUl8B nPrmaV4LtpwnE9hiPd0cQgCXYnZDADy21aE5LF0Ruu0fhYmhTvtHcZGYteziS+Svzz5+ ZDWOiJI6WjqsuNEAY9oRqzhmPzzo8il7kOdXukWay/oOyGj5BGHyisd92hXz5JBdGtVj +dOUEf0jt2cRkTQYzP/eynRbQwYtjta+VsI03jlAJG4xyzk3M+OZ+dgBKLr7hQ+o54TU xvFw== 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=y8n86qpuIC2G4CMl0rkSUeRn5rOzUpELt0whRWyh6w0=; b=fTwdQ5Lgqgz4C9KuYwj8uyiLQiwWe7n/N2jrdC/mXtd6wN6NwT5rX55a3wbZLxQmYu EVwsHelKV9wCNlrvIUYroSQcBbtTHpcTCTvqw1BqkBMOLrwfNuk/nZdxifgTt1ed5m3b yWQkxra0uFM77lBlHk2bGQnOADE324f0/AdLQBTF7PHtXXmarf07NEHR9kY8IFH9+Slm uyKzlJcSL6cJX6SVC9y69ipKASP+VnTYD8AE24AI6kPO+G+cUcgCAkH1PhiasgbI+QyU B/mc9Mgi1cjQSh06j7CIJLdy9RVQIQGDa0JcG317SmUhDB9EK8I16YPuwQ7jlOCQq5T8 EYTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZVacV6UM; 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 ou24-20020a05620a621800b00705ba979991si1733806qkn.284.2023.01.09.12.09.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jan 2023 12:09:18 -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=ZVacV6UM; 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 1pEyRb-0002rU-Kz; Mon, 09 Jan 2023 15:08:31 -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 1pEyRV-0002p2-W9 for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:26 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pEyRU-0007NI-1M for qemu-devel@nongnu.org; Mon, 09 Jan 2023 15:08:25 -0500 Received: by mail-pl1-x630.google.com with SMTP id v23so5855519plo.1 for ; Mon, 09 Jan 2023 12:08:23 -0800 (PST) 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:message-id:reply-to; bh=y8n86qpuIC2G4CMl0rkSUeRn5rOzUpELt0whRWyh6w0=; b=ZVacV6UMG4stUTKkuOvK+8JkgGa8GayJ58huLPpz+9/wHKH/mYD9exQ02g/uADwYov FIufmfuDFU8536kbua5EYKixnYkWKcyVM3mZSsWJWFvDjCbBWGZElzAG1Xft8Cyb+NMQ CGIv+jDbrT6rfQ4KlhJqKe2iDWPsOopJzhyCQjw6uyy0SDYMzDbQXpmpcq0ONlMbiF1H nFijFpqFu+cZOI1iVjlb3+fciq42+ML3ZxLZgXgoapHxuVzo9hEBW5HI1WQFRXvA798w 8S8YYKYK1U6Drpri1aJBNvoGfmXV7CMpRvqoYVgNKnV1krl1MQgubbnNaTU/CUuNPw2V AjKA== 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:message-id :reply-to; bh=y8n86qpuIC2G4CMl0rkSUeRn5rOzUpELt0whRWyh6w0=; b=pKmQllouEw8nbAaiM9O/hKpNHkAorxkF+RXWnF6MadU98+qsDrcNjR6LAZ3BDXWio+ X3mENlhb5IzliH/wxcIKznfUy1EOZdzLdn0oauuEVwv5beUl0gE6oWoGr8kVcNtvi+vi 9C2oeIU7azCECH4UVH4KLocu7TUSu/3GWIJJVlEMzKtZfAo8gGoX8BeJLsNi9VB8VPmE rlui8PrlfORAT7rr6QzW8YC6MD+ffZxqAuq5e5DonARWjDl/9Ck3pHFw8DEHBNurLi+w KnatdZiwpeaOxl/k7m93bymkVUPVejZ1XkDBUXhImsTQ36ZJLAfkz1l6h6WXv+N/etWE 8C1A== X-Gm-Message-State: AFqh2kp9qPzj4BDgOIYjHK+1U5MM+iiQ/NhqvtKbeqp1/av6/EL73ZHz 0i02WS7639kGAad1TgVmqtSzckGYNBnuwj2A X-Received: by 2002:a17:90a:7503:b0:226:c196:db55 with SMTP id q3-20020a17090a750300b00226c196db55mr19288988pjk.18.1673294901589; Mon, 09 Jan 2023 12:08:21 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:158e:facf:7a46:ba9f]) by smtp.gmail.com with ESMTPSA id l2-20020a17090a384200b0022727d4af8dsm577574pjf.48.2023.01.09.12.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 12:08:21 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org Subject: [PATCH v3 00/27] target/s390x: pc-relative translation blocks Date: Mon, 9 Jan 2023 12:07:52 -0800 Message-Id: <20230109200819.3916395-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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 This is the S390 specific changes required to reduce the amount of translation for address space randomization. Changes for v3: * Rebase and fixup conflicts. All patches are reviewed. r~ Ilya Leoshkevich (4): tests/tcg/s390x: Add bal.S tests/tcg/s390x: Add sam.S target/s390x: Fix successful-branch PER events tests/tcg/s390x: Add per.S Richard Henderson (23): target/s390x: Use tcg_constant_* in local contexts target/s390x: Use tcg_constant_* for DisasCompare target/s390x: Use tcg_constant_i32 for fpinst_extract_m34 target/s390x: Use tcg_constant_* in translate_vx.c.inc target/s390x: Change help_goto_direct to work on displacements target/s390x: Introduce gen_psw_addr_disp target/s390x: Remove pc argument to pc_to_link_into target/s390x: Use gen_psw_addr_disp in pc_to_link_info target/s390x: Use gen_psw_addr_disp in save_link_info target/s390x: Use gen_psw_addr_disp in op_sam target/s390x: Use ilen instead in branches target/s390x: Assert masking of psw.addr in cpu_get_tb_cpu_state target/s390x: Add disp argument to update_psw_addr target/s390x: Don't set gbea for user-only target/s390x: Introduce per_enabled target/s390x: Disable conditional branch-to-next for PER target/s390x: Introduce help_goto_indirect target/s390x: Split per_branch target/s390x: Simplify help_branch target/s390x: Split per_breaking_event from per_branch_* target/s390x: Remove PER check from use_goto_tb target/s390x: Pass original r2 register to BCR target/s390x: Enable TARGET_TB_PCREL target/s390x/cpu-param.h | 4 + target/s390x/cpu.h | 20 +- target/s390x/tcg/insn-data.h.inc | 2 +- target/s390x/cpu.c | 12 + target/s390x/tcg/misc_helper.c | 1 + target/s390x/tcg/translate.c | 870 ++++++++++-------------- target/s390x/tcg/translate_vx.c.inc | 45 +- tests/tcg/s390x/Makefile.softmmu-target | 3 + tests/tcg/s390x/bal.S | 24 + tests/tcg/s390x/per.S | 55 ++ tests/tcg/s390x/sam.S | 67 ++ 11 files changed, 575 insertions(+), 528 deletions(-) create mode 100644 tests/tcg/s390x/bal.S create mode 100644 tests/tcg/s390x/per.S create mode 100644 tests/tcg/s390x/sam.S