From patchwork Wed Nov 23 13:01:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijay Kilari X-Patchwork-Id: 83659 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp2625268qge; Wed, 23 Nov 2016 05:06:33 -0800 (PST) X-Received: by 10.84.140.133 with SMTP id 5mr6404417plt.76.1479906393394; Wed, 23 Nov 2016 05:06:33 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s11si33741222pgc.259.2016.11.23.05.06.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 05:06:33 -0800 (PST) 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=@gmail.com; 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=gmail.com 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 1c9XEp-0005xx-To; Wed, 23 Nov 2016 13:05:23 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9XCO-00041B-LX for linux-arm-kernel@lists.infradead.org; Wed, 23 Nov 2016 13:02:54 +0000 Received: by mail-pf0-x242.google.com with SMTP id y68so704061pfb.1 for ; Wed, 23 Nov 2016 05:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gEsT8BibW+5bC6xNeR1n/yBAyKYIFrTlgbc568HqGfc=; b=kMkdW2AFEPQpgmjLRzrBQhxQxHHBw0qg86Ga2xB5WAWsS/NzgS2kpguuTzBqNCHw9B rZ75fcybemjhWTwJQfV244BsVQ14gQzAF88fVSjCqqhvv1PaG82J6+9dMM3iZLVJ0AD6 9z0NBmfHyxrFKgy3WvfQIuDIY25ixVO2eXzYKjY6yA91nAcsENtKwYQNGx8hV4kZemXY NWYx2pOkPPKbRehPgxHQDHNSN/2zd505IEXVsr5AddMchYmd2FM9K573jPkqP1NI0TAh H8yMnbJ4vDY3HooE2q2KnVAClhf1la+2wgMUD75/zjHTThLxZ4U1caMdoqrL43yKQS49 kO7w== 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=gEsT8BibW+5bC6xNeR1n/yBAyKYIFrTlgbc568HqGfc=; b=cjZ9Eo3mPmrghbYYJ7MJyIwvfU8YrGzJFTFAvSFotjgd0LkS2gUDbhPVBqnm10Iguf 8aNk5koqr6V7rlF/Q7nVqkfI3dyzvjLuRTmMhhdttzamZ1/MYm+YqvHjr1B/s9K/qQC0 gLOmmyk2C8rDzNQ2YDIlSVsujBklPaji8x+Jy/fEI30REthz63buQdR1ns3GM6MKdA0h pvQicEc4X/FtgFBIZNGd6DsCWOtwqa0RQNXXNdFVCLsnr241emOhJgcMJ27CAWgDXAzf bqQF6h39zPdBJjoCJf0u0WBZ2FJgsuczj5+dUdsvKq//4WISLCyljGSAihBO2UmYdBys mIzw== X-Gm-Message-State: AKaTC00BAQTT9ykai9n1twbS0iTHrhh8wLIHzMkQ8j2FkCNZXEy9IVfJURJCG2EZFuB05w== X-Received: by 10.98.200.8 with SMTP id z8mr2712131pff.176.1479906155557; Wed, 23 Nov 2016 05:02:35 -0800 (PST) Received: from cavium-Vostro-2520.caveonetworks.com ([111.93.218.67]) by smtp.gmail.com with ESMTPSA id a24sm36838849pfh.57.2016.11.23.05.02.33 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Nov 2016 05:02:35 -0800 (PST) From: vijay.kilari@gmail.com To: marc.zyngier@arm.com, christoffer.dall@linaro.org, peter.maydell@linaro.org Subject: [PATCH v9 09/11] arm: coproc: Drop const from coproc reg access function Date: Wed, 23 Nov 2016 18:31:56 +0530 Message-Id: <1479906118-15832-10-git-send-email-vijay.kilari@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1479906118-15832-1-git-send-email-vijay.kilari@gmail.com> References: <1479906118-15832-1-git-send-email-vijay.kilari@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161123_050252_880057_7FBBBC3C X-CRM114-Status: GOOD ( 13.05 ) X-Spam-Score: -0.6 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [111.93.218.67 listed in dnsbl.sorbs.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c00:0:0:0:242 listed in] [list.dnswl.org] 1.3 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vijay.kilari[at]gmail.com) -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: p.fedin@samsung.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Vijaya Kumar K MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Vijaya Kumar K In order to read or write to coproc regiter, the access function is should allow the coproc_param to be non constant. Signed-off-by: Vijaya Kumar K --- arch/arm/kvm/coproc.c | 20 ++++++++++---------- arch/arm/kvm/coproc.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c index 3e5e419..5753926 100644 --- a/arch/arm/kvm/coproc.c +++ b/arch/arm/kvm/coproc.c @@ -113,7 +113,7 @@ static void reset_mpidr(struct kvm_vcpu *vcpu, const struct coproc_reg *r) /* TRM entries A7:4.3.31 A15:4.3.28 - RO WI */ static bool access_actlr(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -125,7 +125,7 @@ static bool access_actlr(struct kvm_vcpu *vcpu, /* TRM entries A7:4.3.56, A15:4.3.60 - R/O. */ static bool access_cbar(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -135,7 +135,7 @@ static bool access_cbar(struct kvm_vcpu *vcpu, /* TRM entries A7:4.3.49, A15:4.3.48 - R/O WI */ static bool access_l2ctlr(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -181,7 +181,7 @@ static void reset_actlr(struct kvm_vcpu *vcpu, const struct coproc_reg *r) * R/O WI (even if NSACR.NS_L2ERR, a write of 1 is ignored). */ static bool access_l2ectlr(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -195,7 +195,7 @@ static bool access_l2ectlr(struct kvm_vcpu *vcpu, * See note at ARMv7 ARM B1.14.4 (TL;DR: S/W ops are not easily virtualized). */ static bool access_dcsw(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (!p->is_write) @@ -213,7 +213,7 @@ static bool access_dcsw(struct kvm_vcpu *vcpu, * Used by the cpu-specific code. */ bool access_vm_reg(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { bool was_enabled = vcpu_has_cache_enabled(vcpu); @@ -229,7 +229,7 @@ bool access_vm_reg(struct kvm_vcpu *vcpu, } static bool access_gic_sgi(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { u64 reg; @@ -246,7 +246,7 @@ static bool access_gic_sgi(struct kvm_vcpu *vcpu, } static bool access_gic_sre(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -267,7 +267,7 @@ static bool access_gic_sre(struct kvm_vcpu *vcpu, * all PM registers, which doesn't crash the guest kernel at least. */ static bool pm_fake(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r) { if (p->is_write) @@ -480,7 +480,7 @@ static const struct coproc_reg *find_reg(const struct coproc_params *params, } static int emulate_cp15(struct kvm_vcpu *vcpu, - const struct coproc_params *params) + struct coproc_params *params) { size_t num; const struct coproc_reg *table, *r; diff --git a/arch/arm/kvm/coproc.h b/arch/arm/kvm/coproc.h index eef1759..bbeff2a 100644 --- a/arch/arm/kvm/coproc.h +++ b/arch/arm/kvm/coproc.h @@ -41,7 +41,7 @@ struct coproc_reg { /* Trapped access from guest, if non-NULL. */ bool (*access)(struct kvm_vcpu *, - const struct coproc_params *, + struct coproc_params *, const struct coproc_reg *); /* Initialization for vcpu. */ @@ -154,7 +154,7 @@ static inline int cmp_reg(const struct coproc_reg *i1, #define is32 .is_64bit = false bool access_vm_reg(struct kvm_vcpu *vcpu, - const struct coproc_params *p, + struct coproc_params *p, const struct coproc_reg *r); #endif /* __ARM_KVM_COPROC_LOCAL_H__ */