From owner-svn-src-head@freebsd.org Sun Jul 14 21:13:35 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 37091A74AF; Sun, 14 Jul 2019 21:13:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80D3F8D7B3; Sun, 14 Jul 2019 21:13:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x6ELDRgh091244 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 15 Jul 2019 00:13:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x6ELDRgh091244 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x6ELDQDC091243; Mon, 15 Jul 2019 00:13:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 15 Jul 2019 00:13:26 +0300 From: Konstantin Belousov To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r349988 - head/sys/x86/iommu Message-ID: <20190714211326.GU47193@kib.kiev.ua> References: <201907142108.x6EL8sA1089787@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201907142108.x6EL8sA1089787@repo.freebsd.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jul 2019 21:13:35 -0000 On Sun, Jul 14, 2019 at 09:08:54PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sun Jul 14 21:08:54 2019 > New Revision: 349988 > URL: https://svnweb.freebsd.org/changeset/base/349988 In dmar_find(), refuse to search for DMAR unit for non-PCI device. Eventually this should be reworked, because ACPI DMAR table can specify ANND entries for scoping ACPI namespace enumerated devices. But code to match DMAR unit against such device is missed currently anyway. Sorry. > > Log: > PR: 239143 > Reported and tested by: Wes Maag > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > Modified: > head/sys/x86/iommu/intel_drv.c > > Modified: head/sys/x86/iommu/intel_drv.c > ============================================================================== > --- head/sys/x86/iommu/intel_drv.c Sun Jul 14 16:05:47 2019 (r349987) > +++ head/sys/x86/iommu/intel_drv.c Sun Jul 14 21:08:54 2019 (r349988) > @@ -770,6 +770,13 @@ dmar_find(device_t dev, bool verbose) > const char *banner; > int i, dev_domain, dev_busno, dev_path_len; > > + /* > + * This function can only handle PCI(e) devices. > + */ > + if (device_get_devclass(device_get_parent(dev)) != > + devclass_find("pci")) > + return (NULL); > + > dmar_dev = NULL; > dev_domain = pci_get_domain(dev); > dev_path_len = dmar_dev_depth(dev);