From patchwork Fri Apr 1 15:00:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555576 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1622963mag; Fri, 1 Apr 2022 08:04:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw8sIFc/iQUHOx8PjOBGreBBxOA/7oeOt3PnTRU88WktmD4quvcEQ7B+EjQO+PAeT/m1Af X-Received: by 2002:a25:9f0d:0:b0:634:37e:3b8c with SMTP id n13-20020a259f0d000000b00634037e3b8cmr9264730ybq.8.1648825459523; Fri, 01 Apr 2022 08:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825459; cv=none; d=google.com; s=arc-20160816; b=cS3IrmbeyfukpPkahxgmFWB0PuDdpCQQywUwEmD3uFDjNonSEb7ncFTSMVELNMgO7+ hnlLYYAu6L3jl6/+7kkJQD8bw18QmMF8EwODJ6zj3ZxJCS+Guox2lE9Jn+mS+Ozn7JNb rOSdOxQUlN33064MkdHTkZOaEt7Q26KqhN71nPkpdCN1mSIe8NLrRA4Wjrq6sGsUCL0O 2KZgRf2AQO5Ot15Iig/+u+lYFdlBrooMZ5LkSW4+BWS93vxuSVmljS5QK2VsjTaEqIFS Ux8YT71QV5IEOyA9bvdTw3hxaiqgOUuQJ8wYpMc8H4CXR4PgoLBaIP86dTbE7f3hIXJw 9gMA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D7SQ68FCxztq/NMd54rgSzFbRfNvMZEmQG1HqRiAPlo=; b=Wo4p9ETKPKDsRhBUrGdLMIZ1C9aU86MSUbqml0VcNlhUS7okZ2RryK9NlB/iCrmt2r SEVXXdtuVFXmaZWpP+gRd1IYvzWsVGpE5E99x2aUA90T9JpHgIhQywTDOu4BsGcxxvNq SJf/kLWnh+wWdkbJhtzBjL+jSOmLUc7vauSUT/+k6xHptLwqSNJPT94TFjLanmrGce8P CxzMPMgIXtWv63VM40NR7ylIdZVOpOc6NG6E7B7lTI7AeSx0hTqCsac7Kiz2SScUMZNJ GblyEUONkpbZYywcxWMmkQpb9UM4G6EKiVu6+02MbTiRI2a5JPL+xUUqzHoEpcSiGfjP o1JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hdRpBXvp; 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 u12-20020a25f80c000000b00633c1d17110si2532471ybd.326.2022.04.01.08.04.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:04:19 -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=hdRpBXvp; 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]:47538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naIp1-0001NR-1r for patch@linaro.org; Fri, 01 Apr 2022 11:04:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIlx-0003iC-LA for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:09 -0400 Received: from [2a00:1450:4864:20::32a] (port=53995 helo=mail-wm1-x32a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIlr-0005hD-U6 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:09 -0400 Received: by mail-wm1-x32a.google.com with SMTP id p189so1856516wmp.3 for ; Fri, 01 Apr 2022 08:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=D7SQ68FCxztq/NMd54rgSzFbRfNvMZEmQG1HqRiAPlo=; b=hdRpBXvpOqETYPYX/a4v2Voa68dQe9D6kdhr48O1p0Qla+NG8uUyvKAvJwiuEXLHD1 hzR37ZCIJ2VM7VFIZUiXQN+9HL9G50AqBN5znI24wnKYDiAqs8roinzsIiTB9Ksc3ONs AU8ORpBrn3D5uR7daaGA+2V0vp8JfvlHye5l75KdVMeN55JiPh4hj69ESzXAuAE9U3Jb FvpuuA1MBJyKvuHP366aurUU/7fAiArhLVe/SBHjtnrugO2LvMNf5KSDOqcamwL++9FR mbK37svt+2kYXsIxKe8LfAXDjF/YQP0pR9V/Ve0sMIOGIGiXRvS3xwcRJDwPiZWu5V48 gnPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D7SQ68FCxztq/NMd54rgSzFbRfNvMZEmQG1HqRiAPlo=; b=jl1Fbe41r/a+wXPBWcxo84fELpduPpVhmGcOpuL6cyas09b/qyOL3nDil9+AWXi6jd JxNGuL4VacaAqY2128ZTpy2pH9Qly9dGD4o4CK5pR9daRvifk2VhTu8de/Y92OS4pfNY AGgk2cx/nianOszmOQ7Cl01TCehbwI2Ffgk/eiBJQNS76XMFNEsk2GLFikEPTGOxUrpO CjHVbsZTvfurHNd/6nXInaaCpHq8gzR2ZTaNLpqCkjGeyJAxddcxYrAmjdZ9n+BYWQrQ 4WChudWHFGty+ydhh55vPy3iaLjJRllYJ2ZpnQbFxkvCuNOzMWhxoWd7gEMTF289b24w 4rnA== X-Gm-Message-State: AOAM5315hXrT+EBus6J3O9GUyswXt3ex2Y+sCvIKxGbyGMoezSEBBHap zSezpZz/3M5CpHzQdkAA8gmDaF2GLPAJhg== X-Received: by 2002:a7b:cf03:0:b0:38e:38c0:be27 with SMTP id l3-20020a7bcf03000000b0038e38c0be27mr9313914wmg.150.1648825262281; Fri, 01 Apr 2022 08:01:02 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:01 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 1/6] target/arm: Fix MTE access checks for disabled SEL2 Date: Fri, 1 Apr 2022 16:00:50 +0100 Message-Id: <20220401150055.421608-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Idan Horowitz While not mentioned anywhere in the actual specification text, the HCR_EL2.ATA bit is treated as '1' when EL2 is disabled at the current security state. This can be observed in the psuedo-code implementation of AArch64.AllocationTagAccessIsEnabled(). Signed-off-by: Idan Horowitz Reviewed-by: Richard Henderson Message-id: 20220328173107.311267-1-idan.horowitz@gmail.com Signed-off-by: Peter Maydell --- target/arm/internals.h | 2 +- target/arm/helper.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index a34be2e4595..7f696cd36a8 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1094,7 +1094,7 @@ static inline bool allocation_tag_access_enabled(CPUARMState *env, int el, && !(env->cp15.scr_el3 & SCR_ATA)) { return false; } - if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) { + if (el < 2 && arm_is_el2_enabled(env)) { uint64_t hcr = arm_hcr_el2_eff(env); if (!(hcr & HCR_ATA) && (!(hcr & HCR_E2H) || !(hcr & HCR_TGE))) { return false; diff --git a/target/arm/helper.c b/target/arm/helper.c index 812ca591f4e..3aeaea40683 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7176,7 +7176,7 @@ static CPAccessResult access_mte(CPUARMState *env, const ARMCPRegInfo *ri, { int el = arm_current_el(env); - if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) { + if (el < 2 && arm_is_el2_enabled(env)) { uint64_t hcr = arm_hcr_el2_eff(env); if (!(hcr & HCR_ATA) && (!(hcr & HCR_E2H) || !(hcr & HCR_TGE))) { return CP_ACCESS_TRAP_EL2; From patchwork Fri Apr 1 15:00:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555577 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1622973mag; Fri, 1 Apr 2022 08:04:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYcv/dtxtv1I6UbIDMSqg1HdHcYnJMUXTlxMcvOjDfx2ll8MdIMOEXIyCXqJEOIJz3xY07 X-Received: by 2002:a25:b3c7:0:b0:623:e9fe:e108 with SMTP id x7-20020a25b3c7000000b00623e9fee108mr8887708ybf.335.1648825459897; Fri, 01 Apr 2022 08:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825459; cv=none; d=google.com; s=arc-20160816; b=0fyB+q8JZZF3dnyCgrTpKOx3n1Q/2BrqGxCHUB3bI5Qdsk4SNnqciDte8M3loyIR3G PiFhf3tYsSKbIcChH+MyWx9MJJ+5gZB9zxM/ocS2zcpOBrbux05VjOXh+AF60sjhEDuS a6cM49l5vG5XzVI0l7qgKf/dj+SrHE173m6vpIJo+N39g1Bi9hqowZRDOm3eCMvNNIkF iNmeIIq+CA+g+p8Ix6FdcCP+tNjzxPRN9zLJt2N660ucdOFTEZUrXjeKFYtSmfiN+Q/T gdTyArnTxJwknwzFojBwvCLRl1hiOQL1RHqKQqq4jv9qodaLvJOMDbAWnMAY38pfWLyC 4WPQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DG3ZxsNvAkuJNsVgMf6nYBpbacq0qbEwob0HWoVkXv0=; b=MBu2jNdJPOa/wioYkL5/ZWwX7R+tg+ClkirYthWQntQJleIvLIQrAH/5YB1CcgB9m2 2txAlEEpBWIldsFawH9WUl4T/Ibo6CwldWE1VUCcXMikROJbyE9wunMJk5eJhz466rTZ 8igOe4CWhdbNWK/hBhpQTaNXhP+k6/E37Bhcg815Hjf+dI1DExDIH4uPEym+g6o/gcDN zEkMJA2kSM74WbqyAyQJSto/LlILp7gUr8Ol6Gchu94dA1bTk7QyEX7mbN0d7TspJVs5 RbJRzG1Nv4VXxXfo1Zstt+oEVOeWIAMD8QIhWeBhlkrsyjEsx4yWzWNkC/WFZIYurn4W xO1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fktvPXe3; 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 c187-20020a251cc4000000b00633994043d2si2471040ybc.60.2022.04.01.08.04.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:04:19 -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=fktvPXe3; 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]:47522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naIp1-0001N5-Ds for patch@linaro.org; Fri, 01 Apr 2022 11:04:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIlz-0003mm-Ic for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:11 -0400 Received: from [2a00:1450:4864:20::42c] (port=33335 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIlt-0005hO-0a for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:11 -0400 Received: by mail-wr1-x42c.google.com with SMTP id c7so4756920wrd.0 for ; Fri, 01 Apr 2022 08:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DG3ZxsNvAkuJNsVgMf6nYBpbacq0qbEwob0HWoVkXv0=; b=fktvPXe3Bq0kGx0N+xs7wn/F3zJCL0YwGcPWissP3E3yloNhmAMB+xd33e5YS0T9QE ZoSrQclIBPCs173lKWtKg2GgtXi9vxk4Na/PotyPokTahWpItxXSZM++NC096HFUu4fb sscKaLyHMP8rDoA4VDbddk2TMtXYP3EgH4wkd+pn3v+1sOD4cwJeRtqiV7m4Ofqqjmjj 3W/cB6to5jx0h1y3T5bSYXxAkvgJA+G7xHmeLNdZOBfjTqCmDEGy8t+q9WpVAE87mO9q MVQJQUGMNH8nMz6UOIc3v3maCUGCOlYevrVwQIo/oF4lrB6f58goY2TemJJ3+g2DPhgP uUsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DG3ZxsNvAkuJNsVgMf6nYBpbacq0qbEwob0HWoVkXv0=; b=tvCqs3jOgDHA8ebgriILs6bztBLm0O9jNookWWqr2E0kxeMhrulT33ZKAzNfR5MDkP e4FOcQpEQi5oYO0BDDIfrL2Ij9RjmbDEpbLv96lPLcRxejRfI/AceMT1GgYMRihiHVXg xUz8w3O0nITI4Gp6b8NsAcVQpKoJZx8m05gUF3c3NtHWygiKaAGXiJ6tpCRr5n2RNzud jIVgHOeWMexTQRcwljpDD9W1ZTbmpa4o15cEfXSOx1KsogXUEH6dxQXbPBh8Sy1Mvg8Y +JCZUFVK2LE1EJx0AxfiACFZ3gQTXYZhwbO3UpO3vkhiqWwgfxDhkaZgBtc5qbQ0TXPE gaqg== X-Gm-Message-State: AOAM533Cg34zzu8m283Qo5TxHs/n8RGGL3lmpCpxDey+rIDZWq7zvTqm SgRZ4Hp2kY9MyanLXaFQ8awNvrZtANMCfg== X-Received: by 2002:adf:ef11:0:b0:205:b266:68eb with SMTP id e17-20020adfef11000000b00205b26668ebmr8310602wro.310.1648825263407; Fri, 01 Apr 2022 08:01:03 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 2/6] target/arm: Check VSTCR.SW when assigning the stage 2 output PA space Date: Fri, 1 Apr 2022 16:00:51 +0100 Message-Id: <20220401150055.421608-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Idan Horowitz As per the AArch64.SS2OutputPASpace() psuedo-code in the ARMv8 ARM when the PA space of the IPA is non secure, the output PA space is secure if and only if all of the bits VTCR., VSTCR. are not set. Signed-off-by: Idan Horowitz Reviewed-by: Richard Henderson Message-id: 20220327093427.1548629-2-idan.horowitz@gmail.com Signed-off-by: Peter Maydell --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 3aeaea40683..a65b39625db 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12697,7 +12697,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, } else { attrs->secure = !((env->cp15.vtcr_el2.raw_tcr & (VTCR_NSA | VTCR_NSW)) - || (env->cp15.vstcr_el2.raw_tcr & VSTCR_SA)); + || (env->cp15.vstcr_el2.raw_tcr & (VSTCR_SA | VSTCR_SW))); } } return 0; From patchwork Fri Apr 1 15:00:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555575 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1621215mag; Fri, 1 Apr 2022 08:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXe1KBoURtlaiQEMwAB4p+S/v63VN+QHBrKQiXn6gfzBs2lNTtfaRMcp1Jjw3Tat7eewRR X-Received: by 2002:a17:906:7307:b0:6da:92db:c78f with SMTP id di7-20020a170906730700b006da92dbc78fmr193125ejc.35.1648825372954; Fri, 01 Apr 2022 08:02:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825372; cv=none; d=google.com; s=arc-20160816; b=rYl2TCHIRi9FsH7A8tye6Ju8jjjT59awFngyt+xocYCUbpRwcgy/OS59QZwTYEU6ze XLFHWlNr46QRYTm7t5SBn2j+zsB9PgLnm9COVP4F2oZPML/Fg6unr6HL3VtHZkOXf5n9 0lnRyfsP68qbvAABi0M8BFAPXhne5r1q/bb0DqUYYxuJTBOU57yTxnHBQee4oea39MsF uzg8rJySJwpog4xMJN0WVcqrpEmjhZFocNp+TLMmC7TsMiEIPT7vxHJ3HynYxPWTDOC7 QIW+KmcHagTlKxWiaREM96EnmC9UvnpFXOrKkqVICeYfgvErHrfDzcirpp7sQdrytIOQ 7RaQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=DHc7BQYY98e10RYi3BhMNIgyC3D1Tj1tjFvf8ofOuj8=; b=M6WEyccSSaq52tobJmAgHJEGCts8G7IaDcWmtCZHET7YU7vvaMWzcysGqrcr008Ixy TlQsSZ7K1AuXkAR8dTObmvf9Ul5+f73qLwAvMf1lPWc5RIGM0JNNGzIgMIChkEydNoR/ Kb2WP9CWeV9IlBI/zrWeJKpPyBqGvFFKq0YoZJaHrOdjajkeHPwMlDtVmeLZs4YyW1Gp mD5sViKTnJrlivKBVwGEiMij7AphhP7f9xs2BInqTXSo5ajHLwECJ49bTWR9r4coQAPp J+vOuESeehrXSxRSgJ/TmznGS0Phqt49DYiHEFxaiidEE9pZd+f89IWZZHyYQN3elUkF BxJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dh3HV8VW; 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 g13-20020a056402090d00b0041b6412d2cesi2317048edz.171.2022.04.01.08.02.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:02:52 -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=Dh3HV8VW; 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]:41952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naInc-0005vt-1X for patch@linaro.org; Fri, 01 Apr 2022 11:02:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIlw-0003f2-2M for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:08 -0400 Received: from [2a00:1450:4864:20::435] (port=38476 helo=mail-wr1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIlt-0005hU-L0 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:07 -0400 Received: by mail-wr1-x435.google.com with SMTP id i4so4669403wrb.5 for ; Fri, 01 Apr 2022 08:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=DHc7BQYY98e10RYi3BhMNIgyC3D1Tj1tjFvf8ofOuj8=; b=Dh3HV8VWOcYu6JR9t1jjxKF7NZJmGK8Gpn/DSr/NTMXvrdoWfNp4FdhkXrk4WK3lQv xrmw5nC0Rg7L3BbRZcKklJclKYUwZ1Jc96I7PC856f+t8OA4sTk9kc0ED6XB6ywcuj7P lGUQpXSc7ZITUgKL5kuZNm6gzga22OEvmnJ+W6pu1thsrfw203Wm+PxJYhSc/pzk1low 5UtgnsU80rXWJfXbIGMtI1jvXNbwTOymIkHXjquxtVK3BjwTt3FIeCoIMPG7mf//lY4r fOhqWORw+MNCxF6YOJINkYz1U7Az22Ea1e1TkRAWkobC4RKu6hENJi0oOFIUMhBauaaE DJXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DHc7BQYY98e10RYi3BhMNIgyC3D1Tj1tjFvf8ofOuj8=; b=npZUfC6gQV1gnKCu+2xMWThyVtYDJu8S4Iphb+8X0w05adh+sGMLXvOJ9C8ohJXdLY R9648GLKS90KdtEaOIkNBMMQqg7aLiGVOp5IokalJ47HXS90a+eTyV0jyQ5q1W6NstQ7 E2Ox33xPz5f8RaFpIQhwV3OxqpI3S1ZFkYdvXjZCrf1tJhXskpIFD52V2SDusFzR8hVJ htP40jahd/yZvnHGbg7tOne2i8jQCg8nXcKiBAYR/bTf6pRnImGGM5YVTfx/UTG8DFE0 HEJ9YP5eZjLGHFDsfsXoIiUjZqswQ9cAa5fcqVWIARDJSFE2A6n/u7pJCMClLG5MTQi8 F0tA== X-Gm-Message-State: AOAM531mq7YMuaxmXnpXg3NzI6gAw6zEjn1ZC9zcWT/ZI5JgliS2usll 6oCT79/XEumluGLl7s9UlW2JZ5O0qfsXUg== X-Received: by 2002:a05:6000:510:b0:203:e469:f0a3 with SMTP id a16-20020a056000051000b00203e469f0a3mr8239408wrf.710.1648825264229; Fri, 01 Apr 2022 08:01:04 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:03 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 3/6] target/arm: Take VSTCR.SW, VTCR.NSW into account in final stage 2 walk Date: Fri, 1 Apr 2022 16:00:52 +0100 Message-Id: <20220401150055.421608-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::435 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Idan Horowitz As per the AArch64.SS2InitialTTWState() psuedo-code in the ARMv8 ARM the initial PA space used for stage 2 table walks is assigned based on the SW and NSW bits of the VSTCR and VTCR registers. This was already implemented for the recursive stage 2 page table walks in S1_ptw_translate(), but was missing for the final stage 2 walk. Signed-off-by: Idan Horowitz Reviewed-by: Richard Henderson Message-id: 20220327093427.1548629-3-idan.horowitz@gmail.com Signed-off-by: Peter Maydell --- target/arm/helper.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index a65b39625db..6fd5c27340e 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12657,6 +12657,16 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, return ret; } + if (arm_is_secure_below_el3(env)) { + if (attrs->secure) { + attrs->secure = !(env->cp15.vstcr_el2.raw_tcr & VSTCR_SW); + } else { + attrs->secure = !(env->cp15.vtcr_el2.raw_tcr & VTCR_NSW); + } + } else { + assert(!attrs->secure); + } + s2_mmu_idx = attrs->secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2; is_el0 = mmu_idx == ARMMMUIdx_E10_0 || mmu_idx == ARMMMUIdx_SE10_0; From patchwork Fri Apr 1 15:00:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555572 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1620360mag; Fri, 1 Apr 2022 08:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8Rgy66pbDoa1G1cA94oenTIxShkiBnsSwGMDvXUy7ZLFEpQWC7iajAs1vcX1q4hPh9/P2 X-Received: by 2002:a25:94a:0:b0:615:7cf4:e2cd with SMTP id u10-20020a25094a000000b006157cf4e2cdmr9078857ybm.227.1648825334800; Fri, 01 Apr 2022 08:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825334; cv=none; d=google.com; s=arc-20160816; b=BAgJab9dz70y8l3qghXpJ8DeKKj1Fl4bnxvlP1761tD5nS8p7Jk/EDkyDMpv4NVTPH F9R/o2rriI2EKo1WzmZCr1kUnatRjyIi3bP9qLxaD+mnbEEzA0AKxD2adcHfDGCROysS 9JzT7ssXY4CxlKUHKmfnNdTKBQJrG3eTsPPQIfM73LukOjaIfN4X0/wxSBsk/IAGpp+e Uhc6X5ttlEFppDnFBwJoLeNSpkrKEDM6AEg9t1VX5eRKJfWBkEmQT9Kkhkm4AHAupQHO z1yKwnr/K5ouHVN8EdHRm9g+yTONQLwHOTLdILFUsXYkjawHqTjrVA1++AKEoixYSb6c VwXQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=n69SDyB9UIAW3KHjm5y4sX5YK4nF3J1IMIpH0a4tlR8=; b=dITEylIJchdhX5wpiGQEQApf86mZglg1gP/oB7aIBa4V4/0SQg8p3TuXezs62Y/dhv LftAS42AlM5fgkvzpMMjo3GXTbg4V4EUgUjIF1VhMrH/IhRzg/vHEaP7fDtCW187dFjE A9w9Bh1rXbhYCx3qBagc1E7A+DXBaRJrouQf8C9swe/XGJl9uiaHZ9XVATgw3OqKR1/G AnfgnGlwIHhpZN4FsqNiI9fPyrXxcEP3hroVCue1M2BdCn+40Lgg46f5lsOvmTvv1iWs JBw4+5EkzGahaK+aoR4HhSTQgoAhkDzjjxZxRPWFGR5hGzJGdEJm5MWUkxVE+e18ArRD Fc+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vNFjxZ42; 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 e67-20020a81a746000000b002eb1a8e1b6csi1951518ywh.223.2022.04.01.08.02.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:02:14 -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=vNFjxZ42; 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]:38718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naImz-0003m2-Lt for patch@linaro.org; Fri, 01 Apr 2022 11:02:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIlx-0003gj-0g for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:09 -0400 Received: from [2a00:1450:4864:20::331] (port=43995 helo=mail-wm1-x331.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIlu-0005hl-Fy for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:08 -0400 Received: by mail-wm1-x331.google.com with SMTP id p12-20020a05600c430c00b0038cbdf52227so1638793wme.2 for ; Fri, 01 Apr 2022 08:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=n69SDyB9UIAW3KHjm5y4sX5YK4nF3J1IMIpH0a4tlR8=; b=vNFjxZ42fXfviIIYweayv3HL0i9k5v0qAUMMCeqT0aZNbSRoinV2GcMBf7jB0K4eQx VLCS8BhXzFbjknvxu22KAAJnUUDYMLjLkrw3aLpVMiTq08vuAHgFdEsgf6qQlcR65JLs CXsvzrpg+e1NF0lCHImITKt90B6lIHOx8E6YrL+RbuMKjg6LyG2nHl1YTc4aK9alF0Aj 1d8ZQ9AqlX9qbLmsXPOuZeAAQcubE7Ls3a316/deMgEAoAYjqWx0QvkKmu52Lu1eWVe6 Z/iyuE70PmXgD6eqe9SaQltC+xjVWIjak0mqe7qNvxMy1SLcqA6TldxTHMOngsIVRJLy DviQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n69SDyB9UIAW3KHjm5y4sX5YK4nF3J1IMIpH0a4tlR8=; b=v1ZJyFuXo/+MAAXgUSFPEbDqCafEjiFXodUBRN4KlKKJ2gz9piEQxzXLfp74rrHPqx TiRN9vV5QHvyNUO/11IM3Vz11lY5rXvundpuPSEl8DzoHnN6Ep5m3zcU0SxgoW4MHNEw 5vChST6QX/99uQa5pzh2D3vEwZj96KumM2tf+L4zO1tUgb+sKvJpGLg6oeFsQZnK28is iqUU3eLOI6vyvNWOr3lB+zTHkRa9ewBDhEc0Nir+v54ymMAXBjvi8GM+i69nw3LASsxI kbFvLKdcNY5Z6IutJJXQRZrmj8su/0sNHVMGLE0HGNsjFQiKktJOwiobXvA5tPO+zWz7 pVbQ== X-Gm-Message-State: AOAM533LsMoOVfqZtFwHw+pv1MuvGI4qVFOWAJi/6hiHI8vNAyRLDi+1 8Di/Bz07vSwYb8C9FmYXPyZ7idI+qT8fbA== X-Received: by 2002:a7b:c14d:0:b0:38c:801a:a8b3 with SMTP id z13-20020a7bc14d000000b0038c801aa8b3mr8979351wmi.40.1648825265078; Fri, 01 Apr 2022 08:01:05 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 4/6] target/arm: Determine final stage 2 output PA space based on original IPA Date: Fri, 1 Apr 2022 16:00:53 +0100 Message-Id: <20220401150055.421608-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::331 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Idan Horowitz As per the AArch64.S2Walk() pseudo-code in the ARMv8 ARM, the final decision as to the output address's PA space based on the SA/SW/NSA/NSW bits needs to take the input IPA's PA space into account, and not the PA space of the result of the stage 2 walk itself. Signed-off-by: Idan Horowitz Reviewed-by: Richard Henderson Message-id: 20220327093427.1548629-4-idan.horowitz@gmail.com [PMM: fixed commit message typo] Signed-off-by: Peter Maydell --- target/arm/helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 6fd5c27340e..7d14650615c 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -12644,6 +12644,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, hwaddr ipa; int s2_prot; int ret; + bool ipa_secure; ARMCacheAttrs cacheattrs2 = {}; ARMMMUIdx s2_mmu_idx; bool is_el0; @@ -12657,14 +12658,15 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, return ret; } + ipa_secure = attrs->secure; if (arm_is_secure_below_el3(env)) { - if (attrs->secure) { + if (ipa_secure) { attrs->secure = !(env->cp15.vstcr_el2.raw_tcr & VSTCR_SW); } else { attrs->secure = !(env->cp15.vtcr_el2.raw_tcr & VTCR_NSW); } } else { - assert(!attrs->secure); + assert(!ipa_secure); } s2_mmu_idx = attrs->secure ? ARMMMUIdx_Stage2_S : ARMMMUIdx_Stage2; @@ -12701,7 +12703,7 @@ bool get_phys_addr(CPUARMState *env, target_ulong address, /* Check if IPA translates to secure or non-secure PA space. */ if (arm_is_secure_below_el3(env)) { - if (attrs->secure) { + if (ipa_secure) { attrs->secure = !(env->cp15.vstcr_el2.raw_tcr & (VSTCR_SA | VSTCR_SW)); } else { From patchwork Fri Apr 1 15:00:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555574 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1620535mag; Fri, 1 Apr 2022 08:02:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzH4mMe4nXiZKoRqL/ar0a3vTBKHoHkNxpSxEkhdsIAQF3Le3uYjJxxx2CsvVkVCaBsNZNQ X-Received: by 2002:a81:345:0:b0:2ea:a8fa:f323 with SMTP id 66-20020a810345000000b002eaa8faf323mr10606879ywd.292.1648825341177; Fri, 01 Apr 2022 08:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825340; cv=none; d=google.com; s=arc-20160816; b=oJN1K6HuDtdx88HlIg8Mz5g8FleGnlZB6CJ8vKedKZlqhRF9oghYKgpQJszRKp/lqb GX0lncxPMteBtBANtCke3yrheevKxCOx8tQXpWmTyGR2CfYHgqiotOVb2wD5e/ZgWmCT JrZxtVc+ghiFXPJ2BZXKlwAXs2XViKFK4kxldvrwJxWRIoTzHlJCe0zXnApj1cGN/64F LSDVNlL/0Zv4ZPeaslHKqoScTn38ByK0eIs5NMni8pMUrUvERVXgO1N/qhuPshoZI/n4 bg4tf4H6Phm0puo/SYqFNQAZYa+PkSokG/jTuoxZOtwuelkBQ7uwLS+cVABqRjRBy5+Q oehQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Z1XQpnTzzax90Lh6sULRJEKvqLBLpmW6JvIqcejUeVw=; b=HBZW1kDm7HcqUxXy2F9Y2QzjSG+RejB6QAb2RVj4nleLwQ2xTBD/fv2cCYgipbQC/t EyX0vu11McIlu/Pd1jHFo4hruGLUHzxubl6P8n82FnAsHYB2upukMhYjIop7vbbe0Qup TClhQeCo4hTZ6ngwveYgeFZhJWiFxT0aJU0G/EZproQVw/jMak3arfWEM5x0Uv1N2zlt p8obwKdW+NZwm9Er/oTENR9OrrpvzySdB8ByoXsvw9tPWM80VekxCyLlAEmkCcpiHdtt RIwnZxMn3BfuCcRFiBw/ALwxjqgWvwOidzPMmsnSOZ0krvwywU+14yKRmy5xDN8PRBB6 N3lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wNkQqP6n; 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 a127-20020a816685000000b002e5bb9dcb28si1888205ywc.433.2022.04.01.08.02.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:02:20 -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=wNkQqP6n; 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]:38978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naIn6-0003wr-Dk for patch@linaro.org; Fri, 01 Apr 2022 11:02:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIlx-0003hB-70 for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:09 -0400 Received: from [2a00:1450:4864:20::42d] (port=39761 helo=mail-wr1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIlv-0005iB-AT for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:08 -0400 Received: by mail-wr1-x42d.google.com with SMTP id j18so4664648wrd.6 for ; Fri, 01 Apr 2022 08:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Z1XQpnTzzax90Lh6sULRJEKvqLBLpmW6JvIqcejUeVw=; b=wNkQqP6naLIT65DWIY2ns+pOgLwMThCwDBD/G+hCmKKItN7pQkyYmPUo5F2oTJe5Gy LrTpAYtjeh8NHletIJISzg8NPIEtV0dGPcxVVklTWRnpTHwtpEWIWGOtAp/1jdHOm3hh 9AOlOrIyBb7AfWdIKaM6yQsmIZdKQ71tidADf5/EGyzPtOFOBxUshGKDM6OHw2hQTTu8 u6xaZrE1XOluOvK+Ea+ZZm67WGaWKPaaDrobZI4D5aQLvRIixcIXv8/mQXVlV/4ITz6R ll/MRqlwe7omqOC3qYRw9thwD13Qop1FtSVN6KHATdqHjhHg1vIcktUjYnZIIEPiGqzL 4caQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z1XQpnTzzax90Lh6sULRJEKvqLBLpmW6JvIqcejUeVw=; b=x/p7vCBeWa2GyKlxMxWtYOkfmgvdJZoryyQIqLNTR88ySmdS/Co2ttUBTeqIf6z5zU ULNSB7lglzGsGjXRZfa0fRUS2O66D1VGPwPdkKmC3nqTjVP96/0jdueAJLfrCvdeaTYp Tk3zQFSP2GPlsxXrfSeoVZn7RJZF07vKJznsU/hq8okLkCdg11vHf6fRNRVw2ryhF1fX Yp1rNqjPlsrOrOy1fg/by2L7goi/KgaHVDADYYd1PlFI8bq7Up0sY2FRlmuVlkWVHkid fPHzj/i8BguW0YtJsdqHedu5ry1nLWRvl9IaRaO5qXFT2Up3GFPS6YEMA8J9ODUXjQg8 2LsQ== X-Gm-Message-State: AOAM533Pv/e0HLNz3yEylrDeyBzB84MuPoWC+j8SUJsnzK2yS7ogLYh5 iKBGx5r0rC5xCmTBC0UrhOQNhTJAoh8xjw== X-Received: by 2002:adf:bb54:0:b0:203:e244:fbe4 with SMTP id x20-20020adfbb54000000b00203e244fbe4mr7980525wrg.313.1648825265908; Fri, 01 Apr 2022 08:01:05 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 5/6] MAINTAINERS: change Fred Konrad's email address Date: Fri, 1 Apr 2022 16:00:54 +0100 Message-Id: <20220401150055.421608-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Frederic Konrad frederic.konrad@adacore.com and konrad@adacore.com will stop working starting 2022-04-01. Use my personal email instead. Signed-off-by: Frederic Konrad Reviewed-by: Fabien Chouteau > Reviewed-by: Philippe Mathieu-Daudé Message-id: 1648643217-15811-1-git-send-email-frederic.konrad@adacore.com Signed-off-by: Peter Maydell --- .mailmap | 3 ++- MAINTAINERS | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 09dcd8c2169..2976a675ea5 100644 --- a/.mailmap +++ b/.mailmap @@ -56,7 +56,8 @@ Alexander Graf Anthony Liguori Anthony Liguori Christian Borntraeger Filip Bozuta -Frederic Konrad +Frederic Konrad +Frederic Konrad Greg Kurz Huacai Chen Huacai Chen diff --git a/MAINTAINERS b/MAINTAINERS index cc364afef73..68142340bd1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1533,7 +1533,7 @@ F: include/hw/rtc/sun4v-rtc.h Leon3 M: Fabien Chouteau -M: KONRAD Frederic +M: Frederic Konrad S: Maintained F: hw/sparc/leon3.c F: hw/*/grlib* From patchwork Fri Apr 1 15:00:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 555578 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1625996mag; Fri, 1 Apr 2022 08:06:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOUkxTLCWVeIXzQb686914DdB4pDQiRiIaFo74pLD/ZZqlNz3KOEDaWgqbPWMRP4+7uK+K X-Received: by 2002:a25:d88:0:b0:633:6bb9:7997 with SMTP id 130-20020a250d88000000b006336bb97997mr9521045ybn.37.1648825616217; Fri, 01 Apr 2022 08:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648825616; cv=none; d=google.com; s=arc-20160816; b=0wiJazyZ/g+SNmgRSNDVmegiN6Fkvrmq6YWdS6MI30LNPO49Av6rad4f6/MRBTJtTd goK88Gc+X3h1DuO1imci1USDviZoj5BH8VdFd0EIF9F/fi7gC5uIyF8+4bxfsYGSpE/l wMStzyTyQgzizu7lPnTaIeQUaiwzmhC0YlefkbaeN29IUcy1dZ2pyKs4hoBYPA0ZdJR1 J9cvFLlN8SrMJx9nhIfxT000Pv/hq1ksc/JEyqulGNi8w6lErKpbCm2irzQaEZ645ai5 BxPzgH1rzIbpvcbjRgtnWxdGKAAtC3u/ggvw/aiI/guGVX/8u5/lDs7BTKkcMqyCKtIM rdzw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=b/IMCq50GJawrmIsXbxL/Y8Mb/df1w5GpM6DR/upW00=; b=sDCd1n5XlF5zaZHPHChfruGJh8Y98ej0DGbPd7/XOzC2NIKW80kjpJWVguu4bNiDK6 X3q6kosB9Y8HIrr8Mxk1FpH+3EjEODdmS1bHlLgMJtlrm7CAEX0Xf4DIr6xIdbKF8bjH vLV2kmbtUySZpgwgPwxN7TBq7P7XOpwE/JF9Re62BAreaQhdampg72Db+U2MKDj3eyCG X+ZZKPR3F9dwC3/efmOx28+UUQKE3oF7RvpIsQNs8zYvWNkko+W8T7+PZiQCayodFQpC tM7L/h84Hgzrf9uOM5RbtU0JI8Po69L2FK5VbObAc/dmzxXITF9E7cVP99EFgorWtNpJ c3eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yQWm6aml; 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 t206-20020a2546d7000000b006339940463csi2301081yba.678.2022.04.01.08.06.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Apr 2022 08:06:56 -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=yQWm6aml; 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]:53544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naIrX-0005XZ-Mz for patch@linaro.org; Fri, 01 Apr 2022 11:06:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naIm0-0003oY-0A for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:12 -0400 Received: from [2a00:1450:4864:20::436] (port=46005 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naIly-0005kV-5l for qemu-devel@nongnu.org; Fri, 01 Apr 2022 11:01:11 -0400 Received: by mail-wr1-x436.google.com with SMTP id w4so4608728wrg.12 for ; Fri, 01 Apr 2022 08:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=b/IMCq50GJawrmIsXbxL/Y8Mb/df1w5GpM6DR/upW00=; b=yQWm6amlY+WqqiA+kXEMXM9YBtHKUQQwvXflGDfdUGwFRICN5ASTyqFu7shRwPcZAf uKjINSakDVKoJ3I7aBLn7k0p/PA4A7RNAXc4/DlBEyyIotoJK9EmMBpKjm689jhbJqVT B7eqH3VonQHU4zAC7oq3vRt3JnQWGrns+LpK0pSQqE53iW9AhG/msOdf/325W5S30GMr eELhdMVCJuNfjDqJin6uzQ6M4mkucroFJ2dmmKXsrn7XLoM8sQp8IC001h+z2SNJrQaF jJjCGvlU6VlpQkE/j9Bs5MuajwDmrCjGBU+7InZ+tjSOLvXXIduqmk+5YWnJ693t9+Mp vVbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b/IMCq50GJawrmIsXbxL/Y8Mb/df1w5GpM6DR/upW00=; b=kPfPGo9cJ+jg1zil5Fb37xr0NxAzZdlHksORAh49rK7R/Ym2kcTs1dVI1tVWRkzgtA GH29iBT6x/Pt7fVCvZ3234fMQWORXJJnxG5Ow6UNhzmMTy3fjWuyx1t4x7vI3egMkN7M +NKaxjQldfHkOp1LsRCYTT69xq2EFBYCPplG9RZHn9KVRMSJ3BNSnkU4LRaI0Qu7s40d f5zFi1In98Tp0NsqEFFek0VOmoFUxq3SpMR8MtGOXZfvWhe8dzh3i04Hl27BH6DUeX4U typAzAIGMlwo1LC0NXyURnkCG+Ha/YlBfbmNIRlSFc1b3or5f9xj0K2QRlF+X+GoqYP/ vEUg== X-Gm-Message-State: AOAM530bpx2kQgArgThhoXyoYlMiPL7Tgjcjmecp17NY+bkSxVgO8iGj 2Yc+YQVWnHu7y8WK9s2I40Lxv6BO+28Y5g== X-Received: by 2002:adf:e604:0:b0:203:d866:f741 with SMTP id p4-20020adfe604000000b00203d866f741mr7962031wrm.391.1648825267143; Fri, 01 Apr 2022 08:01:07 -0700 (PDT) Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 6-20020a05600c020600b0038cbb21fb00sm2084023wmi.39.2022.04.01.08.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Apr 2022 08:01:06 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 6/6] target/arm: Don't use DISAS_NORETURN in STXP !HAVE_CMPXCHG128 codegen Date: Fri, 1 Apr 2022 16:00:55 +0100 Message-Id: <20220401150055.421608-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220401150055.421608-1-peter.maydell@linaro.org> References: <20220401150055.421608-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In gen_store_exclusive(), if the host does not have a cmpxchg128 primitive then we generate bad code for STXP for storing two 64-bit values. We generate a call to the exit_atomic helper, which never returns, and set is_jmp to DISAS_NORETURN. However, this is forgetting that we have already emitted a brcond that jumps over this call for the case where we don't hold the exclusive. The effect is that we don't generate any code to end the TB for the exclusive-not-held execution path, which falls into the "exit with TB_EXIT_REQUESTED" code that gen_tb_end() emits. This then causes an assert at runtime when cpu_loop_exec_tb() sees an EXIT_REQUESTED TB return that wasn't for an interrupt or icount. In particular, you can hit this case when using the clang sanitizers and trying to run the xlnx-versal-virt acceptance test in 'make check-acceptance'. This bug was masked until commit 848126d11e93ff ("meson: move int128 checks from configure") because we used to set CONFIG_CMPXCHG128=1 and avoid the buggy codepath, but after that we do not. Fix the bug by not setting is_jmp. The code after the exit_atomic call up to the fail_label is dead, but TCG is smart enough to eliminate it. We do need to set 'tmp' to some valid value, though (in the same way the exit_atomic-using code in tcg/tcg-op.c does). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/953 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220331150858.96348-1-peter.maydell@linaro.org --- target/arm/translate-a64.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index d1a59fad9c2..9333d7be41a 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -2470,7 +2470,12 @@ static void gen_store_exclusive(DisasContext *s, int rd, int rt, int rt2, } else if (tb_cflags(s->base.tb) & CF_PARALLEL) { if (!HAVE_CMPXCHG128) { gen_helper_exit_atomic(cpu_env); - s->base.is_jmp = DISAS_NORETURN; + /* + * Produce a result so we have a well-formed opcode + * stream when the following (dead) code uses 'tmp'. + * TCG will remove the dead ops for us. + */ + tcg_gen_movi_i64(tmp, 0); } else if (s->be_data == MO_LE) { gen_helper_paired_cmpxchg64_le_parallel(tmp, cpu_env, cpu_exclusive_addr,