From patchwork Thu Mar 12 19:41:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 184532 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp963930ile; Thu, 12 Mar 2020 12:57:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvWhMMv3dKSOHI/pG27htip8CRdZp6v9ylfyHYJzNaHNJNM/cJ8k0K8K5CrjHnGpOLJG4yX X-Received: by 2002:ac8:8e7:: with SMTP id y36mr1614693qth.26.1584043047933; Thu, 12 Mar 2020 12:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584043047; cv=none; d=google.com; s=arc-20160816; b=soT5QbaQEvV9NcAROwS2IMlGlzvrigAlUpBLLozJq8P3XXVr/imVGw0lHuXRmiG9nW Gi4iw6jo/FLW1Eh6kdKTVZFBOFgcpoTwZKAFMzWaUqD/x4ucdF2HgpSseqlvhkyoGCtJ wfzWT+sZrNQDptnC7HGoY2edvTVMRe7yhEr+WMBUvo3orG6aS298Li9FcfvLWEFaHxVD 7jg5X6F6kYbp1QH1QeW851KqGF4R1E1UypL5V+myvi4QWjsOrQOKSeDQDNi+uB5RrYkz 2NxK/qiKkF4ADi5O0IM+0vJ9TL+zxwkTTwZLdUFrV/JenjXxIBeznixyWuRFNKSt2wfw 8+wg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=YjtJPrBKwGIvW5n3TsllLnWEtrw5AerlDizUV5C1Mio=; b=FU4BTOgw7JA5619rwoIDLrZD/qtBG6iTTgWmNwFHCFmEqShuoMjSfyKfgCyJrsvN8O YWkKGo8Hw1yoYC/oEav8TqXYrqocRnfzT7cOGujqu6lt09VvziWmtNMl77urrg/r8u/u BJFXHGFrblgVbqhqr3mgXTSIoAGYWyyuBEIs5lPCbnK4pb/fy1m2dGl1rGEhuqczm4ty BhpYo6W9PvHXnTRvfMvplYhcyyrIlDvX3Q4Q2irr7qI27G5Brmm+SM6R2Zo2wEtYhPny C+XWI3fU5KbAnH+ztgM84q2iPQKv5kHK6E6SMRq8mwbOeXaH54fHdINa9ffXdf7jVvci oAaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m4FT5zQa; 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=pass (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 n5si3549589qti.323.2020.03.12.12.57.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Mar 2020 12:57:27 -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=pass header.i=@linaro.org header.s=google header.b=m4FT5zQa; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTxP-0005wV-E9 for patch@linaro.org; Thu, 12 Mar 2020 15:57:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45524) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTjI-0005c4-62 for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCTjF-00028y-Ne for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:52 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:44403) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCTjF-000284-GY for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:49 -0400 Received: by mail-pl1-x643.google.com with SMTP id d9so3055668plo.11 for ; Thu, 12 Mar 2020 12:42: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 :mime-version:content-transfer-encoding; bh=YjtJPrBKwGIvW5n3TsllLnWEtrw5AerlDizUV5C1Mio=; b=m4FT5zQa3+2PDG4aTJr/jboc8d20BX16tFdynHRW64k3e+NcDanVhWydFLIHECq4r3 6zL55z1NS+6MDbP0DC4Epz6NJn9poq8ZFF2JsKNq5PcVR3jimQPVtm+0tHGOlvHzEMYN gbGSJacz4VvS4f+9oXIIu5N4O/tjqyAf/Wh0ouYFhp43o28itwkUMJcWx6GhCe4A3iDe +0yZJ919GGm6N8WnrgYg5ubcM0osfsvG4AtXLLT5Z23xPoJwvUOuSxzfsiCZNmSPAQid eEjzq+ev9H5iZZZ49DHt+TbJDkqoYqXY3KmYm9vbRl+3Wsz6ZWbi5rVbttRPkJT8Lbjg lwvg== 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:mime-version:content-transfer-encoding; bh=YjtJPrBKwGIvW5n3TsllLnWEtrw5AerlDizUV5C1Mio=; b=HJhnazvGgslXhEg5VCnTYtMDzWIdTkY5THNgZBzmh9GuEMbNkXT6SS93yjCJP+9sg4 bhnrMEnpkXFWpwuuJXaKJ1ccfrUCBqjgMO8g+5KJSz0qjgAbmk8ri82ciYxacVhpSv/3 +noHvybxPCVty/rI6Fkcgec9y8t7IMd9kXpuoo45oYNgYDgceT+goC+eIiku0RmzF77o /ApG3cmsC2pVKC1kqltX/xYXArktxWH9oYu1bM7vqAObA0s3wfgmSjdcza2NXc2Wsvow 4ciWF56GsXLas6irRy1VFqbAHqpkXLPJMrrbTHMulqwruKNPeVmUYRLkE9pG9hbRfBpD ns7A== X-Gm-Message-State: ANhLgQ303QsmaLNte1aRvZpiwhV3F7c6YHlIAVcz0sN+4VLlEAGmuNNN n1KS7nYPS9GmlBJossAx+7XaeLbArI4= X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr9797215plp.304.1584042168194; Thu, 12 Mar 2020 12:42:48 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id g69sm6824842pje.34.2020.03.12.12.42.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:42:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 20/42] target/arm: Implement the access tag cache flushes Date: Thu, 12 Mar 2020 12:41:57 -0700 Message-Id: <20200312194219.24406-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312194219.24406-1-richard.henderson@linaro.org> References: <20200312194219.24406-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 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" Like the regular data cache flushes, these are nops within qemu. Signed-off-by: Richard Henderson --- v6: Split out and handle el0 cache ops properly. --- target/arm/helper.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) -- 2.20.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index 01d2fcf2e3..f9daeec1f4 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6914,6 +6914,32 @@ static const ARMCPRegInfo mte_reginfo[] = { .opc0 = 3, .opc1 = 3, .crn = 4, .crm = 2, .opc2 = 7, .type = ARM_CP_NO_RAW, .access = PL0_RW, .readfn = tco_read, .writefn = tco_write }, + { .name = "DC_IGVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 3, + .type = ARM_CP_NOP, .access = PL1_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_IGSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 4, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, + { .name = "DC_IGDVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 5, + .type = ARM_CP_NOP, .access = PL1_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_IGDSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 6, .opc2 = 6, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, + { .name = "DC_CGSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 10, .opc2 = 4, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, + { .name = "DC_CGDSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 10, .opc2 = 6, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, + { .name = "DC_CIGSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 14, .opc2 = 4, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, + { .name = "DC_CIGDSW", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 0, .crn = 7, .crm = 14, .opc2 = 6, + .type = ARM_CP_NOP, .access = PL1_W, .accessfn = access_tsw }, REGINFO_SENTINEL }; @@ -6923,6 +6949,43 @@ static const ARMCPRegInfo mte_tco_ro_reginfo[] = { .type = ARM_CP_CONST, .access = PL0_RW, }, REGINFO_SENTINEL }; + +static const ARMCPRegInfo mte_el0_cacheop_reginfo[] = { + { .name = "DC_CGVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 10, .opc2 = 3, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CGDVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 10, .opc2 = 5, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CGVAP", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 12, .opc2 = 3, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CGDVAP", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 12, .opc2 = 5, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CGVADP", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 13, .opc2 = 3, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CGDVADP", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 13, .opc2 = 5, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CIGVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 14, .opc2 = 3, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + { .name = "DC_CIGDVAC", .state = ARM_CP_STATE_AA64, + .opc0 = 1, .opc1 = 3, .crn = 7, .crm = 14, .opc2 = 5, + .type = ARM_CP_NOP, .access = PL0_W, + .accessfn = aa64_cacheop_poc_access }, + REGINFO_SENTINEL +}; + #endif static CPAccessResult access_predinv(CPUARMState *env, const ARMCPRegInfo *ri, @@ -8048,8 +8111,10 @@ void register_cp_regs_for_features(ARMCPU *cpu) */ if (cpu_isar_feature(aa64_mte, cpu)) { define_arm_cp_regs(cpu, mte_reginfo); + define_arm_cp_regs(cpu, mte_el0_cacheop_reginfo); } else if (cpu_isar_feature(aa64_mte_insn_reg, cpu)) { define_arm_cp_regs(cpu, mte_tco_ro_reginfo); + define_arm_cp_regs(cpu, mte_el0_cacheop_reginfo); } #endif