From patchwork Mon May 4 01:52:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47971 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E795B2121F for ; Mon, 4 May 2015 01:56:09 +0000 (UTC) Received: by wixv7 with SMTP id v7sf30737178wix.0 for ; Sun, 03 May 2015 18:56:09 -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=qsKzMYPF744c+5f+JggIFNAbTBhy073yTdEStEcOVEc=; b=YLCkfmN9OdkNpenIFMvEi31bESUbjP3asV6tqgh6kuqRx2pvsn0/28TIyzYtETisVz YVsxJe9NmSX2+yR+GPh+fOaClPj0OjBug8M90FQGG0bnjfHq72jYDykeIGuAsk2OomN0 OBbA0R8QRcmvrVDURQyrQ6TMGG/mkKJ6pMBsVGH1l4xrpt95tKup7N/PEUNhFjY9dmFe cShxznkz5Til8zLck0ce42HSmGskahmooDzw3EVFPOXIFJkTtGJi9QMlfVfhkbtBmGGS zcMdaixM7miSzdp4ReDauAM8ll+x/VVqmAX7G3LWp+nqsOR+VF1OcESMs9f2UEepxANn E5Wg== X-Gm-Message-State: ALoCoQmpdByPVeRlVPlJ2VkoDy1ciHR19NmYY7Bm6pLuIbjhUYYVABWxX36Z4Ysz6Kz/Jik5572v X-Received: by 10.112.130.71 with SMTP id oc7mr16968510lbb.23.1430704569237; Sun, 03 May 2015 18:56:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.70 with SMTP id 6ls652427las.14.gmail; Sun, 03 May 2015 18:56:09 -0700 (PDT) X-Received: by 10.112.125.138 with SMTP id mq10mr17962683lbb.35.1430704569099; Sun, 03 May 2015 18:56:09 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id pw2si9106184lbb.33.2015.05.03.18.56.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbzk7 with SMTP id zk7so95772113lbb.0 for ; Sun, 03 May 2015 18:56:09 -0700 (PDT) X-Received: by 10.152.27.1 with SMTP id p1mr17277795lag.112.1430704569013; Sun, 03 May 2015 18:56:09 -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 l1csp1413123lbt; Sun, 3 May 2015 18:56:08 -0700 (PDT) X-Received: by 10.68.216.99 with SMTP id op3mr38385988pbc.69.1430704568119; Sun, 03 May 2015 18:56:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix6si17838787pac.46.2015.05.03.18.56.07; Sun, 03 May 2015 18:56:08 -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 S1751961AbbEDB4G (ORCPT + 2 others); Sun, 3 May 2015 21:56:06 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:33879 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751962AbbEDB4G (ORCPT ); Sun, 3 May 2015 21:56:06 -0400 Received: by pacyx8 with SMTP id yx8so147806878pac.1 for ; Sun, 03 May 2015 18:56:05 -0700 (PDT) X-Received: by 10.66.250.131 with SMTP id zc3mr36036797pac.136.1430704565772; Sun, 03 May 2015 18:56:05 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id zf1sm11014270pbc.43.2015.05.03.18.56.04 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:56:04 -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 33/47] arm: kvm: STRICT_MM_TYPECHECKS fix for user_mem_abort Date: Mon, 4 May 2015 09:52:28 +0800 Message-Id: <1430704362-6292-34-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430704362-6292-1-git-send-email-shannon.zhao@linaro.org> References: <1430704362-6292-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.217.174 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 8a677ae..8a998e0 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)); }