From patchwork Tue Aug 25 15:00:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 52679 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 4138C22E8F for ; Tue, 25 Aug 2015 15:03:47 +0000 (UTC) Received: by wijp15 with SMTP id p15sf6949711wij.3 for ; Tue, 25 Aug 2015 08:03:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=U3N2FWxMMQXn+hx3fjvhHnTaT5bFG0cknsWQ60I1Y3I=; b=b5iuJfDDmi2R8GNJ4LSoPhvVgDE/fymaydFXoZrSm8gKwr20/+TLZePYMnQvZW7XsF sslIb7/RhEungy+w1lbWv6Gc5ihZLfHoIVkdI4xa+IbIFDkQ9U3LUAWJMT3FIuCW4L52 9RA10zB7zjqCn0HUTi6sniYYUCb9Xg7Scn74ZQ1mvXrYoohKq4734dAYjt7nappsFP5R DZBXM50I9I2wL+K0RS8166qX1yVjN8j2v5EwujqlrQcy2wQTtHHQRNekdMDX+y+KB2cI A5EDXJm96hJEFrnwWIXRVqXuZAbufmsXWv8T/BVrnydJGgZqysUOTPTHoG7iaAADlp24 IpYQ== X-Gm-Message-State: ALoCoQltwCErO/n5A/DFcZRmgugUQU+ZTI7uDmv2evrxZeldWsweNDooTDWA1gdCfLG3ki8WtBmS X-Received: by 10.112.122.42 with SMTP id lp10mr8542476lbb.5.1440515026571; Tue, 25 Aug 2015 08:03:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.224.130 with SMTP id rc2ls237005lac.34.gmail; Tue, 25 Aug 2015 08:03:46 -0700 (PDT) X-Received: by 10.152.9.37 with SMTP id w5mr25772469laa.43.1440515026288; Tue, 25 Aug 2015 08:03:46 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id 6si16220967lau.49.2015.08.25.08.03.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Aug 2015 08:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labgv11 with SMTP id gv11so32417850lab.2 for ; Tue, 25 Aug 2015 08:03:46 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr25754971lbb.29.1440515025794; Tue, 25 Aug 2015 08:03:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.162.200 with SMTP id yc8csp3239671lbb; Tue, 25 Aug 2015 08:03:44 -0700 (PDT) X-Received: by 10.60.42.197 with SMTP id q5mr26518418oel.52.1440515024068; Tue, 25 Aug 2015 08:03:44 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id l5si33938163qgf.22.2015.08.25.08.03.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Aug 2015 08:03:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFlH-0006PZ-6f for patch@linaro.org; Tue, 25 Aug 2015 11:03:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFi9-0001jy-JA for qemu-devel@nongnu.org; Tue, 25 Aug 2015 11:00:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUFi8-0001Xc-Q1 for qemu-devel@nongnu.org; Tue, 25 Aug 2015 11:00:29 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUFi8-0001NR-Fu for qemu-devel@nongnu.org; Tue, 25 Aug 2015 11:00:28 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZUFhx-0004KO-AH for qemu-devel@nongnu.org; Tue, 25 Aug 2015 16:00:17 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 25 Aug 2015 16:00:06 +0100 Message-Id: <1440514816-16562-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1440514816-16562-1-git-send-email-peter.maydell@linaro.org> References: <1440514816-16562-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 10/20] target-arm: Add CP_ACCESS_TRAP_UNCATEGORIZED_EL2, 3 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Some coprocessor register access functions need to be able to report "trap to EL3 with an 'uncategorized' syndrome"; add the necessary CPAccessResult enum and handling for it. I don't currently know of any registers that need to trap to EL2 with the 'uncategorized' syndrome, but adding the _EL2 enum as well is trivial and fills in what would otherwise be an odd gap in the handling. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Message-id: 1437751263-21913-4-git-send-email-peter.maydell@linaro.org --- target-arm/cpu.h | 3 +++ target-arm/op_helper.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 2e680da..31825d3 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -1284,6 +1284,9 @@ typedef enum CPAccessResult { /* As CP_ACCESS_TRAP, but for traps directly to EL2 or EL3 */ CP_ACCESS_TRAP_EL2 = 3, CP_ACCESS_TRAP_EL3 = 4, + /* As CP_ACCESS_UNCATEGORIZED, but for traps directly to EL2 or EL3 */ + CP_ACCESS_TRAP_UNCATEGORIZED_EL2 = 5, + CP_ACCESS_TRAP_UNCATEGORIZED_EL3 = 6, } CPAccessResult; /* Access functions for coprocessor registers. These cannot fail and diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 663c05d..1425a1d 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -444,6 +444,14 @@ void HELPER(access_check_cp_reg)(CPUARMState *env, void *rip, uint32_t syndrome) target_el = exception_target_el(env); syndrome = syn_uncategorized(); break; + case CP_ACCESS_TRAP_UNCATEGORIZED_EL2: + target_el = 2; + syndrome = syn_uncategorized(); + break; + case CP_ACCESS_TRAP_UNCATEGORIZED_EL3: + target_el = 3; + syndrome = syn_uncategorized(); + break; default: g_assert_not_reached(); }