From patchwork Tue Mar 1 21:59:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 547263 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp4065679imf; Tue, 1 Mar 2022 14:05:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4lBpxEuk0hrp2jgjHAQCv/WYKXExj5qld2mUm3Ab7+d2cy6J/AcWtYv+6JHx2K7jM5Yqq X-Received: by 2002:a81:1784:0:b0:2d6:b6cc:8f75 with SMTP id 126-20020a811784000000b002d6b6cc8f75mr27749534ywx.46.1646172330300; Tue, 01 Mar 2022 14:05:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646172330; cv=none; d=google.com; s=arc-20160816; b=dQd/hjAELb/FQ/fpzziKAhAjpe89skjsdZg4ltKz/zcyYQi5ivVJLUvcPozvHdo4HZ lXdlqEqfzMYte/+IBU5LYcPKbLn4fom5ZE8k+n2vNDFCHwcx4nA+SS38ybOeLNuR+Swb EJED93n/jleFZ+qrE5RqBZAx2vOt6J0OpW3e/dzrn+GfuvmIJGKFDkMw0fzN63x5gzhP tYKqPW66vS9mF4cWHGv8bC7m4iDBCMejRtK4VjIU1eryrY+wzxyiGD3qo2WayoZCwaTi 7vCPZGziE/50Fzgesz+0+R4vOtzll7+5RDMDtPQXv+gBhkI+oz3RsCPhrkMOsNPu/ld9 E8ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=nBgqnBpDKAOsE8lohN83YaUKejXbXKlcoZLgP0jJ54s=; b=tV4+vJ3V3QKr2/wDjCHSpWds67MYJDkXD62VCepePQRLIFH9ViFBLwJ50/IT1IGpHs Kbcs66hFhxcjpkvb/B3hfF/IaTd5K0/OxRy3LH2CjvFI9P4u4Ar0BWaWoYf38RVT2Xaw oMQh25mk8UYlJS8G7ZRLDJkOEUKL5XVgSBf0KgJMnbH5jo4T67ggYemW1IidQhRsOBzu cvytVzyhPvtGjVqqN90liwZ8WQMRj1WeL0rAsiJdbo4lJUclXbhr5cHJOMf/872uIuAJ CvwGLrr4J08i4pVJYVaodfp/O05kHWl6bW+JXG5bQbI6O6ZHRyO+CVT24aN0u0d+XVgu g4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GiTXlaSy; 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=fail (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 bg29-20020a05690c031d00b002dbd1729f6esi4747120ywb.481.2022.03.01.14.05.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 14:05:30 -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=fail header.i=@linaro.org header.s=google header.b=GiTXlaSy; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPAcb-0007OL-Q9 for patch@linaro.org; Tue, 01 Mar 2022 17:05:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPAXW-0001Fm-LO for qemu-devel@nongnu.org; Tue, 01 Mar 2022 17:00:15 -0500 Received: from [2607:f8b0:4864:20::1030] (port=53957 helo=mail-pj1-x1030.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPAXT-0004pY-Gn for qemu-devel@nongnu.org; Tue, 01 Mar 2022 17:00:13 -0500 Received: by mail-pj1-x1030.google.com with SMTP id bx5so53164pjb.3 for ; Tue, 01 Mar 2022 14:00:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nBgqnBpDKAOsE8lohN83YaUKejXbXKlcoZLgP0jJ54s=; b=GiTXlaSyXrdGwTePY0LvPEgDRFl/Iz/rjUEskyejyH/fQY4KYe0yi3Z77/PYxFlgBL fstpsG7iYQlDaCyMtmIHrtWgS8jYz6zwvGukVmSQWQ0KDkPotRxZAAHQkis0Tz/5p+C2 Xc/kfNvIt2W03Sk+0qrgPj1m1s4U9y6A3f1EqT5T3/Bm5GhQ5vS6AmqIQCoo6M9uRuGP jgFzIkS3NGEvxOrGUcKCRYwMzIh2qGBDQ7yEvsBFdg1J0H7aTNAEHlHEt6atkTav3blC N+zjG0G/8lbitCFfStxlk3oLk2EgbrED3A2nmYM9rRPzb3W+UG/372GB5oMaVZz1ZISD lB9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nBgqnBpDKAOsE8lohN83YaUKejXbXKlcoZLgP0jJ54s=; b=5lU5PVRcnJPyZTMre5JgUHoW/xM5z/tdIhXjpu5KTJIduS4Sgm2WmBwfh0F/xFyVNb lSQVYSV66/oPMGiy3N2KtLO3zJwL40xaAGZJGqt3Z/JXwMyugkTGPn8wkTwZ5Ssj/DiF 1ODDoyImEgsdG2+MPamR2Zud76XodsEFjoqoQeiU+k/PX79j3vNNQb/GjbiEI0qzStdz ouQz+TuLLQc2yxMTxFn0fiO2Gqm4WffT8/0M+H5UKSLYBXunC3UQrabI9YTh9ZW633iX 3uRpjJzomzwY1C9nvGXntaVGc3VV8mkMYUtnioVk8m3xPr0rhA+lIl/akb6rt+N8NuZP l4bg== X-Gm-Message-State: AOAM532Xt/BOqKUfvCYx7OGOfNN9yYlkG0CRYMVnO9vW0knmUrw/PIcP o3V08kJiibwX0GTya7pyzrgM47v8tNCq2g== X-Received: by 2002:a17:90a:19d2:b0:1be:d815:477f with SMTP id 18-20020a17090a19d200b001bed815477fmr5911405pjj.23.1646172002761; Tue, 01 Mar 2022 14:00:02 -0800 (PST) Received: from localhost.localdomain (cpe-50-113-46-110.hawaii.res.rr.com. [50.113.46.110]) by smtp.gmail.com with ESMTPSA id m4-20020a17090a7f8400b001bef3fc3938sm284392pjl.49.2022.03.01.14.00.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 14:00:01 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 00/18] target/arm: Implement LVA, LPA, LPA2 features Date: Tue, 1 Mar 2022 11:59:40 -1000 Message-Id: <20220301215958.157011-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1030 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes for v4: * Add cpu property for lpa2. * Disable that property for -machine virt-6.2 and previous. Changes for v3: * Update emulation.rst. * Split out separate update to ID_AA64MMFR0. * Hack for avocado. r~ Richard Henderson (18): hw/registerfields: Add FIELD_SEX and FIELD_SDP target/arm: Set TCR_EL1.TSZ for user-only target/arm: Fault on invalid TCR_ELx.TxSZ target/arm: Move arm_pamax out of line target/arm: Pass outputsize down to check_s2_mmu_setup target/arm: Use MAKE_64BIT_MASK to compute indexmask target/arm: Honor TCR_ELx.{I}PS target/arm: Prepare DBGBVR and DBGWVR for FEAT_LVA target/arm: Implement FEAT_LVA target/arm: Implement FEAT_LPA target/arm: Extend arm_fi_to_lfsc to level -1 target/arm: Introduce tlbi_aa64_get_range target/arm: Fix TLBIRange.base for 16k and 64k pages target/arm: Validate tlbi TG matches translation granule in use target/arm: Advertise all page sizes for -cpu max target/arm: Implement FEAT_LPA2 target/arm: Provide cpu property for controling FEAT_LPA2 hw/arm/virt: Disable LPA2 for -machine virt-6.2 docs/system/arm/emulation.rst | 3 + include/hw/arm/virt.h | 1 + include/hw/registerfields.h | 48 ++++- target/arm/cpu-param.h | 4 +- target/arm/cpu.h | 32 +++- target/arm/internals.h | 58 +++--- hw/arm/virt.c | 7 + target/arm/cpu.c | 9 +- target/arm/cpu64.c | 31 +++- target/arm/helper.c | 332 ++++++++++++++++++++++++++-------- tests/avocado/boot_linux.py | 2 + 11 files changed, 425 insertions(+), 102 deletions(-)