From patchwork Wed Jan 27 22:16:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 8144871 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1BAB3BEEE5 for ; Wed, 27 Jan 2016 22:18:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6FC012024C for ; Wed, 27 Jan 2016 22:18:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C330620212 for ; Wed, 27 Jan 2016 22:18:31 +0000 (UTC) Received: from localhost ([::1]:52845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYQ3-00040L-1S for patchwork-qemu-devel@patchwork.kernel.org; Wed, 27 Jan 2016 17:18:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYOZ-0000w2-AD for qemu-devel@nongnu.org; Wed, 27 Jan 2016 17:17:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOYOY-0007Mt-4g for qemu-devel@nongnu.org; Wed, 27 Jan 2016 17:16:58 -0500 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]:36292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOYOX-0007Mn-Tb; Wed, 27 Jan 2016 17:16:58 -0500 Received: by mail-pa0-x244.google.com with SMTP id a20so970455pag.3; Wed, 27 Jan 2016 14:16:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Doe2NGNYFcN1Qoqb466EaCltjfjvKL9a08EFtGY9V80=; b=Jp4Mw5qvVYaVsxtK7QMnfACaQ2/OhPJ73ZF7LmB5R2PLEHECSOfknB+RwGCVI9udRx xno+lU3UAbj6Vwi0L6XzOMOjG41Mk1RpyFQilgnQxsO2Z0I4I3stH7KDOQU/cm3V92Eo q+AV1uW3KJNJ/kalYcfBCyFDGoPZ3GA4oJldDO2xHcEne3p6pb43c91JiO/f63DlJUwR kGGhbgnSbvK6mq/m1hJfhmvZNvYzvKrIJWFu3b0oAiv5wQH/a0AZu3niv5yIlgwopZqs MVu+TgnyLGW9CqjT3eJXKaG6kH91FiF6nH/SfvzwnkvXIu96GdeTKzymX1kpOeTOFp9y cc1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Doe2NGNYFcN1Qoqb466EaCltjfjvKL9a08EFtGY9V80=; b=PferBcjIN215elm8offoiAwN8+Lp1D2CZwAp91bQ2eViTG6uVkUyk5GwGO360IQ17W AUbiLCR0qwMyleWqikAyApGMoXgnlqUNvdRphn2zSRlaOjautJ3CW1MEWxlSxzpEu/s1 2Q8ibuJTko2WuB2ndOSHZ1C7jJhsGD7t+zmsCtCDUiuoJm4iq9hWPU6gPAND05q1davy a5wxD++l0dKE1SL+cPZRdT++AKOUk/al4jSMiTwtXbEhXumMvWYHQeflvTM7aAab7a/q GIGNzFp3hoRLqp7Xx7q+ah5nYIeKGzGuDJLCGVLRPEmKBaVCh16niHdF1s7AUTsv/Ggc VKzA== X-Gm-Message-State: AG10YOT0qjGjZy305ZCc3o4cUPdVWQqA5fuJWwvj2dCc9lAKQ0dqln9OudxZxCt6xx6yag== X-Received: by 10.66.90.166 with SMTP id bx6mr46595299pab.75.1453933017279; Wed, 27 Jan 2016 14:16:57 -0800 (PST) Received: from localhost (ec2-52-8-89-49.us-west-1.compute.amazonaws.com. [52.8.89.49]) by smtp.gmail.com with ESMTPSA id lq10sm11249096pab.36.2016.01.27.14.16.55 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 27 Jan 2016 14:16:56 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Wed, 27 Jan 2016 23:16:09 +0100 Message-Id: <1453932970-14576-3-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453932970-14576-1-git-send-email-edgar.iglesias@gmail.com> References: <1453932970-14576-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::244 Cc: edgar.iglesias@xilinx.com, qemu-arm@nongnu.org, alex.bennee@linaro.org Subject: [Qemu-devel] [PATCH v4 2/3] target-arm: Rename check_s2_startlevel to check_s2_mmu_setup 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Rename check_s2_startlevel to check_s2_mmu_setup in preparation for additional checks. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée --- target-arm/helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 5d6f297..13e9933 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -6763,17 +6763,18 @@ typedef enum { } MMUFaultType; /* - * check_s2_startlevel + * check_s2_mmu_setup * @cpu: ARMCPU * @is_aa64: True if the translation regime is in AArch64 state * @startlevel: Suggested starting level * @inputsize: Bitsize of IPAs * @stride: Page-table stride (See the ARM ARM) * - * Returns true if the suggested starting level is OK and false otherwise. + * Returns true if the suggested S2 translation parameters are OK and + * false otherwise. */ -static bool check_s2_startlevel(ARMCPU *cpu, bool is_aa64, int level, - int inputsize, int stride) +static bool check_s2_mmu_setup(ARMCPU *cpu, bool is_aa64, int level, + int inputsize, int stride) { const int grainsize = stride + 3; int startsizecheck; @@ -7013,8 +7014,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, target_ulong address, } /* Check that the starting level is valid. */ - ok = check_s2_startlevel(cpu, va_size == 64, level, - inputsize, stride); + ok = check_s2_mmu_setup(cpu, va_size == 64, level, inputsize, stride); if (!ok) { /* AArch64 reports these as level 0 faults. * AArch32 reports these as level 1 faults.