From patchwork Fri Jun 26 15:13:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 191840 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp591002ilg; Fri, 26 Jun 2020 08:29:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZvH/9j6ejXi+AgcNO3SRNaHslv87nzxO7HtjXY5vQU8CKkLi5MR433ezEK3D1Qi7J6ZRl X-Received: by 2002:a5b:7c1:: with SMTP id t1mr5576361ybq.158.1593185389300; Fri, 26 Jun 2020 08:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593185389; cv=none; d=google.com; s=arc-20160816; b=AqfJMhKVLtmp3uhjQlnhZ2t1chB3MKhsomehr7K2szeCRvM2CECIoUySbaJWGpetDy pP1fMJ4bHQ6MokNublaH1k7BTIP8NB9vrW+ud1XCVUQE4F8lUJ64759wHZmYCJ4p7ZuU VG67ibCdwpoSBsYPnha+AmksZ71EEkh7QWp281zhDApZT/v2iYOzf1vmBP67fmjtUXsn jN7QGSlEgedXddGWfpvGn1CBOBeBmaC5vi5aR93Z4vstRJhJQgLOLHixTldRq/j4UNTi dDJulMQJe5q4R3bRntQriI8dPdr/krk51DrMSjJg4EIg30j+R+h2KDdvD1drpNPgxV4g UebQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=1ExlIGPJB8Fog/WP+ZDYVXNtqRB+snzWoC2Xcpf4m9c=; b=Sna1swlFv4u4vSegyL3oxFa81PI88iTjaQgWeHLPJb2nZ77oxsHqadCKUzUhd7K56o 7omu1VpVAnUwVaV5rpB5OEg3dZJ2+6xWNAhVORPbhvCY9fNProkde7knQ+dsnvW6aJ/M EFA0DrPUBmTerOmaDPJurj1YZB0h1Jqdveg6kBvzLFqiNewC8fsZzCNQKrFa++tTfqcN ts0cqzgrr3Mq3AgizcdQcKzPjw00dblvvZroOkFOEjEzsPXM160tE0biyTBw4Qp5G8xQ L5vjip+wIU7Q9GoP/Sur/O3MgoPHPA4PKCwONognLqKz9lR/uIr9vEPm5BAx8shsO+rK Fibg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYXcFypo; 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 b15si25542030ybr.243.2020.06.26.08.29.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 08:29:49 -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=WYXcFypo; 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]:52518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joqIW-0003XP-P5 for patch@linaro.org; Fri, 26 Jun 2020 11:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joq4K-0002wp-Pw for qemu-devel@nongnu.org; Fri, 26 Jun 2020 11:15:08 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:52114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joq4H-0006b2-Fj for qemu-devel@nongnu.org; Fri, 26 Jun 2020 11:15:08 -0400 Received: by mail-wm1-x343.google.com with SMTP id 22so9168889wmg.1 for ; Fri, 26 Jun 2020 08:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1ExlIGPJB8Fog/WP+ZDYVXNtqRB+snzWoC2Xcpf4m9c=; b=WYXcFypopJPOHq9cpC5vwELv555v7YszdOGZfPWSGC3sog1ngbpDv3EUtuzVVnrvY5 58p9afQ4KckRiQUyADa8iEmN4S/1t9tb8VBISm5NMrIru4wTSI1Zw+WCs98vHDXnpi68 y8BXIRPlyUsv2N4QVbWUKiUfwMXWzHqgP5BZj3+qW0boAtlyLi5zhYjftrDLFadrPOR9 Ffr93kqI9XabnoWivBenDX3iPPpzOUFpvfdpuCbEEOL7xSfKaaVOMXAm/EWEqc7NfyUX jW+7q00pzL0n4Vvrn4lnSLvEEPtIKvwyAZQNSssigPPQcF1CEV8zVYpXhaLqMomOtjMF PVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1ExlIGPJB8Fog/WP+ZDYVXNtqRB+snzWoC2Xcpf4m9c=; b=SrVfnluhF4iZr1qdB49eNeXWxuOPgc35cV1sB1LxBsdTpzCQNpwLxjnNYSGk9lffYG dpHywlYYSlgxmzJ31msU+pQKn5QcHCYlsXGWpWnPYVJrOFiWwJ2HWBsXi9cjNg6IJX33 FoUnhPmlwBB0TaTucbY6+FBFhQBbQbZeCgE5uZmL7Q8CPPRzPh0fqxMJkoDOJCK9aiRC ZqawUfMB79Yr/wZHJKH2eG5xoyxSf2UwMPBCnPgocamXIpHWBAJVzYC5rxKON5aigFke /ynC6aoPHizF+LHVOXmjZRqVxFHqRbqZ5+FJYHG3kePR1kdWD9XBdxzrlookICGAG54A dBUA== X-Gm-Message-State: AOAM533MhiDCTpJrezcuQ8uBSLyLu8VPQXCFI2aaLhEyKrGRWWYlaRE0 lLe+aQjn+MeCT30CUlvwxlNUIa173Hs51A== X-Received: by 2002:a05:600c:2f08:: with SMTP id r8mr3737410wmn.113.1593184503906; Fri, 26 Jun 2020 08:15:03 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id w13sm37838852wrr.67.2020.06.26.08.15.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 08:15:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 32/57] target/arm: Implement the access tag cache flushes Date: Fri, 26 Jun 2020 16:13:59 +0100 Message-Id: <20200626151424.30117-33-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626151424.30117-1-peter.maydell@linaro.org> References: <20200626151424.30117-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Like the regular data cache flushes, these are nops within qemu. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20200626033144.790098-21-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- 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 2c6ec244af8..d8c31d03dad 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6929,6 +6929,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 }; @@ -6938,6 +6964,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, @@ -8071,8 +8134,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