From patchwork Tue Aug 16 15:10:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 74025 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2055762qga; Tue, 16 Aug 2016 08:10:39 -0700 (PDT) X-Received: by 10.98.0.83 with SMTP id 80mr13290629pfa.78.1471360239059; Tue, 16 Aug 2016 08:10:39 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id d5si32534481pfb.98.2016.08.16.08.10.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 08:10:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZfzr-0002mQ-8k; Tue, 16 Aug 2016 15:09:43 +0000 Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZfzC-0002T6-Jm for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2016 15:09:04 +0000 Received: by mail-wm0-x22f.google.com with SMTP id q128so149739181wma.1 for ; Tue, 16 Aug 2016 08:08:41 -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=GqeSqpwTXrKeSwZAqypNRxSkV8jg9wUlxR8qmwQNUYc=; b=hCfZDSrHNf530/Q5n3iu1XLvbNxtF7ZHBpVYoQCXK58n67MgWYlVucv7mDZNBxi0XB euq8EJ2MUpXVRGriuIkY6SA+2sBKZ5Cx4QltI6vypVpdPTqWUK6b1M7owPYoAw+Wnkgi 3vagTzRWI5tlyRpmD2jop5wzPbIUWQDaAPtN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GqeSqpwTXrKeSwZAqypNRxSkV8jg9wUlxR8qmwQNUYc=; b=eGcLoZMpdJV5o1DC2gcwCQft2sz2qPYUhkZoEnIWIuuZAULooeZEtyzP40+h4Uzqfd iKwoy/yN5IHa/C26AFFUAi6+16I0AYdWYbujDFWDaGlgrAhcakmqjTC58GbjZkUp+ZYs okjYq9RiLpaXrdvo6qMwd5cKKMdrAUjrhlw4BXO1L9eIrRax4Y8ILMFaFpPEwSgL0jKx bOTECzRQLMII9OCFnVo7hZxCsgIsS6eXGPuT5iCWkuDbnskodlAINH0HRgzCWNiJcEeV ovYF3ulRNgrt4mUiRio+ujQaoGLRvhXeQ3Tvdj67rQgx5iVkz/7rdem61Wmct8L3Pksy Om8Q== X-Gm-Message-State: AEkoouudOD2Mq0OJcGYK4+QLOhj0t9/i8VNgcslxUU5lUO0oivViQY4JqQuoZE0npa+yI8Je X-Received: by 10.28.208.206 with SMTP id h197mr20964650wmg.17.1471360120633; Tue, 16 Aug 2016 08:08:40 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id wc3sm27107558wjc.47.2016.08.16.08.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Aug 2016 08:08:40 -0700 (PDT) From: Christoffer Dall To: vijay.kilari@gmail.com Subject: [PATCH 2/2] KVM: arm/arm64: Rename vgic_attr_regs_access to vgic_attr_regs_access_v2 Date: Tue, 16 Aug 2016 17:10:34 +0200 Message-Id: <20160816151034.16930-3-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160816151034.16930-1-christoffer.dall@linaro.org> References: <20160816151034.16930-1-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160816_080902_945715_6FEFB648 X-CRM114-Status: GOOD ( 12.72 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Marc Zyngier , Andre Przywara , Eric Auger , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Just a rename so we can implement a v3-specific function later. No functional change. Signed-off-by: Christoffer Dall --- virt/kvm/arm/vgic/vgic-kvm-device.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) -- 2.9.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/virt/kvm/arm/vgic/vgic-kvm-device.c b/virt/kvm/arm/vgic/vgic-kvm-device.c index 22d7ab3..2e18f03 100644 --- a/virt/kvm/arm/vgic/vgic-kvm-device.c +++ b/virt/kvm/arm/vgic/vgic-kvm-device.c @@ -296,17 +296,20 @@ static bool lock_all_vcpus(struct kvm *kvm) return true; } -/** vgic_attr_regs_access: allows user space to read/write VGIC registers - * - * @dev: kvm device handle - * @attr: kvm device attribute - * @reg: address the value is read or written - * @is_write: write flag +/* V2 ops */ + + +/** + * vgic_attr_regs_access_v2 - allows user space to access VGIC v2 state * + * @dev: kvm device handle + * @attr: kvm device attribute + * @reg: address the value is read or written + * @is_write: true if userspace is writing a register */ -static int vgic_attr_regs_access(struct kvm_device *dev, - struct kvm_device_attr *attr, - u32 *reg, bool is_write) +static int vgic_attr_regs_access_v2(struct kvm_device *dev, + struct kvm_device_attr *attr, + u32 *reg, bool is_write) { struct vgic_reg_attr reg_attr; gpa_t addr; @@ -349,8 +352,6 @@ out: return ret; } -/* V2 ops */ - static int vgic_v2_set_attr(struct kvm_device *dev, struct kvm_device_attr *attr) { @@ -369,7 +370,7 @@ static int vgic_v2_set_attr(struct kvm_device *dev, if (get_user(reg, uaddr)) return -EFAULT; - return vgic_attr_regs_access(dev, attr, ®, true); + return vgic_attr_regs_access_v2(dev, attr, ®, true); } } @@ -391,7 +392,7 @@ static int vgic_v2_get_attr(struct kvm_device *dev, u32 __user *uaddr = (u32 __user *)(long)attr->addr; u32 reg = 0; - ret = vgic_attr_regs_access(dev, attr, ®, false); + ret = vgic_attr_regs_access_v2(dev, attr, ®, false); if (ret) return ret; return put_user(reg, uaddr);