From patchwork Sat Aug 3 18:47:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 170504 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp2348990ile; Sat, 3 Aug 2019 12:01:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqI48YhYnd6j+XJ0hMn7CNZOWS9O9IpQRM2/iTKn/5xPW/gW9XUN+0g83Xy/XAFaICh5sG X-Received: by 2002:a37:be85:: with SMTP id o127mr96805176qkf.194.1564858873962; Sat, 03 Aug 2019 12:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564858873; cv=none; d=google.com; s=arc-20160816; b=oWSjdjBq2bG0H3QTzKzs/F7/KG9uZ2/DMTVYcTGGufHos38prJ4UDnzUvPOXWc2174 6z1JWaqwuaGKea4qSzyckOJGNj1h2ovH8qUVsZ6aM0JpZqKHYCT6fMhSYmiBnlkbfe52 j3qrv8VVh/uSb0+49Oy/E3KbTxCR74O4jBPcTw1KBQUBHdbVjhg2jJA44Kd2uZmxyza8 9ZRI0W1V5ePPJRvHNXIJptOdQaiUe2orH2tbcjWdbuSd8hv6NaYRx+iBxkcYXUf5eZwJ 0sw1hY5A4vqimViaFho8Z0fsdrYby9Td/+YVaNfD+CnXCd7AUYJ0XZXRVXnfNrs8/DN9 JELQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=4Ze85vH/aQjxlcuWsjYuHifd5A5xyc14ioC1rkP0Yto=; b=u2Wtq6Qh50luH7LAGj+CjE6iMS40hKWyVx6nDSWBCK/I/rXsYfeIm1CNLWrSYH9ULQ CeOc5Y9UPg+t/o4r/zMvHdpl856PaEOsBlYG5nmENzmfmtuFpvycCM1FVtn6X7cISRs5 /7r+dTKcJYb9Xoku8tgiPAl7LmxvucHfCdlvghfv2osTI5mnvClvGy2hc8UP1dkR+1mP taBr1HtbM01iygLqfs8yAaaLRB4ZqlfBHQtfnJca2T57BUctDkuznodNTpok2ekuKEQ/ HTX7ibUKMXquE38eox8TF1JR044AcvPik6EednPmU+ImjCYQjQwcOulal0qazuuej6eq SPZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="B/K5WUnn"; 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 o11si18058766qvf.31.2019.08.03.12.01.13 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Aug 2019 12:01:13 -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=fail header.i=@linaro.org header.s=google header.b="B/K5WUnn"; 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]:41602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htzHF-0000fT-Jf for patch@linaro.org; Sat, 03 Aug 2019 15:01:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33003) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htz5D-0006vn-Hg for qemu-devel@nongnu.org; Sat, 03 Aug 2019 14:48:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htz5B-0007SF-KW for qemu-devel@nongnu.org; Sat, 03 Aug 2019 14:48:47 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:39906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htz59-0007Oy-L3 for qemu-devel@nongnu.org; Sat, 03 Aug 2019 14:48:44 -0400 Received: by mail-pl1-x643.google.com with SMTP id b7so34933483pls.6 for ; Sat, 03 Aug 2019 11:48:38 -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=4Ze85vH/aQjxlcuWsjYuHifd5A5xyc14ioC1rkP0Yto=; b=B/K5WUnnGiy111NPTwOaiQW0NtyN9hpfo4MH+vcSVcsOM/2oss8u0hV3oRVIh0AYHT Q9X/yodCD/1/kDno63G/LcVovJJW9iHlyBX9ihwk5aeRS+mLvzxOt6LWUnYKffOMdALc 8kQ9ZcY0bj3js5usQnd1daxvaGay8B7k6IRXr0W24a8TIsrx9bnj3IwL5yBIa2aCyuKT J1HSY9fImd3SmYU/7JQN3uWubz7I6BH++g0KihvBQT7bQEx2AAeNwOLZzSRTVLUjF3w0 L+JnCj9eer4GkI2V/tXWBV8W+bIl6bil4kr89MYOhpuVVxpEKi+uHWL4KIYumKvxoUev 468Q== 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=4Ze85vH/aQjxlcuWsjYuHifd5A5xyc14ioC1rkP0Yto=; b=g6Zf4BnZZTBWgxvrFkT1L7+5p2agrZpz+PBFnzYsN7fx/nlSbhmLjxrvv5zod47NsD GeWABKE/IAGPXgGi6KaATv3VJnnwzxFsq6fegrUc5LPqc+tC6banbWtAhXSQWZNYVXmk kwd8/f3G0FuvIRRx4S7q2WHJZqDNqT8h6zWfQm9/OxbDU0vKCMw6tk4Bs9rrOtwpqtD3 rEcsgRdd9lZX5o1gPs8HJsXyEf1GpkN58NR5+ZWxX4uoFJDBUFD44lLEb2O0h/MHCn+1 hVDVHffC4chKvxDpNn2f4QXCdajaK/NiucYl/exPk2dRe6t/Z/PLAp3evVURBiKf4PbM FwvA== X-Gm-Message-State: APjAAAUziHgcxg8h0nmbDwy+bS5pXoHeZBauvWiFksE0dipChpa0iUoE 18SuS8LpiJgtVVP5E8ZKtD3ioUJZIS8= X-Received: by 2002:a17:902:9041:: with SMTP id w1mr23791104plz.132.1564858117384; Sat, 03 Aug 2019 11:48:37 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id q69sm15405454pjb.0.2019.08.03.11.48.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 03 Aug 2019 11:48:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 3 Aug 2019 11:47:55 -0700 Message-Id: <20190803184800.8221-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190803184800.8221-1-richard.henderson@linaro.org> References: <20190803184800.8221-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 Subject: [Qemu-devel] [PATCH v3 29/34] 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, qemu-arm@nongnu.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 diff --git a/target/arm/helper.c b/target/arm/helper.c index 984a441cc4..a0969b78bf 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7968,6 +7968,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];