From patchwork Wed Jul 31 20:38:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 170259 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp4477318ile; Wed, 31 Jul 2019 13:47:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5iAOH6HK5hAndHFHmkK9el1aJTr/rtmnWZ/XGAP4P/ENzpt2ACuomOHb5iL5XegJmlyx2 X-Received: by 2002:a17:906:4911:: with SMTP id b17mr94072779ejq.158.1564606022204; Wed, 31 Jul 2019 13:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564606022; cv=none; d=google.com; s=arc-20160816; b=maVXElohkHt6n3MB4FSdeTyhLPwPrRzP9uBonW9JFS9QPRHHQpwejcNMF6WihbrLel slatV6alcDYo3332lprAZ3LPgT9nbrzeozSChVi3GCeKohUfRWCUcFx1ZOELz4AeDz0t V+tvW+QaByCEN1q35LbKYt8rtUK/0BKavHEvUrarxtOZ2S86r4GiM0mjKoLsenORu9Jz 95hcW8wHvd0RIIV0n5fmam1/U9oc1bTkoYKqdUwn9eqQOl6X/iM6yRL/uUI/lGmNamte 2uzVP8+KpqLYM47mLCXm29xEu1YN7F0yBPc7swjWyOXjbf/GEqUO526NsSublZV2XvyX g0iA== 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=z5x3XqHQzkXZQb+8jCB+i1sKV2y2i8Y/ULFiYsKcHrY=; b=VjYAL5hx44CGfuCx3F+Ayhgye8R+/pxX63X8qFoYKVXnG32Sel5UUV+YPifyvMVzc4 zxQSrQqJ5B90rJZowsity3lTo1325srs0emltAAW1RUEktqyCZOeuAmKAwUCb10aw1gx evm2bL0CEBT3758oLwwSBmE25d2XZfKY7X/oF/8sqhXl8MhY0UyQ7h7ajNTPxqHCEWwU VTX+aUKXT+lFA9/9Muz7nuy6QEDf1cczE7Ij6N3yWoOx8WQKTZi2ZVScnUkwUu9gTDyH RlWQibz6EYKyh3OPQMoULBgdOKz5D7RzE01slzCWM88nC1+HxDPt6wBYazIHug1IsaPn 16yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=unuLZm42; 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 gu18si19090834ejb.19.2019.07.31.13.47.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jul 2019 13:47:02 -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=unuLZm42; 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]:44390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvUz-00068W-62 for patch@linaro.org; Wed, 31 Jul 2019 16:47:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33125) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsvN7-0005UU-Sp for qemu-devel@nongnu.org; Wed, 31 Jul 2019 16:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsvN6-0003mV-UY for qemu-devel@nongnu.org; Wed, 31 Jul 2019 16:38:53 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:39326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hsvN5-0003ju-4y for qemu-devel@nongnu.org; Wed, 31 Jul 2019 16:38:51 -0400 Received: by mail-pf1-x444.google.com with SMTP id f17so28520722pfn.6 for ; Wed, 31 Jul 2019 13:38:49 -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=z5x3XqHQzkXZQb+8jCB+i1sKV2y2i8Y/ULFiYsKcHrY=; b=unuLZm42rCfAS60ozJ8safaC8nD5g8e6LVR3KeYDg1q53pmRe0lkVvvNHy+0ERYAcr 90sHJtzbhPU/PZeOJo6qqDShpBl+p8/30jic2Or34llqjfrj3godzX2M2OjfB1u0V2pY oCWfgFcJ6S22TBgXB/aPpe4m7Py+bf18Mi/IJNsteMgY+NveKvhnK2O0IDQlZirmys2B qwpYtL+JEumSF9rCTv6wkKAQiG0wPxLWPO3cs9aqw3n6IGlL7dbKdR9UfIQiWbx8T4r3 p0EnhK8Ws5jBfxeOuzSB/nGPuue8PQzOlti58271GPmD0KdMIuaNsu09sutaU4oa/W6G WICw== 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=z5x3XqHQzkXZQb+8jCB+i1sKV2y2i8Y/ULFiYsKcHrY=; b=ILTe957sGxq33m6F3FWFfCMrTuRWoYeu3100DetPOPI87NZOKB6FTtgboMkZmGsC/T LOUwZTGZCiCQFUFSBwqYDz0LCNIJaqYC36lG2b5xVfuivDPmtpjGPoRMyipTzetIhS2h koegOJwo3lOrg89vsNrk1Ygu2cRBf7/6sS/wYllOJUvljcRKVdr01GvJ1hNpvP9G5qGx ABPopDlPf8321mwVEzt8vPV/59a19aUZuQoUfvegyTum2qyEhxAbNzOGnJdZ6djnIauZ jrf6XrDnKKT2j9K3nYnToK8w22rBmqb2ikE6Zk6ULjjJ1Khfay2umvuhzvxrhx3bJwTz HQ5g== X-Gm-Message-State: APjAAAUQkfGw3Za3hVA3vq1QVo4IlGY9mCaSjETSkJ1HszbZhmaALIN1 bEZ3tfk7UOlYZJSotUDKpgEbH9Mt6l8= X-Received: by 2002:a17:90a:b011:: with SMTP id x17mr4737759pjq.113.1564605528486; Wed, 31 Jul 2019 13:38:48 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id g4sm84054164pfo.93.2019.07.31.13.38.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 13:38:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 31 Jul 2019 13:38:08 -0700 Message-Id: <20190731203813.30765-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190731203813.30765-1-richard.henderson@linaro.org> References: <20190731203813.30765-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::444 Subject: [Qemu-devel] [PATCH v2 27/32] 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 b9f0d387f4..c6b40a12b4 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7936,6 +7936,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];