From patchwork Sun Oct 2 17:29:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 611750 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp719719pvb; Sun, 2 Oct 2022 10:35:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Oj1vU/g2/Y/vDnO7dZaDNrkpXeDSU52q6B3rTDSa+CEuewDJ69ZLbuHOHzVzsoU+KK0x6 X-Received: by 2002:ad4:5d4d:0:b0:4af:9a4f:af5b with SMTP id jk13-20020ad45d4d000000b004af9a4faf5bmr14190221qvb.95.1664732101525; Sun, 02 Oct 2022 10:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664732101; cv=none; d=google.com; s=arc-20160816; b=m2PFlIGJ+H+9OnvnLtm15SOb7sk9LeCS5x3VwY1v9/Dx5yfc3bw2T1y4CN4axyhIVM 5vRz6ykClhLVQe8KKOlsFETM/CVTE2p/ZjR6KIXm9lrEfKdJfJ4krrkrWXZK/+12xiOo mmK5/UmWqTZhbwCLtAQyHpttTR2nfQBBIldc/0VP0k10iFeEkEZvlF8bdOf278HJyYKk KMfDDA8u/Nb6EiU5oQ68fqf3CKIwNJgbE4t2pEIaGuMMYPktv3k/SviLcHKVGUVtaSRF MuivL9hUMQ98uzVUwsHMYl5PleWPtDHjqniqXFxJ/EzwKAAgjWaf69ZBBHllRz5Fcqq2 V9hA== 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=K4fJO7OxtAxIix/bw/qT/yaLWfwtHR6M9qzaQp11iAY=; b=XFDazm50yifnshJwzYHCdgNArq62dszrkTPg8d9m1HD2i9+lYRmkzaIBOLgzVbWseQ 3C4K/dNHXv3IySTxS9xwATY/hr9QI+REOXz8fk9gOVm5FZ+lux5JY2jtBGYIaAZqF4Go rvZCfaQpBunZXYxGL5rt97zSEUTmKaHv7c0eS2ghny5Mt+4+JJDZMMLL05yvH9Yds12m /r9M+cU6KbqBl1UrQa8Wlx0zuD3BdHs8cGgFXOkC8As26z2CjIHV6YkYT+ZGT+9dvHCP kWagHIG45PJuvvZGgCWzeobpoIL9jq4hFECnafBUxb9ruAkug42Id2Alm4ybvDWXENzV hfsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t2dAyais; 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 fd6-20020a05622a4d0600b0035cc4fdcc6csi3568524qtb.625.2022.10.02.10.35.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Oct 2022 10:35:01 -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=t2dAyais; 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]:52182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of2rl-0001RJ-2p for patch@linaro.org; Sun, 02 Oct 2022 13:35:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of2nL-0005SW-T5 for qemu-devel@nongnu.org; Sun, 02 Oct 2022 13:30:43 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:36805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of2nK-0006At-5G for qemu-devel@nongnu.org; Sun, 02 Oct 2022 13:30:27 -0400 Received: by mail-pl1-x62c.google.com with SMTP id c24so7903162plo.3 for ; Sun, 02 Oct 2022 10:30:25 -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=K4fJO7OxtAxIix/bw/qT/yaLWfwtHR6M9qzaQp11iAY=; b=t2dAyais5qFlGKcI1TsXl/9qM9Sk070Y8cxzvqFJurc+zVSZh6FoUXB/rW9IIF/g/S y83umyNgylhcdq/qWI1xHWAeapoDCNT8+u5VeBFGNrq3dboGtxnSoWAdz+3UM1aX8aPT 9X82jBXVToMRYlBRbODt0zxrfmVvqnbBMbTx6BPtGrjbZXTToc9urgI0LoVpM6IqZM3U L65GH0wmZ2J/oiix5cXCH0Jauu42Os0MkbH/SFyhwt4UrvZQ0HUD2CLvoeMPmuXpe6oU IMFg1NF6MXb+SMoRY8wI7OCqN7fgkiI7U05TMkOG9xC5YRY8XYyhegQbh9m45qe936/2 Eiow== 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=K4fJO7OxtAxIix/bw/qT/yaLWfwtHR6M9qzaQp11iAY=; b=Lu8StS2VxIcBeALGLUzCyqVRUfAbhAm1noPZY9kAV/Z2zdZcuN84av39acTILLA7fk PQZ0gPfiqgBzgE6Mr4gq28qK1OmAY/xyNef3tL/A7TS4sI/uiG8z5t9u3bhTro9tGOcx bHuA6ocmr9fE9aftMUGRSFb7sr6N67wRlhZvsT7mCgNcheD7N/RuetckCbRsqLyQXZY0 iMVmsBPZvrun16iZZesOFcJntjjbAWFA6KteDNZbB1rFRV5xV/1JUhjFc0tdeyDA+Ko5 Gn6W571KyfTcHVbIRAl0xgcFRiM9AQBBvHQuFyRxTmvuv6ZjLGg/T1NQ134fiJqPwWFb WCMg== X-Gm-Message-State: ACrzQf06H3YYVQH/qC6jGEguyhPkiNnrm31nF7b4m2gGGoPlXJTh4T16 OW8INse0uDrroIgbuTVwFviR4/K+VxxyKw== X-Received: by 2002:a17:90b:3ec1:b0:203:7c2a:af00 with SMTP id rm1-20020a17090b3ec100b002037c2aaf00mr8268986pjb.246.1664731824604; Sun, 02 Oct 2022 10:30:24 -0700 (PDT) Received: from stoup.. ([2605:ef80:8002:3cad:72cd:dd96:98f6:c3cf]) by smtp.gmail.com with ESMTPSA id 135-20020a62168d000000b0056025ccc3bbsm2749783pfw.146.2022.10.02.10.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Oct 2022 10:30:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com Subject: [PATCH v2 0/9] target/i386: Use atomic operations for pte updates Date: Sun, 2 Oct 2022 10:29:47 -0700 Message-Id: <20221002172956.265735-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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.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" Use atomic operations for pte updates, which is a long-standing bug since our conversion to MTTCG. Modulo rebase, this has one change from v1, which is the new patch 9. r~ Based-on: 20220930212622.108363-1-richard.henderson@linaro.org ("[PATCH v6 00/18] tcg: CPUTLBEntryFull and TARGET_TB_PCREL") Richard Henderson (9): target/i386: Use MMUAccessType across excp_helper.c target/i386: Direct call get_hphys from mmu_translate target/i386: Introduce structures for mmu_translate target/i386: Reorg GET_HPHYS target/i386: Add MMU_PHYS_IDX and MMU_NESTED_IDX target/i386: Use MMU_NESTED_IDX for vmload/vmsave target/i386: Combine 5 sets of variables in mmu_translate target/i386: Use atomic operations for pte updates target/i386: Use probe_access_full for final stage2 translation target/i386/cpu-param.h | 2 +- target/i386/cpu.h | 5 +- target/i386/tcg/sysemu/excp_helper.c | 706 +++++++++++++++++---------- target/i386/tcg/sysemu/svm_helper.c | 234 +++++---- 4 files changed, 581 insertions(+), 366 deletions(-)