From nobody Fri Dec 19 06:57:14 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=1563572322; cv=none; d=zoho.com; s=zohoarc; b=gHx9337LZmdHHixIgA91ljjXnwrA8fHJksPsmXXeIYn16D8/rkzURK3MlvJ/sqc7rxEEjJeSfHVXnmcjIZcmILmmoo/upL8LpmP0a5tRF479hpJ5W+LsASNVGukeQqu0X1TSBGmcmcQgM/jMxZDD4hLMwbfjtHTQTUe85zXhovY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563572322; 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:ARC-Authentication-Results; bh=sn9Ip3IXKGmzCPWyVRHRq/o5V+1VMHe6ik0L3AXMc28=; b=mLilDOIIU31HeQDEiyQ3fzXHODcGf3dOivuuU0m1A5AXLE+DVthdgmMwvbKWC1abFIQCveIafvIOnkznTzYi6HR7k4nXtevAF/QQQYHrxtbSpDvVTFIpErLEVAAf+ImOdg1I/IHqzNNDq5SBPD8ioRwldFSvbp7Hqm4X1IpijU8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1563572322381334.42908454027054; Fri, 19 Jul 2019 14:38:42 -0700 (PDT) Received: from localhost ([::1]:48228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoa5C-0006kH-77 for importer@patchew.org; Fri, 19 Jul 2019 17:06:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55189) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoa3Z-000870-NB for qemu-devel@nongnu.org; Fri, 19 Jul 2019 17:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoa3X-0005YT-2u for qemu-devel@nongnu.org; Fri, 19 Jul 2019 17:04:44 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:39192) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoa3W-0005DB-G7 for qemu-devel@nongnu.org; Fri, 19 Jul 2019 17:04:42 -0400 Received: by mail-pl1-x642.google.com with SMTP id b7so16204229pls.6 for ; Fri, 19 Jul 2019 14:03:54 -0700 (PDT) Received: from localhost.localdomain (97-126-117-207.tukw.qwest.net. [97.126.117.207]) by smtp.gmail.com with ESMTPSA id i6sm32724751pgi.40.2019.07.19.14.03.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 19 Jul 2019 14:03:53 -0700 (PDT) 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=sn9Ip3IXKGmzCPWyVRHRq/o5V+1VMHe6ik0L3AXMc28=; b=uFA8zQGhSTwGMg7PII9iiLXTN43TWAE95Rw2+bSEMD9D/MX3GIB1dDWh+aKmKYY8b1 DbsWFyHheHkc6RbuLioyCBSc9PokGeajGUStrL+KU3E/zyAp5/q6BA9IIrjwcZFeWxF2 0JxrM5vWEWyBnx5dAc2ulTmzeXfB/hFjaVYtjaLYEX9wiU3FanOuyuqq6HjGe0On+vu1 eiz3jS7U7Bv+cRVpcTcW1RaRR+m9nuPAVf7ZRs4+QBcfGidyqLY5wzC3ytKwTspdtSW+ R4xrB1+UpoOsELhUdnAn2Bq8plZpvK5FqRNaZjmuIy3V9eu7flK2bsOz2eu4/8vCZjED gamg== 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=sn9Ip3IXKGmzCPWyVRHRq/o5V+1VMHe6ik0L3AXMc28=; b=B+NCGoz9LyFu5JFFh1xj66ZoYMvWxkfoEP8uAwls9RM4UeDy7TcfJB9Z/zupOKylYR HCBNglHnz5wD0MgsDsi1SkbxNCNrpFC40OOVCnkGyDk3bII/GU+yXSKiiuNxGbQMejhN 0C6ntXzHgzINrocE+Sdv0N+GLB/Bz8Bb6EYzHBM96pugfVrx0wpk2l+U20I9darz8qj0 t80CJaj86SMLPCWU47Pc5JwkQmTl4i4iIAeNlZpam/JTHszVEWwC++l4qfnrZXxuoAhj UB6b2zFNGUZDpIfYJTZDflpi7U6Pe73TXm+svsGZ1WeH0rrYlBOiapMADmof0c7VDcij osKg== X-Gm-Message-State: APjAAAXXWRmuR6ZMxwXp6XafuAf+Q9etCw0hMbWk/2rUVowmTjgxe4Sp es9S6mFOaLd+tjN7IurRctk3c/3bNNg= X-Google-Smtp-Source: APXvYqwCvDgLMsZ5ZWK29wEI4AVN3cAAZeEpGt34VrsAtCioOZ08KAcukZRaer3TLM3P0Kw5v2W4rA== X-Received: by 2002:a17:902:9004:: with SMTP id a4mr59351948plp.109.1563570233620; Fri, 19 Jul 2019 14:03:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 19 Jul 2019 14:03:23 -0700 Message-Id: <20190719210326.15466-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190719210326.15466-1-richard.henderson@linaro.org> References: <20190719210326.15466-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::642 Subject: [Qemu-devel] [PATCH for-4.2 21/24] target/arm: Update arm_phys_excp_target_el for TGE 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, beata.michalska@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 --- target/arm/helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index fe022f51d6..f06e7bcd77 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7928,6 +7928,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