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: 9695017 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 C63AA60245 for ; Sun, 23 Apr 2017 17:12:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE43726530 for ; Sun, 23 Apr 2017 17:12:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A18D8265B9; Sun, 23 Apr 2017 17:12:47 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38B1B26530 for ; Sun, 23 Apr 2017 17:12:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=m0BIUJVxBic0BGPXtounAO2JK5KyTSbqH5THMcRt8bs=; b=O7Zqmsvs8N1XSxCMB8FM1JEicZ fpFJ/MVqeJjzqh+BtXxxZaa465O/cfOQmsY74mFbhzVmCQmMiKGBpj9TS0PmCPZ9A3fWYpOvZGN0k sg1xxVaolyGA2YFDwLwVLpkuwrzM/+yPAyZfXWITYt2vsseZ8rtXz+it07noK/66hyj/4SctYprVl 2e5bXi9sXAninsR2jxtiP03jOi+2jEPCUerFaUk0v38A2a3tTKDVpYdEPgd3yXBVxuDBjhfcTMphx Zh/xznDIlTPABSduOy8FJRPzXF9n8R8F53VoahC6dhiKTgMmdFOHPabHrD9lMhC8vUWoKWxVrPbgT kRBs/F9A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d2L42-0000fL-E5; Sun, 23 Apr 2017 17:12:46 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d2L1S-0004V4-FR for linux-arm-kernel@lists.infradead.org; Sun, 23 Apr 2017 17:10:15 +0000 Received: by mail-wm0-x231.google.com with SMTP id m123so50333699wma.0 for ; Sun, 23 Apr 2017 10:09:48 -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=ABqU2LJ0917ItA2KLqED0bhxu3+hN6RTJZcenfFlJkcwyHv5ErbSeMrYPMjif1B1FD P7xEpzs1pC3JH5dCbX9eyITSxOztVoV8NQxa2pk7IoAtMHa348Az8G+MVO1VcGIG/yAa E0iueDtJuGLTf0oa/iRhgVv5UEfv2cTBJ/j9fJQKrY38NOrzQCYyfhYfYUWrfYoDp7NW ezuvuiyoO//DyDuU9atRwSlhWp+l0gWdIX9MaC0LgMrxDbO50ydhWDJx9AXh7zXpJNe6 M35mOzMFKqds3BFB/TfCfbJTQASOq1jvqI7jsdWdVr4PeOBnnnm9jJvdtmehh3/wsTbS xw5w== X-Gm-Message-State: AN3rC/7hrvDYcMyD4X3knzlvlALPFqubecgaqJWw0OJ/8S0XrEbF4dNd oXPLncP6DKloa8VP 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?= 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170423_101007_778988_0123BC00 X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Mark Rutland , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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),