From patchwork Tue Jun 2 14:48:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 49393 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 817B320BD1 for ; Tue, 2 Jun 2015 14:50:54 +0000 (UTC) Received: by labpg10 with SMTP id pg10sf12778335lab.2 for ; Tue, 02 Jun 2015 07:50:53 -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=HafUL3c3XKO/f8nlJwcuzco+Gk53DaKh31ryJ15nTcK4hHAOIq0YFG/oB6Xct5Zq9t +hhqcs9DXbx+zImewOCyTEl+MZRXiarlK7+9r3pxc9CiieD1KljRMsfZoswYVLFKOWyq qMvtCWvNXmyk0B4dvDzRd44VXgKxIDcnsY/kICAWRqD/99U89uY9z2PlOc5cp3H7eWRP CNMkTXs/6/wP2ZqapMbsN4JmpDqqufgds5BiyNJVyEKKXI+OB8wYtepJwpATpcbzU9Qw wvjQomjGvZCkSGZvaWnOZ0vpyk/R0YO9TbalDIowQ/Jjm4B/lPzunXSPUHY6HSf6NOlA Yyhg== X-Gm-Message-State: ALoCoQlwMYHp3QQ5kNHwaTkPWL2mXQzHwuIN29JwTv/Ui5/hVPc4XGuhR/SIawLKSgrUNBhJrh35 X-Received: by 10.112.42.236 with SMTP id r12mr26120249lbl.2.1433256653408; Tue, 02 Jun 2015 07:50:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.40 with SMTP id v8ls734972laj.88.gmail; Tue, 02 Jun 2015 07:50:53 -0700 (PDT) X-Received: by 10.152.23.38 with SMTP id j6mr3865225laf.47.1433256653248; Tue, 02 Jun 2015 07:50:53 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id pa8si15277180lbb.88.2015.06.02.07.50.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jun 2015 07:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labpy14 with SMTP id py14so115702264lab.0 for ; Tue, 02 Jun 2015 07:50:53 -0700 (PDT) X-Received: by 10.152.87.204 with SMTP id ba12mr27132138lab.35.1433256652981; Tue, 02 Jun 2015 07:50:52 -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 hn6csp3129312lbb; Tue, 2 Jun 2015 07:50:51 -0700 (PDT) X-Received: by 10.70.103.10 with SMTP id fs10mr49973803pdb.141.1433256651262; Tue, 02 Jun 2015 07:50:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hv8si26697315pdb.173.2015.06.02.07.50.50; Tue, 02 Jun 2015 07:50:51 -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 S1759350AbbFBOut (ORCPT + 2 others); Tue, 2 Jun 2015 10:50:49 -0400 Received: from mail-oi0-f53.google.com ([209.85.218.53]:32969 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbbFBOut (ORCPT ); Tue, 2 Jun 2015 10:50:49 -0400 Received: by oiww2 with SMTP id w2so127394352oiw.0 for ; Tue, 02 Jun 2015 07:50:49 -0700 (PDT) X-Received: by 10.60.125.169 with SMTP id mr9mr22716210oeb.14.1433256648971; Tue, 02 Jun 2015 07:50:48 -0700 (PDT) Received: from localhost ([167.160.116.34]) by mx.google.com with ESMTPSA id y1sm9476439oek.10.2015.06.02.07.50.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jun 2015 07:50:47 -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 18/32] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Date: Tue, 2 Jun 2015 22:48:13 +0800 Message-Id: <1433256507-7856-19-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1433256507-7856-1-git-send-email-shannon.zhao@linaro.org> References: <1433256507-7856-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.53 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)); }