From patchwork Thu Apr 30 09:24:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 47793 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BBA3E2121F for ; Thu, 30 Apr 2015 09:31:46 +0000 (UTC) Received: by lbcne10 with SMTP id ne10sf12948116lbc.1 for ; Thu, 30 Apr 2015 02:31:45 -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=ce6AIxgzC17P6k3hir/+Fks378+Uc9nfV6YEhC+dFPU=; b=PU4i5KLh0ba8WT0qO9u++f6MhOd+dFrvagHrxbiXPelhbfuPY+TNQZ11NQ1ZIhqAfm bztJHssVrlktjlpvZsYoWdqqm7NLX2ilOrYMpZGZYFRL3jhIXUJDMEiAJVE6b81xG5Oo pb9uyCpbZLkbpsDlpMBvrDsgz2uCXqHaLKeMq0/pENrkpnE5Ybge15giIdwYrnVCB5G5 R88rlgURuMXcl1SJ/oncUZMNOzgZfwOeuQKTaq8h9QnZQi6UoFoFTI+h/PeMSsTkmXro iVQlWyJ4/kSRQ0TR+UeDFAO+Wl74xPSxnUSS92cfAe8i3n9fPg7V58VD8PV8C6vqG6O7 gOpg== X-Gm-Message-State: ALoCoQm0L9OdDGsyUivHJgQkqdx6fDjVI9v19pYtMstoNHrZrp4OK4p0/5Kz2cE0d/JKx8siLlVt X-Received: by 10.112.28.111 with SMTP id a15mr1968635lbh.21.1430386305744; Thu, 30 Apr 2015 02:31:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.239.130 with SMTP id vs2ls291721lac.97.gmail; Thu, 30 Apr 2015 02:31:45 -0700 (PDT) X-Received: by 10.112.13.233 with SMTP id k9mr3018720lbc.57.1430386305496; Thu, 30 Apr 2015 02:31:45 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id b2si1352834lbd.52.2015.04.30.02.31.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 02:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by labbd9 with SMTP id bd9so39704861lab.2 for ; Thu, 30 Apr 2015 02:31:45 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr2960286lak.29.1430386305380; Thu, 30 Apr 2015 02:31:45 -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 l1csp2997871lbt; Thu, 30 Apr 2015 02:31:44 -0700 (PDT) X-Received: by 10.70.87.231 with SMTP id bb7mr6548756pdb.70.1430385969596; Thu, 30 Apr 2015 02:26:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nf2si2640288pbc.149.2015.04.30.02.26.08; Thu, 30 Apr 2015 02:26:09 -0700 (PDT) Received-SPF: none (google.com: stable-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 S1751463AbbD3JZw (ORCPT + 2 others); Thu, 30 Apr 2015 05:25:52 -0400 Received: from ip4-83-240-67-251.cust.nbox.cz ([83.240.67.251]:53102 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751510AbbD3JZS (ORCPT ); Thu, 30 Apr 2015 05:25:18 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.85) (envelope-from ) id 1YnkiW-0005PB-DA; Thu, 30 Apr 2015 11:25:12 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: Steve Capper , Christoffer Dall , Shannon Zhao , Jiri Slaby Subject: [patch added to the 3.12 stable tree] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Date: Thu, 30 Apr 2015 11:24:59 +0200 Message-Id: <1430385911-20480-51-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1430385911-20480-1-git-send-email-jslaby@suse.cz> References: <1430385911-20480-1-git-send-email-jslaby@suse.cz> 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: patch@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.46 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 This patch has been added to the 3.12 stable tree. If you have any objections, please let us 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);