From patchwork Tue Mar 21 11:05:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 9636395 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 0AEED602D6 for ; Tue, 21 Mar 2017 11:06:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C2B626E4F for ; Tue, 21 Mar 2017 11:06:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00B8427F07; Tue, 21 Mar 2017 11:06:08 +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 4CF6D28324 for ; Tue, 21 Mar 2017 11:06:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756974AbdCULFn (ORCPT ); Tue, 21 Mar 2017 07:05:43 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:36141 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756955AbdCULFj (ORCPT ); Tue, 21 Mar 2017 07:05:39 -0400 Received: by mail-wr0-f169.google.com with SMTP id u108so109570306wrb.3 for ; Tue, 21 Mar 2017 04:05:37 -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=rLDu82Flsf9IWa2mljj2U1BKh40Yfb1C0KP2QcCpV8c=; b=guyYWbx3HOJUs40QLK7thiWwovzkQUEH29nUjqILF51iVkMdcD8UVza+B4expjAd+v po2v+L3/LTU7dFWdAn7STC2pgdiT/BrJowl3siYmS+81DKxNoHAIv5uxtM9/UeqEELm4 QZiHXDUWeYcJPVgWt7UauGhwHC2UlkS/BPcJc= 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=rLDu82Flsf9IWa2mljj2U1BKh40Yfb1C0KP2QcCpV8c=; b=WGES6pMq3tQYwbgYL3H38LjtD9kKsgBWH29fMMLcZj2n5ncajI6WX279Agi0jZDJuK IemJxoOoX7oi8wi4sJEft6JjBgo9OWJI845Ngs5TuctQgaGasSh3B6yiILkI+u/dF1QW 3jBeqol0QEw76yMZEwgc/hW2Mn2TBuy9Ek3XtVqH2pB+2vwDzm2uMyZwaF0piNYGpmj/ zyNx6LqPlspGg1HqWxs8v7cFiyG0mlPIRvna2NmYMuILh3zBH2dphl002i8b2vj26NdP +y89tGO/rbMQVWxd7TZfiO4ij+kqaAlKijASTgL322o3nQ2+knJ1YgGErnMmgWca9dcB FUZg== X-Gm-Message-State: AFeK/H16SldgXJoYgc/XRJ8ShpPuzOZh+ywDWQWOSedmZ64elfYzjkKUy9WRRvddpl7C2LDv X-Received: by 10.223.153.168 with SMTP id y37mr29157392wrb.193.1490094337012; Tue, 21 Mar 2017 04:05:37 -0700 (PDT) Received: from localhost.localdomain (xd93ddc2d.cust.hiper.dk. [217.61.220.45]) by smtp.gmail.com with ESMTPSA id f48sm24358252wrf.17.2017.03.21.04.05.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Mar 2017 04:05:36 -0700 (PDT) From: Christoffer Dall To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Cc: kvm@vger.kernel.org, Marc Zyngier , Andre Przywara , Eric Auger , Vijaya.Kumar@cavium.com, Christoffer Dall Subject: [PATCH 3/5] KVM: arm64: vgic: Rename vgic_v3_cpu to vgic_cpu Date: Tue, 21 Mar 2017 12:05:28 +0100 Message-Id: <20170321110530.15857-4-cdall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170321110530.15857-1-cdall@linaro.org> References: <20170321110530.15857-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 We have a temporary variable that points to the vgic_cpu structure, and not the GICv3 specific part, which is a bit misleading compared to the convention in the rest of the code. As we are about to mess with the logic of userspace access, let's rename this. No functional change. Signed-off-by: Christoffer Dall --- arch/arm64/kvm/vgic-sys-reg-v3.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kvm/vgic-sys-reg-v3.c b/arch/arm64/kvm/vgic-sys-reg-v3.c index 48848db..33f111c 100644 --- a/arch/arm64/kvm/vgic-sys-reg-v3.c +++ b/arch/arm64/kvm/vgic-sys-reg-v3.c @@ -20,7 +20,7 @@ static bool write_gic_ctlr(struct kvm_vcpu *vcpu, u32 val) { - struct vgic_cpu *vgic_v3_cpu = &vcpu->arch.vgic_cpu; + struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; u32 host_pri_bits, host_id_bits, host_seis, host_a3v, seis, a3v; struct vgic_vmcr vmcr; @@ -32,17 +32,17 @@ static bool write_gic_ctlr(struct kvm_vcpu *vcpu, u32 val) */ host_pri_bits = ((val & ICC_CTLR_EL1_PRI_BITS_MASK) >> ICC_CTLR_EL1_PRI_BITS_SHIFT) + 1; - if (host_pri_bits > vgic_v3_cpu->num_pri_bits) + if (host_pri_bits > vgic_cpu->num_pri_bits) return false; - vgic_v3_cpu->num_pri_bits = host_pri_bits; + vgic_cpu->num_pri_bits = host_pri_bits; host_id_bits = (val & ICC_CTLR_EL1_ID_BITS_MASK) >> ICC_CTLR_EL1_ID_BITS_SHIFT; - if (host_id_bits > vgic_v3_cpu->num_id_bits) + if (host_id_bits > vgic_cpu->num_id_bits) return false; - vgic_v3_cpu->num_id_bits = host_id_bits; + vgic_cpu->num_id_bits = host_id_bits; host_seis = ((kvm_vgic_global_state.ich_vtr_el2 & ICH_VTR_SEIS_MASK) >> ICH_VTR_SEIS_SHIFT); @@ -70,15 +70,15 @@ static bool write_gic_ctlr(struct kvm_vcpu *vcpu, u32 val) static u32 read_gic_ctlr(struct kvm_vcpu *vcpu) { - struct vgic_cpu *vgic_v3_cpu = &vcpu->arch.vgic_cpu; + struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; u32 val = 0; struct vgic_vmcr vmcr; vgic_get_vmcr(vcpu, &vmcr); - val |= (vgic_v3_cpu->num_pri_bits - 1) << + val |= (vgic_cpu->num_pri_bits - 1) << ICC_CTLR_EL1_PRI_BITS_SHIFT; - val |= vgic_v3_cpu->num_id_bits << ICC_CTLR_EL1_ID_BITS_SHIFT; + val |= vgic_cpu->num_id_bits << ICC_CTLR_EL1_ID_BITS_SHIFT; val |= ((kvm_vgic_global_state.ich_vtr_el2 & ICH_VTR_SEIS_MASK) >> ICH_VTR_SEIS_SHIFT) << ICC_CTLR_EL1_SEIS_SHIFT;