From patchwork Sun Apr 23 17:08:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9694921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ABF3260245 for ; Sun, 23 Apr 2017 17:10:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 935E526530 for ; Sun, 23 Apr 2017 17:10:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 884FA265B9; Sun, 23 Apr 2017 17:10:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 185B226530 for ; Sun, 23 Apr 2017 17:10:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162740AbdDWRKV (ORCPT ); Sun, 23 Apr 2017 13:10:21 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37758 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162398AbdDWRJs (ORCPT ); Sun, 23 Apr 2017 13:09:48 -0400 Received: by mail-wm0-f47.google.com with SMTP id m123so50333700wma.0 for ; Sun, 23 Apr 2017 10:09:47 -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; bh=+WP99Bckaaob+YKfIegbi7CGu/Y9BCtU+9buth/V+0c=; b=IofOpjtLHgapVN7yWB6thX057gric7a9ZoSx/9yCLeKExvnSYH7Pyettz3n1DO+Af6 +PVESmdQSGFIP8yk+b+zFFncNDTueEj6zULmT7FzsuCE3f9eVa18g7EWz7DIvbVxmNcF 3ry1eG4FqSzh6blc/hfKa1NYDa2THPvWHKSn0= 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; bh=+WP99Bckaaob+YKfIegbi7CGu/Y9BCtU+9buth/V+0c=; b=mj+BCBybK90ersoaKKW2XIM8oVrQiAR0Dwo4WY2xYfSYc8KHLMdfOzUrMD73V5+VOs b5GysuzM1C/P/4rl7nMWLX0gL208bhbfuldZOdqXSrS37V55i6H+a9HyV51HTe671W8S xsysY0W7b1Fkd6LAJtYH98zu9RDYRGeHvoaEVdsHFdi0OPuLEyobh+PyNcOtd5XJFaW8 TG9UKN/RqI2KXecZOohxaJOamPN22OL3ZkwZnlQUgQJwA14qZ4qlnsO+8DeTfl7/KeQ5 pe+UglBRYkU23fu27lG/posZHThxugR5pWWqosX2lKlyFed1bxWpIUwjThCwAWGoAeeX +AmQ== X-Gm-Message-State: AN3rC/5E+q3J3GSJnagU6MIM332sJ6MUhu4GEq5Z/WxwgiU9Pn2Qx3n3 ow1ihzLD4cP39kew X-Received: by 10.80.151.183 with SMTP id e52mr141964edb.61.1492967386922; Sun, 23 Apr 2017 10:09:46 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id 58sm2803521edz.2.2017.04.23.10.09.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Apr 2017 10:09:46 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Rutland Subject: [PULL 15/79] KVM: arm64: Use common Set/Way sys definitions Date: Sun, 23 Apr 2017 19:08:25 +0200 Message-Id: <20170423170929.27334-16-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170423170929.27334-1-cdall@linaro.org> References: <20170423170929.27334-1-cdall@linaro.org> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Rutland Now that we have common definitions for the encoding of Set/Way cache maintenance operations, make the KVM code use these, simplifying the sys_reg_descs table. Signed-off-by: Mark Rutland Acked-by: Christoffer Dall Cc: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu --- arch/arm64/kvm/sys_regs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index effa5ce..0e6c477 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -879,15 +879,9 @@ static bool access_cntp_cval(struct kvm_vcpu *vcpu, * more demanding guest... */ static const struct sys_reg_desc sys_reg_descs[] = { - /* DC ISW */ - { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b0110), Op2(0b010), - access_dcsw }, - /* DC CSW */ - { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b1010), Op2(0b010), - access_dcsw }, - /* DC CISW */ - { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b1110), Op2(0b010), - access_dcsw }, + { SYS_DESC(SYS_DC_ISW), access_dcsw }, + { SYS_DESC(SYS_DC_CSW), access_dcsw }, + { SYS_DESC(SYS_DC_CISW), access_dcsw }, DBG_BCR_BVR_WCR_WVR_EL1(0), DBG_BCR_BVR_WCR_WVR_EL1(1),