From patchwork Mon Dec 7 04:46:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LIU Zhiwei X-Patchwork-Id: 1411874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-sky.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cq9mB3k89z9sW9 for ; Mon, 7 Dec 2020 15:47:52 +1100 (AEDT) Received: from localhost ([::1]:57904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km8RC-0008KI-C1 for incoming@patchwork.ozlabs.org; Sun, 06 Dec 2020 23:47:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Ql-0008K0-8I for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:23 -0500 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qi-00019X-9U for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:23 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.4178294|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.0075722-0.000630961-0.991797; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047203; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=5; RT=5; SR=0; TI=SMTPD_---.J3tRDLu_1607316427; Received: from L-PF1D6DP4-1208.hz.ali.com(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.J3tRDLu_1607316427) by smtp.aliyun-inc.com(10.147.41.199); Mon, 07 Dec 2020 12:47:07 +0800 From: LIU Zhiwei To: qemu-devel@nongnu.org Subject: [PATCH 1/4] target/arm: Fixup special cross page case for sve continuous load/store Date: Mon, 7 Dec 2020 12:46:52 +0800 Message-Id: <20201207044655.2312-2-zhiwei_liu@c-sky.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201207044655.2312-1-zhiwei_liu@c-sky.com> References: <20201207044655.2312-1-zhiwei_liu@c-sky.com> MIME-Version: 1.0 Received-SPF: none client-ip=121.197.200.217; envelope-from=zhiwei_liu@c-sky.com; helo=smtp2200-217.mail.aliyun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: alex.bennee@linaro.org, richard.henderson@linaro.org, LIU Zhiwei , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" If the split element is also the first active element of the vector, mem_off_first[0] should equal to mem_off_split. Signed-off-by: LIU Zhiwei --- target/arm/sve_helper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 5f037c3a8f..91d1d24725 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -4282,9 +4282,10 @@ static bool sve_cont_ldst_pages(SVEContLdSt *info, SVEContFault fault, * to generate faults for the second page. For no-fault, * we have work only if the second page is valid. */ - if (info->mem_off_first[0] < info->mem_off_split) { - nofault = FAULT_FIRST; - have_work = false; + if (info->mem_off_first[0] == info->mem_off_split) { + if (nofault) { + have_work = false; + } } } else { /* From patchwork Mon Dec 7 04:46:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LIU Zhiwei X-Patchwork-Id: 1411873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-sky.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cq9mC4FpJz9sSn for ; Mon, 7 Dec 2020 15:47:55 +1100 (AEDT) Received: from localhost ([::1]:58096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km8RF-0008Qk-AK for incoming@patchwork.ozlabs.org; Sun, 06 Dec 2020 23:47:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qo-0008M6-88 for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:26 -0500 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:36993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qh-00019T-Oh for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:26 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.1042633|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_alarm|0.0144142-0.00270011-0.982886; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047202; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=5; RT=5; SR=0; TI=SMTPD_---.J3tRDLu_1607316427; Received: from L-PF1D6DP4-1208.hz.ali.com(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.J3tRDLu_1607316427) by smtp.aliyun-inc.com(10.147.41.199); Mon, 07 Dec 2020 12:47:08 +0800 From: LIU Zhiwei To: qemu-devel@nongnu.org Subject: [PATCH 2/4] target/arm: Fixup contiguous first-fault and no-fault loads Date: Mon, 7 Dec 2020 12:46:53 +0800 Message-Id: <20201207044655.2312-3-zhiwei_liu@c-sky.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201207044655.2312-1-zhiwei_liu@c-sky.com> References: <20201207044655.2312-1-zhiwei_liu@c-sky.com> MIME-Version: 1.0 Received-SPF: none client-ip=121.197.200.217; envelope-from=zhiwei_liu@c-sky.com; helo=smtp2200-217.mail.aliyun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: alex.bennee@linaro.org, richard.henderson@linaro.org, LIU Zhiwei , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" First-fault or no-fault doesn't mean only access one page. When cross pages, for first-fault, if there is no fault in the first access, the second page should be accessed. And for no-fault, the second page should always be accessed. Signed-off-by: LIU Zhiwei --- target/arm/sve_helper.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 91d1d24725..700a8a7585 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -4916,17 +4916,6 @@ void sve_ldnfff1_r(CPUARMState *env, void *vg, const target_ulong addr, } while (reg_off <= reg_last && (reg_off & 63)); } while (reg_off <= reg_last); - /* - * MemSingleNF is allowed to fail for any reason. We have special - * code above to handle the first element crossing a page boundary. - * As an implementation choice, decline to handle a cross-page element - * in any other position. - */ - reg_off = info.reg_off_split; - if (reg_off >= 0) { - goto do_fault; - } - second_page: reg_off = info.reg_off_first[1]; if (likely(reg_off < 0)) { @@ -4934,6 +4923,30 @@ void sve_ldnfff1_r(CPUARMState *env, void *vg, const target_ulong addr, return; } + mem_off = info.mem_off_first[1]; + reg_last = info.reg_off_last[1]; + host = info.page[1].host; + + do { + uint64_t pg = *(uint64_t *)(vg + (reg_off >> 3)); + do { + if ((pg >> (reg_off & 63)) & 1) { + if (unlikely(flags & TLB_WATCHPOINT) && + (cpu_watchpoint_address_matches + (env_cpu(env), addr + mem_off, 1 << msz) + & BP_MEM_READ)) { + goto do_fault; + } + if (mtedesc && !mte_probe1(env, mtedesc, addr + mem_off)) { + goto do_fault; + } + host_fn(vd, reg_off, host + mem_off); + } + reg_off += 1 << esz; + mem_off += 1 << msz; + } while (reg_off <= reg_last && (reg_off & 63)); + } while (reg_off <= reg_last); + /* * MemSingleNF is allowed to fail for any reason. As an implementation * choice, decline to handle elements on the second page. This should From patchwork Mon Dec 7 04:46:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: LIU Zhiwei X-Patchwork-Id: 1411871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-sky.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cq9mB3gtrz9sW8 for ; Mon, 7 Dec 2020 15:47:52 +1100 (AEDT) Received: from localhost ([::1]:57942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km8RC-0008M7-8x for incoming@patchwork.ozlabs.org; Sun, 06 Dec 2020 23:47:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Ql-0008K7-IR for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:23 -0500 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:32984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qh-00018E-J2 for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:23 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.3647852|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.263026-0.000626056-0.736348; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047204; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=5; RT=5; SR=0; TI=SMTPD_---.J3tRDLu_1607316427; Received: from L-PF1D6DP4-1208.hz.ali.com(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.J3tRDLu_1607316427) by smtp.aliyun-inc.com(10.147.41.199); Mon, 07 Dec 2020 12:47:08 +0800 From: LIU Zhiwei To: qemu-devel@nongnu.org Subject: [PATCH 3/4] target/arm: Fixup SIMD fcmla(by element) in 4H arrangement Date: Mon, 7 Dec 2020 12:46:54 +0800 Message-Id: <20201207044655.2312-4-zhiwei_liu@c-sky.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201207044655.2312-1-zhiwei_liu@c-sky.com> References: <20201207044655.2312-1-zhiwei_liu@c-sky.com> MIME-Version: 1.0 Received-SPF: none client-ip=121.197.200.217; envelope-from=zhiwei_liu@c-sky.com; helo=smtp2200-217.mail.aliyun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: alex.bennee@linaro.org, richard.henderson@linaro.org, LIU Zhiwei , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" For SIMD fcmla(by element), if the number of elements is less than the number of elements within one segment,i.e. 4H arrangement, we should not calculate the entire segment. Signed-off-by: LIU Zhiwei --- target/arm/vec_helper.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/arm/vec_helper.c b/target/arm/vec_helper.c index 7174030377..44b8165323 100644 --- a/target/arm/vec_helper.c +++ b/target/arm/vec_helper.c @@ -544,6 +544,10 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm, neg_real <<= 15; neg_imag <<= 15; + /* Adjust eltspersegment for simd 4H */ + if (eltspersegment > elements) { + eltspersegment = elements; + } for (i = 0; i < elements; i += eltspersegment) { float16 mr = m[H2(i + 2 * index + 0)]; float16 mi = m[H2(i + 2 * index + 1)]; @@ -610,6 +614,10 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm, neg_real <<= 31; neg_imag <<= 31; + /* Adjust eltspersegment for simd 4H */ + if (eltspersegment > elements) { + eltspersegment = elements; + } for (i = 0; i < elements; i += eltspersegment) { float32 mr = m[H4(i + 2 * index + 0)]; float32 mi = m[H4(i + 2 * index + 1)]; From patchwork Mon Dec 7 04:46:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LIU Zhiwei X-Patchwork-Id: 1411877 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=c-sky.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cq9qF2gy7z9sW1 for ; Mon, 7 Dec 2020 15:50:33 +1100 (AEDT) Received: from localhost ([::1]:37896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1km8Tn-0003Ir-7q for incoming@patchwork.ozlabs.org; Sun, 06 Dec 2020 23:50:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qk-0008Jp-Ub for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:22 -0500 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:39142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1km8Qh-00018X-Ph for qemu-devel@nongnu.org; Sun, 06 Dec 2020 23:47:22 -0500 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.07732064|-1; CH=green; DM=|CONTINUE|false|; DS=CONTINUE|ham_system_inform|0.531916-0.000212585-0.467872; FP=0|0|0|0|0|-1|-1|-1; HT=ay29a033018047187; MF=zhiwei_liu@c-sky.com; NM=1; PH=DS; RN=5; RT=5; SR=0; TI=SMTPD_---.J3tRDLu_1607316427; Received: from L-PF1D6DP4-1208.hz.ali.com(mailfrom:zhiwei_liu@c-sky.com fp:SMTPD_---.J3tRDLu_1607316427) by smtp.aliyun-inc.com(10.147.41.199); Mon, 07 Dec 2020 12:47:08 +0800 From: LIU Zhiwei To: qemu-devel@nongnu.org Subject: [PATCH 4/4] target/arm: adjust CPTR_EL2 according to HCR_EL2.E2H Date: Mon, 7 Dec 2020 12:46:55 +0800 Message-Id: <20201207044655.2312-5-zhiwei_liu@c-sky.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20201207044655.2312-1-zhiwei_liu@c-sky.com> References: <20201207044655.2312-1-zhiwei_liu@c-sky.com> MIME-Version: 1.0 Received-SPF: none client-ip=121.197.200.217; envelope-from=zhiwei_liu@c-sky.com; helo=smtp2200-217.mail.aliyun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: alex.bennee@linaro.org, richard.henderson@linaro.org, LIU Zhiwei , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From DDI0487Fc_armv8_arm.pdf, the CPTR_EL2 has two kinds of layouts according to HCR_EL2.E2H. When HCR_EL2.E2H is 1, fp_exception_el should refer to HCR_EL2.FPEN and sve_exception_el should refer to HCR_EL2.ZEN. Reviewed-by: Richard Henderson Signed-off-by: LIU Zhiwei --- target/arm/helper.c | 55 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 38cd35c049..6cc9f2bb50 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6147,11 +6147,30 @@ int sve_exception_el(CPUARMState *env, int el) * they will be zero when EL2 is not present. */ if (el <= 2 && !arm_is_secure_below_el3(env)) { - if (env->cp15.cptr_el[2] & CPTR_TZ) { - return 2; - } - if (env->cp15.cptr_el[2] & CPTR_TFP) { - return 0; + /* Since we exclude secure first, we may read HCR_EL2 directly. */ + if (env->cp15.hcr_el2 & HCR_E2H) { + int zen = extract32(env->cp15.cptr_el[2], 16, 2); + switch (zen) { + case 0: + case 2: + return 2; + case 1: + if (env->cp15.hcr_el2 & HCR_TGE) { + if (el == 0) { + return 2; + } + } + break; + case 3: + break; + } + } else { + if (env->cp15.cptr_el[2] & CPTR_TZ) { + return 2; + } + if (env->cp15.cptr_el[2] & CPTR_TFP) { + return 0; + } } } @@ -12635,12 +12654,30 @@ int fp_exception_el(CPUARMState *env, int cur_el) */ /* CPTR_EL2 : present in v7VE or v8 */ - if (cur_el <= 2 && extract32(env->cp15.cptr_el[2], 10, 1) - && !arm_is_secure_below_el3(env)) { + if ((cur_el <= 2) && !arm_is_secure_below_el3(env)) { /* Trap FP ops at EL2, NS-EL1 or NS-EL0 to EL2 */ - return 2; + if ((arm_hcr_el2_eff(env) & HCR_E2H) == HCR_E2H) { + int fpen = extract32(env->cp15.cptr_el[2], 20, 2); + switch (fpen) { + case 0: + case 2: + return 2; + case 1: + if ((arm_hcr_el2_eff(env) & HCR_TGE) == HCR_TGE) { + if (cur_el == 0) { + return 2; + } + } + break; + case 3: + break; + } + } else { + if (extract32(env->cp15.cptr_el[2], 10, 1)) { + return 2; + } + } } - /* CPTR_EL3 : present in v8 */ if (extract32(env->cp15.cptr_el[3], 10, 1)) { /* Trap all FP ops to EL3 */