From nobody Thu Nov 13 00:33:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1575341878; cv=none; d=zohomail.com; s=zohoarc; b=CEsUyKjUxHSINRGh36Mol0vHs17vPPCRJIMacyPtK/xKn20gykmsZmsJ6Art+yYGy1j38CqC4q7B9wOG4gpToGO7C+PP1//XKQXsvlN8SMTujpiN/2Vf9e5/jSDEbwmG9vgPyAS76yEYsm71cNYkSxn2kQrFLyUyOBdwcaL9z7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575341878; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=IK7rSI06S6h9YUMM4pqvJuR/qhJRw6SERUwBa547XN0=; b=ROYr1L604rUYNUwEm5AzbolOW8on7bzCh/UwEnSC8f7Ak0q+wie53+TZ4AqUuQj0aZOt/6Zaprvqd6LgvNqEXbhdx8yXI6cLqBHjwbrPWz9AVGfjAXx0BbycC9ncVEW6XDy429KAJwDJsMoktHFbR+pHbsG9SvL3HBL1xezvtjo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1575341878501336.95509945413914; Mon, 2 Dec 2019 18:57:58 -0800 (PST) Received: from localhost ([::1]:47610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibyNw-0003UO-GZ for importer@patchew.org; Mon, 02 Dec 2019 21:57:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:32922) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibxxK-0003NQ-I9 for qemu-devel@nongnu.org; Mon, 02 Dec 2019 21:30:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibxxI-0000BF-S1 for qemu-devel@nongnu.org; Mon, 02 Dec 2019 21:30:25 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:41092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibxxF-00006g-VH for qemu-devel@nongnu.org; Mon, 02 Dec 2019 21:30:23 -0500 Received: by mail-pl1-x643.google.com with SMTP id bd4so1001765plb.8 for ; Mon, 02 Dec 2019 18:30:20 -0800 (PST) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id q22sm873695pfg.170.2019.12.02.18.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 18:30:17 -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:in-reply-to:references; bh=IK7rSI06S6h9YUMM4pqvJuR/qhJRw6SERUwBa547XN0=; b=QSu/J7steepWES5yflZElUbSs4dYALg07BxZKiUyqwzF8ZRJhwcsSiLhpMBpGtFFjE SFzjvMIyX6dUH6dGG6nLRadIwHxUH4nwjSgSJ4kO7NPV/APNgbFRZLYqkuzfRgV70N8H n50KZeRXtjCQtnPb+i5FfdHt78/jqKbaeX3DSyy1Nc2QEl3H6p6K/fJYVIhzB+2yd6FM CEXaFjodHuDCt+MKs78o8TzSGMQzHo/fAAf4yL18KoQ1w1fsbR4Ukbktwh9zH5sWePie e0J8AZ+uhgBjZK3LKD0EBks/gBCy45Z/PaTBLV6H2X9F6yvPe/ZKbJC/YY+PIq/zzGQI MkTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IK7rSI06S6h9YUMM4pqvJuR/qhJRw6SERUwBa547XN0=; b=DSMBWJjVQwW5lIehdDhmhLYZjCRLPOPf8Mu7P6P0cq96Cj4f6KcvRHs36OsWttjp9L PCM31ihEFKEfz1qSqGC9gPkXzklseGzvLP+RJAYovXJhBiDUpEwq97/de/iN06ox9Wgo bZTmp/q9D1mwiE6sxLiqhU9Q5UWs9KO6KebvFnlRgPj1t3gc/tQ10V1eJea2Da2xzNm2 7tw6UH8xZaSR6Pt1Z7rOiDYIwxxmJpf7d5tfaBQ6xVszYy+CpJGR0Cy8Qar0N8Lwz/PU N71HFjFYnsPQ9sa1dTikLrAgxe/5BpeW2VBPZm+ODOZEgtegNBDfIo0RWqY6ncOgL9Ba HbsA== X-Gm-Message-State: APjAAAWGsu+kMj9WXOEk4crg2NtJmxkPNblsAWRX7MngTl58AI0KTn8k M6SRRdRqbAjoWCvnuCpj8ufZmk81NVQ= X-Google-Smtp-Source: APXvYqxOz+Ih3oil3MtBE6RBbtUrjSr+FGT07F93ko1pnjgEq9cvsgF1EbmWxKQkiTt8xN6nNzlpsw== X-Received: by 2002:a17:902:9a96:: with SMTP id w22mr2679175plp.124.1575340218750; Mon, 02 Dec 2019 18:30:18 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 31/40] target/arm: Update arm_phys_excp_target_el for TGE Date: Mon, 2 Dec 2019 18:29:28 -0800 Message-Id: <20191203022937.1474-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191203022937.1474-1-richard.henderson@linaro.org> References: <20191203022937.1474-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The TGE bit routes all asynchronous exceptions to EL2. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index b059d9f81a..e0b8c81c5f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8316,6 +8316,12 @@ uint32_t arm_phys_excp_target_el(CPUState *cs, uint3= 2_t excp_idx, break; }; =20 + /* + * For these purposes, TGE and AMO/IMO/FMO both force the + * interrupt to EL2. Fold TGE into the bit extracted above. + */ + hcr |=3D (hcr_el2 & HCR_TGE) !=3D 0; + /* Perform a table-lookup for the target EL given the current state */ target_el =3D target_el_table[is64][scr][rw][hcr][secure][cur_el]; =20 --=20 2.17.1