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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 7B469C4646B for ; Wed, 26 Jun 2019 03:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CC55205ED for ; Wed, 26 Jun 2019 03:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561521057; bh=42DavxmMtdOChN4Oo9N6dOlybAxZJaVMXYFtZzoSW/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pNl0QGSerZCwoZOX+aRnRpTuegubRwdXZKr9HONVkS13IU2h6rFk0Ts8GefPw/Td1 jOQIMVdhWcUkAhRwRyNHuEoOeNStT1kCW/92z1uvXKZ+oNoTYg1feNq/oW1Ldb12mW seGY5OUCExhk5P57tCEJOxZnBue90LXJzvk58JzU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727641AbfFZDu4 (ORCPT ); Tue, 25 Jun 2019 23:50:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726849AbfFZDlk (ORCPT ); Tue, 25 Jun 2019 23:41:40 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC977214DA; Wed, 26 Jun 2019 03:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520499; bh=42DavxmMtdOChN4Oo9N6dOlybAxZJaVMXYFtZzoSW/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hnSsdWGT9jNveGAooIb4wdW5urd1OFoSu9ZwnEGyVNiyF8u+Sb291lOqI8C6qsNZl DW6VL17spALLCOiU4p34FMNvQyR/yYmdukvz0+H9fArof1jFd9zcEvyDJOI1xlY6vp 7AVuFRwMaoyHRSRAdpPj9buX9hPa9OIEcaPxWQaE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lu Baolu , Dave Jiang , Joerg Roedel , Sasha Levin , iommu@lists.linux-foundation.org Subject: [PATCH AUTOSEL 5.1 10/51] iommu/vt-d: Set the right field for Page Walk Snoop Date: Tue, 25 Jun 2019 23:40:26 -0400 Message-Id: <20190626034117.23247-10-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lu Baolu [ 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