Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp255861ybd; Tue, 25 Jun 2019 20:51:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9LJaMPYx1/lj1X1rKNrlTHjApheorewFMnSAinfXD7ni85E2qyRCsiQUMX5Ue/DAeOdzh X-Received: by 2002:a17:90a:2228:: with SMTP id c37mr1869087pje.9.1561521116605; Tue, 25 Jun 2019 20:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521116; cv=none; d=google.com; s=arc-20160816; b=AiJbQj9wCM0BfpVzEYWrNUCELk9uMQCNroM0xfzx7xyqn40ny+OaUUI24byITshiqy VvFabhRBTlMe+ZNbb8P521eU+/kaw93K/h+sEtGYvmSsEBhIzwoFMtjrRLbw/u5LKj5K 3Mv+5srPmb2EGXZc4pjsUtCvNMtRrY8MZaH8fSysv9tpPHHHqrsAxindCko2kexYDJJb Gg8kG9pw/Zal2wP1MVvd4wyksUJge3KKrK1fgVv8K7vkKy+Mqy7evcsheWobAyU7sIS4 4EYXF5YFuEHpsKCtx247nAyL6v0O4bIMoGluM8rEYxBt5n9JGtvxo7mQgc/RRnHE3ly9 nf5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5YFd/EtWSjMVB1XVU2JKujGs9/BcpLSQa9FJsbnoi9U=; b=lV1HUEGyGeLKHUPJbKkeVNoomHMEP0l7IRIN8eRFbbJNqH/hOcollmZBkwuL/o3MVY WrK6tABiBxF7bsO6hz6gnmXGxejT4/amr2V9K9OcNKfiuFYc5mK4tHopPmaDCEs4d1rF rD+nYG61Sn8T237lqsyONs54/Q4DkhaGnouVm0oS5+6EmX6/mwunf8QgHBYHWBvHTF5l P5e+OBH8hb2bv/pk6SSWqySFP1VWe4TkORZxwdkvVG7jltjovIKh2rz3+5BHcclAb6qE eOnZQR7I66J4MQvC1/siOOLi0UPEgfgwLOUNQs37sgkgXuUnvJcvWh1motbunnZS9fCi GfJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hnSsdWGT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si14379849pgq.275.2019.06.25.20.51.40; Tue, 25 Jun 2019 20:51:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hnSsdWGT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727611AbfFZDuz (ORCPT + 99 others); Tue, 25 Jun 2019 23:50:55 -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