From patchwork Fri Aug 7 12:33:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 52041 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 73A6322EAD for ; Fri, 7 Aug 2015 12:33:42 +0000 (UTC) Received: by wicul11 with SMTP id ul11sf17376754wic.1 for ; Fri, 07 Aug 2015 05:33:41 -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:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=u/rQPWh94Vy07AHUOlANqpICqPEaN/8hecOx4jZLRXM=; b=OrXjLw5mF9lZCZOVT2zBrXZU+qIr47K6PLb9PsvPwmO+9wFSJV6Y4TPkbPAcFAva3b ZnD0CFxYoV112eZHn6NWo3hQHqV9BWdFHA3qQTJcEQfp6nFDcM/tjTmjYFaQGWAgrVE0 DQAU+BoXyc3jHIl8EyYKQJMy/EQs0sjz04mvpCL0ttLAHvg0FJKtAPdkzuHwCZRhXdG3 dQgs5XlQKeC/tEh+stelhCsOnfKkfqIctmFN1IpeZvMkwdmQKQhAGqXavi3vLmb4Mvov Tmz+LzrbM9FV85EQuUNRUt1WB0S2zjMx+hH1y6kjL9uBrc6fSRRlibUmu3pokFEU0K0c nDbg== X-Gm-Message-State: ALoCoQlfphiHDjvHgEB3ZNr79NaSLxm1T7l5TiciDAB6Pj324GOQBzK0RFetfT8Docqcv6dU6YZn X-Received: by 10.194.188.104 with SMTP id fz8mr2083342wjc.1.1438950821751; Fri, 07 Aug 2015 05:33:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.137 with SMTP id w9ls427900lad.102.gmail; Fri, 07 Aug 2015 05:33:41 -0700 (PDT) X-Received: by 10.112.24.195 with SMTP id w3mr7402841lbf.58.1438950821461; Fri, 07 Aug 2015 05:33:41 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id ai2si881302lbc.68.2015.08.07.05.33.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Aug 2015 05:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbpu9 with SMTP id pu9so32602327lbb.3 for ; Fri, 07 Aug 2015 05:33:41 -0700 (PDT) X-Received: by 10.112.140.68 with SMTP id re4mr7212783lbb.72.1438950821239; Fri, 07 Aug 2015 05:33:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.7.198 with SMTP id l6csp347922lba; Fri, 7 Aug 2015 05:33:40 -0700 (PDT) X-Received: by 10.66.185.72 with SMTP id fa8mr14345667pac.44.1438950817692; Fri, 07 Aug 2015 05:33:37 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ot5si17182973pbc.241.2015.08.07.05.33.36 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Aug 2015 05:33:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZNgq3-0007SJ-4Q; Fri, 07 Aug 2015 13:33:31 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini Subject: [PATCH 4/6] target-arm: Implement missing EL2 TLBI operations Date: Fri, 7 Aug 2015 13:33:28 +0100 Message-Id: <1438950810-28618-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1438950810-28618-1-git-send-email-peter.maydell@linaro.org> References: <1438950810-28618-1-git-send-email-peter.maydell@linaro.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.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Implement the missing TLBI operations that exist only if EL2 is implemented. Signed-off-by: Peter Maydell --- target-arm/helper.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index c53fecf..a8d37c6 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2324,6 +2324,16 @@ static void tlbi_aa64_alle1is_write(CPUARMState *env, const ARMCPRegInfo *ri, } } +static void tlbi_aa64_alle2is_write(CPUARMState *env, const ARMCPRegInfo *ri, + uint64_t value) +{ + CPUState *other_cs; + + CPU_FOREACH(other_cs) { + tlb_flush_by_mmuidx(other_cs, ARMMMUIdx_S1E2, -1); + } +} + static void tlbi_aa64_vae1_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -2806,10 +2816,22 @@ static const ARMCPRegInfo el2_cp_reginfo[] = { .opc0 = 1, .opc1 = 4, .crn = 8, .crm = 7, .opc2 = 1, .type = ARM_CP_NO_RAW, .access = PL2_W, .writefn = tlbi_aa64_vae2_write }, + { .name = "TLBI_VALE2", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 4, .crn = 8, .crm = 7, .opc2 = 5, + .access = PL2_W, .type = ARM_CP_NO_RAW, + .writefn = tlbi_aa64_vae2_write }, + { .name = "TLBI_ALLE2IS", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 4, .crn = 8, .crm = 3, .opc2 = 0, + .access = PL2_W, .type = ARM_CP_NO_RAW, + .writefn = tlbi_aa64_alle2is_write }, { .name = "TLBI_VAE2IS", .state = ARM_CP_STATE_AA64, .opc0 = 1, .opc1 = 4, .crn = 8, .crm = 3, .opc2 = 1, .type = ARM_CP_NO_RAW, .access = PL2_W, .writefn = tlbi_aa64_vae2is_write }, + { .name = "TLBI_VALE2IS", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 4, .crn = 8, .crm = 3, .opc2 = 5, + .access = PL2_W, .type = ARM_CP_NO_RAW, + .writefn = tlbi_aa64_vae2is_write }, REGINFO_SENTINEL };