From patchwork Tue Dec 3 02:29:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 180693 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp956971ile; Mon, 2 Dec 2019 18:58:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzr/Xx0HOoywuqIeh6ALbnw2gKSM3l+I98Gqn8lT72nVSB2ErEWIWilcXhvdQOlV8DgoB5K X-Received: by 2002:a05:6214:1711:: with SMTP id db17mr2941595qvb.199.1575341926250; Mon, 02 Dec 2019 18:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575341926; cv=none; d=google.com; s=arc-20160816; b=ZjTXnpLuuw7W2kW5Bi3uMTmd4tjsN5PPN0NJT/sHgF+iVtwFwDQzOTLhPcPWXd/ai3 UHTyPvxod8uK8pMPFOUN73m8qwI6L2dgj2EZiH6IpBli5T3vxpVVg4Y0964wHcNxf9q0 IeJ/JyQpe87EITCJmLI+i8i1V3rRwJix+BCH9V1dtrrtjqISzEZOjcMS98CtLmkTvSY8 sYMVfkngrCJDpEyqxgETnqe6urRRHHXAhA5cM+5fmZzqllN7nhFuLat9M3tFym+pgNkS KDvd8xP+zC+n+ZMYB1KTO9g/UAWMFZg0UQy0Xk4xaiHlsRSPGs9al4WBhPOjhczP1sO0 4tqQ== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=IK7rSI06S6h9YUMM4pqvJuR/qhJRw6SERUwBa547XN0=; b=U+YX+hDv2uwvTr4aBt25V8TFLhVMcpiqTCB6GXIK4pbySaRsAQHUnN5nfWWeR0duR+ Mzzzo5ND0KbtmvaGQgG5M67sSpc9mqATSMpMXpaPmEI0z0kBiN3gNsGPNhV7gdmkg3Ze AQMmmpROuXZ9xFHnk+Y/g3MVbsK3Cu6AB408kEyAWF9r2BJ5lq8ILpbH/8pi/14PsEYr T0NMe1GjdG28Dl7K9T+oOD1p1gJq7F813XBHpau+qlZT98Bv0O5hoe1jI601wezcy6dg KHqbME8NQYQcnb4aZuvUrKAWh+CN1Tyn4A6xvOntq9gR+TR/kMBCywLORSz7pC/YRfD4 69eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="QSu/J7st"; 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 k4si1187168qvh.185.2019.12.02.18.58.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 02 Dec 2019 18:58:46 -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="QSu/J7st"; 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]:47634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibyOj-0005H4-Hr for patch@linaro.org; Mon, 02 Dec 2019 21:58:45 -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) 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-Received: by 2002:a17:902:9a96:: with SMTP id w22mr2679175plp.124.1575340218750; Mon, 02 Dec 2019 18:30:18 -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) 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The TGE bit routes all asynchronous exceptions to EL2. Signed-off-by: Richard Henderson --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 Reviewed-by: Peter Maydell 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, uint32_t excp_idx, break; }; + /* + * For these purposes, TGE and AMO/IMO/FMO both force the + * interrupt to EL2. Fold TGE into the bit extracted above. + */ + hcr |= (hcr_el2 & HCR_TGE) != 0; + /* Perform a table-lookup for the target EL given the current state */ target_el = target_el_table[is64][scr][rw][hcr][secure][cur_el];