Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6302868ybx; Mon, 11 Nov 2019 07:08:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzkRuGY263zkkY0kRo3LO3PTQj3SG/XRIxH/y03+a5XNVGaP88QshNbIox0Kxwb3RwhO0rM X-Received: by 2002:a17:906:e88:: with SMTP id p8mr22929312ejf.15.1573484901911; Mon, 11 Nov 2019 07:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573484901; cv=none; d=google.com; s=arc-20160816; b=cm6qZ/MoS671FoG80JBKmhHfA6vaCwEiSDt5XLXCuA0DoC0ygnVMMsJ/TFwqcuEglb bJgl4neWH5G46a4Nx6+q08MhWeZ7hNtsVoJKBHyfhmWwkZga/r8H0M+N73ufutoUDIRQ iCdO7pLiFzLnm9PkqhGjZmh2buv8pv5yt3B87kpVcxAmAZh/eEwxQCYZIgTArPfki36w L3+/2ASYhI+H4CTo0UH6w28EZp4WJ72i+AMiqLrmDdgACmKgdkNvMkBNlzb7d2HL+/N1 6jc3wqbczsotd5D8izDYAvbFtQgxq4hEcRUmKwB//Dfma9kyuhd8pzcTlG9wQbKMF2io 9p5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sM5Ma/ceO5kgz6NyN1q369DMx1gXO7OfmUTBnAwgAzE=; b=XKawR/4nA7SUkPQNr8Pziy1zfSq+4CFUiPG68Q2NtBJxxVd8OJfUAjhrKxZvw3pydu LrmtnPCGLAwudkYKAmXfFUJ21JNgHQWOre0rftiLq+Km7maqpRnCMDjt3BqK/Lt2Mh/9 Xo1f4llrsRZzvlZjo3IgZd/V6Axutj5TGqRHf4iz9bKY9/R29lkKBfb/Ju2rP4iVenYS SAuXZIGXdSWRCz5S8lQ0BBQQngSY+9ySwjyMbGnaumTdYEe1vyksy15TJdfiF1IjAF5o xfrbmoldAcBX6OYWDvgWhQuB/HdHo39wER4NlFs7NJWANVVovqeH8XgXNlL+Su06pp9W HUsQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si9530783ejj.373.2019.11.11.07.07.56; Mon, 11 Nov 2019 07:08:21 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726973AbfKKPGi (ORCPT + 99 others); Mon, 11 Nov 2019 10:06:38 -0500 Received: from 8bytes.org ([81.169.241.247]:51336 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726843AbfKKPGi (ORCPT ); Mon, 11 Nov 2019 10:06:38 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 872C61E6; Mon, 11 Nov 2019 16:06:32 +0100 (CET) Date: Mon, 11 Nov 2019 16:06:31 +0100 From: Joerg Roedel To: Yian Chen Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, David Woodhouse , Ashok Raj , Sohil Mehta , Tony Luck , Lu Baolu , Ravi Shankar Subject: Re: [PATCH v2] iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved Message-ID: <20191111150630.GF18333@8bytes.org> References: <20191017113919.25424-1-yian.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191017113919.25424-1-yian.chen@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 17, 2019 at 04:39:19AM -0700, Yian Chen wrote: > VT-d RMRR (Reserved Memory Region Reporting) regions are reserved > for device use only and should not be part of allocable memory pool of OS. > > BIOS e820_table reports complete memory map to OS, including OS usable > memory ranges and BIOS reserved memory ranges etc. > > x86 BIOS may not be trusted to include RMRR regions as reserved type > of memory in its e820 memory map, hence validate every RMRR entry > with the e820 memory map to make sure the RMRR regions will not be > used by OS for any other purposes. > > ia64 EFI is working fine so implement RMRR validation as a dummy function > > Reviewed-by: Lu Baolu > Reviewed-by: Sohil Mehta > Signed-off-by: Yian Chen > --- > v2: > - return -EINVAL instead of -EFAULT when there is an error > --- > arch/ia64/include/asm/iommu.h | 5 +++++ > arch/x86/include/asm/iommu.h | 18 ++++++++++++++++++ > drivers/iommu/intel-iommu.c | 8 +++++++- > 3 files changed, 30 insertions(+), 1 deletion(-) Applied, thanks.