From patchwork Thu Apr 30 12:12:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47823 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9C5312121F for ; Thu, 30 Apr 2015 12:18:29 +0000 (UTC) Received: by wghm4 with SMTP id m4sf14557807wgh.2 for ; Thu, 30 Apr 2015 05:18:28 -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: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=qLVoQ2n0IQXGEproqMPa0muolnX3zZjx/mHBK2LANgs=; b=RV4mAI46IeNIQrt9rsjJZMIf5Jm9F9pdgFsII2dqvINPr54bTMl9nsGx0LaecLyJcM Ln6kudF9jmFISBINKlgY4jB8zJr6MsSiFb5l3fnN0TL/QUKONzXOke0ItEf+xAp4tSiC uR3H5jbbvT1P2HtSVrhbgHWGcPXaiu6mGS7Qdx/N9WCznGW1dFGGmZv5BjvIQ+GG4Tq5 JnANhvByaP34Aeo2Khjuvv9XRbQG59HaaACYNwUp1VoKjNfo2wXT6rIC5HG2jFuAPB46 IeHR8WBy/iq+4eS54WnsBgy+lfBAkHRnqwurPdzw9d7mEoCTE/uAzbceeTCAyUGCC3qR uQPg== X-Gm-Message-State: ALoCoQkA8RYSYCZvpJkhzwViek188LPMkZliV9RQ02eSJsFezlJ8Kb07943UhLsq/RYv1g5pAkfn X-Received: by 10.194.143.98 with SMTP id sd2mr2390797wjb.6.1430396308909; Thu, 30 Apr 2015 05:18:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.102 with SMTP id s6ls365725lag.73.gmail; Thu, 30 Apr 2015 05:18:28 -0700 (PDT) X-Received: by 10.112.140.9 with SMTP id rc9mr3662297lbb.14.1430396308753; Thu, 30 Apr 2015 05:18:28 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id rh10si1632452lbb.105.2015.04.30.05.18.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:18:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labbd9 with SMTP id bd9so42687832lab.2 for ; Thu, 30 Apr 2015 05:18:28 -0700 (PDT) X-Received: by 10.153.6.36 with SMTP id cr4mr3686306lad.56.1430396308653; Thu, 30 Apr 2015 05:18:28 -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.67.65 with SMTP id l1csp3077590lbt; Thu, 30 Apr 2015 05:18:24 -0700 (PDT) X-Received: by 10.68.169.34 with SMTP id ab2mr7659715pbc.120.1430396281628; Thu, 30 Apr 2015 05:18:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pt2si3298787pbb.51.2015.04.30.05.18.00; Thu, 30 Apr 2015 05:18:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751794AbbD3MR5 (ORCPT + 28 others); Thu, 30 Apr 2015 08:17:57 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53673 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751439AbbD3MMf (ORCPT ); Thu, 30 Apr 2015 08:12:35 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnnKT-0008DO-Cm; Thu, 30 Apr 2015 14:12:33 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Steve Capper , Christoffer Dall , Shannon Zhao , Jiri Slaby Subject: [PATCH 3.12 51/63] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Date: Thu, 30 Apr 2015 14:12:20 +0200 Message-Id: <8f4ca4f5b938fbc0598b66c041ced7a2fe82dccf.1430387326.git.jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 In-Reply-To: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> References: <45aaf85687dd6ac119c55c5ec0dbe0bef0e62235.1430387326.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.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.43 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 3.12-stable review patch. If anyone has any objections, please let me know. =============== 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 Signed-off-by: Jiri Slaby --- 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 f9740851a6a4..90422a536083 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -698,7 +698,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, kvm_set_pfn_dirty(pfn); } stage2_set_pte(vcpu->kvm, memcache, fault_ipa, &new_pte, - mem_type == PAGE_S2_DEVICE); + pgprot_val(mem_type) == pgprot_val(PAGE_S2_DEVICE)); out_unlock: spin_unlock(&vcpu->kvm->mmu_lock);