From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 845F9C606C1 for ; Mon, 8 Jul 2019 15:31:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54291217D9 for ; Mon, 8 Jul 2019 15:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599867; bh=tBGJppEdGFFvrxTeTzEIabKLeJJ5I527rwRcoTmsQ8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=YezQnhGLpbsIzHnmabRjUbvsSMCwakbL5trIcduwiE89OozLfv7iaemPazMY6sQ0w NgUcyT4m1DBFWPoIaq9gciyWVRDpnzbrOIqXXQNmItkoBA3oLqoFoiaOjxlqeh80l5 PiluhSF7UGTuofyRnd1zKFVH2Ce7WPBzdwneRPxs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389629AbfGHPbG (ORCPT ); Mon, 8 Jul 2019 11:31:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:60340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389568AbfGHPbE (ORCPT ); Mon, 8 Jul 2019 11:31:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B7B01204EC; Mon, 8 Jul 2019 15:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599864; bh=tBGJppEdGFFvrxTeTzEIabKLeJJ5I527rwRcoTmsQ8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AlHKc8zKoT9h96OyCacqb/hfu2qOd09uEkNFfLdOEQL9hqObLjyW+AOi17aFR8gaG WZ7YZ9K06TIIJ+f/M0CE2Rkyf+DI+vBXskDLHCX64iFDuqXnoMNG9R73zRZCJMje51 3rJSCQnt5AlnbmAc2n1HE7kQoKJRwyVf9Qxvik5Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Jiang , Lu Baolu , Joerg Roedel , Sasha Levin Subject: [PATCH 5.1 15/96] iommu/vt-d: Set the right field for Page Walk Snoop Date: Mon, 8 Jul 2019 17:12:47 +0200 Message-Id: <20190708150527.220399058@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150526.234572443@linuxfoundation.org> References: <20190708150526.234572443@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 66d78ad316b0e1ca5ae19663468554e2c0e31c26 ] Set the page walk snoop to the right bit, otherwise the domain id field will be overlapped. Reported-by: Dave Jiang Fixes: 6f7db75e1c469 ("iommu/vt-d: Add second level page table interface") Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/intel-pasid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel-pasid.c index 03b12d2ee213..fdf05c45d516 100644 --- a/drivers/iommu/intel-pasid.c +++ b/drivers/iommu/intel-pasid.c @@ -387,7 +387,7 @@ static inline void pasid_set_present(struct pasid_entry *pe) */ static inline void pasid_set_page_snoop(struct pasid_entry *pe, bool value) { - pasid_set_bits(&pe->val[1], 1 << 23, value); + pasid_set_bits(&pe->val[1], 1 << 23, value << 23); } /* -- 2.20.1