From patchwork Tue Jun 30 10:48:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 50456 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 22D81229DF for ; Tue, 30 Jun 2015 10:50:37 +0000 (UTC) Received: by laar3 with SMTP id r3sf2316304laa.1 for ; Tue, 30 Jun 2015 03:50:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=o7OZLCrWkP2yEcGsceJd+QgnF133XjOPEpcggmGn0QI=; b=jwPrRnnfBqKoj0tWXUzoMUFalzvYQokiK7PRmUICNT9WGWDnyOSEoM1GFbZGXKap70 PdgcXZDqRUamJR1qH6w5xcQo510XYo1wCsm+hGtRsRbZ4PFMhTigg4jQ860iM1PKDDPE 3rmMjPjtCDsYcfr2qWImIFnQ90rZMnc+kTBJF0/21kv2ntr6+euK7TpByiHLYuVRBfIQ lrIxy92bj4gB8qH52biM8/8xIGTEHvqnLmT6vMNfg37dOBIzVkN+GuI3Ynw2jN9NtfMj rIXDl9kqoPUXsNZNSM2Hq4JA3nfEwAHsUNnh8piykABql6/saadyuQBUzqeX4cYzK+oT uV9Q== X-Gm-Message-State: ALoCoQlnA8p/hg4tipbafmnjiU+HZWr1ZpH6/btBD9VuhppSGDTb3uur/mFF5dnwuMVgbitL8qrE X-Received: by 10.112.142.67 with SMTP id ru3mr13642015lbb.1.1435661436152; Tue, 30 Jun 2015 03:50:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.1 with SMTP id g1ls24891lag.46.gmail; Tue, 30 Jun 2015 03:50:35 -0700 (PDT) X-Received: by 10.152.181.34 with SMTP id dt2mr18797350lac.84.1435661435743; Tue, 30 Jun 2015 03:50:35 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id us12si18642281lbb.107.2015.06.30.03.50.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jun 2015 03:50:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lagh6 with SMTP id h6so8097204lag.2 for ; Tue, 30 Jun 2015 03:50:35 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr18797900lak.117.1435661435612; Tue, 30 Jun 2015 03:50:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2352797lbb; Tue, 30 Jun 2015 03:50:34 -0700 (PDT) X-Received: by 10.70.55.165 with SMTP id t5mr29619074pdp.102.1435661433717; Tue, 30 Jun 2015 03:50:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si66313267par.87.2015.06.30.03.50.32; Tue, 30 Jun 2015 03:50:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752408AbbF3Kuc (ORCPT + 2 others); Tue, 30 Jun 2015 06:50:32 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:32954 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbbF3Kub (ORCPT ); Tue, 30 Jun 2015 06:50:31 -0400 Received: by pacws9 with SMTP id ws9so3944500pac.0 for ; Tue, 30 Jun 2015 03:50:31 -0700 (PDT) X-Received: by 10.70.0.202 with SMTP id 10mr41745484pdg.41.1435661431241; Tue, 30 Jun 2015 03:50:31 -0700 (PDT) Received: from localhost ([120.136.36.232]) by mx.google.com with ESMTPSA id gy3sm45122647pbb.42.2015.06.30.03.50.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 30 Jun 2015 03:50:29 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Steve Capper Subject: [PATCH for 3.14.y stable 08/22] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Date: Tue, 30 Jun 2015 18:48:56 +0800 Message-Id: <1435661350-8060-9-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1435661350-8060-1-git-send-email-shannon.zhao@linaro.org> References: <1435661350-8060-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Steve Capper commit 3d08c629244257473450a8ba17cb8184b91e68f8 upstream. Commit: b886576 ARM: KVM: user_mem_abort: support stage 2 MMIO page mapping introduced some code in user_mem_abort that failed to compile if STRICT_MM_TYPECHECKS was enabled. This patch fixes up the failing comparison. Signed-off-by: Steve Capper Reviewed-by: Kim Phillips Signed-off-by: Christoffer Dall Signed-off-by: Shannon Zhao --- arch/arm/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index d122772..2206385 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -850,7 +850,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, } coherent_cache_guest_page(vcpu, hva, PAGE_SIZE); ret = stage2_set_pte(kvm, memcache, fault_ipa, &new_pte, - mem_type == PAGE_S2_DEVICE); + pgprot_val(mem_type) == pgprot_val(PAGE_S2_DEVICE)); }