From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 11:38:20 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC8386E6 for ; Tue, 1 Apr 2014 11:38:20 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B35B66B for ; Tue, 1 Apr 2014 11:38:20 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.8/8.14.8) with ESMTP id s31BcEKD005666; Tue, 1 Apr 2014 14:38:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s31BcEKD005666 Received: (from kostik@localhost) by tom.home (8.14.8/8.14.8/Submit) id s31BcE61005665; Tue, 1 Apr 2014 14:38:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Apr 2014 14:38:14 +0300 From: Konstantin Belousov To: Ryan Stone Subject: Re: [PATCH] Support PCIe Alternative RID Interpretation (ARI) Message-ID: <20140401113814.GL21331@kib.kiev.ua> References: <20140319140236.GM21331@kib.kiev.ua> <20140325211355.GG21331@kib.kiev.ua> <20140328133529.GV21331@kib.kiev.ua> <20140330142918.GF21331@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ensexbfp9Ul6anXl" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2014 11:38:20 -0000 --ensexbfp9Ul6anXl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 30, 2014 at 03:43:23PM -0400, Ryan Stone wrote: > On Sun, Mar 30, 2014 at 10:29 AM, Konstantin Belousov > wrote: > >> http://people.freebsd.org/~rstone/patches/ari/0002-Re-implement-the-DM= AR-I-O-MMU-code-in-terms-of-PCI-R.patch > > > > I like this patch. > > > > One, trivial note, you do not need () there: > > + ctxp +=3D (ctx->rid & 0xff); > > >=20 > Done. >=20 > Unfortunately I had to re-write it a bit to account for the changes in > r263306. Mostly it was trivial, but there's one thing that I wasn't > sure how best to handle. busdma_dmar.c currently calls > dmar_bus_dma_is_dev_disabled with the bus/slot/function provided by > dmar_get_requestor. That no longer works now that I've made the code > be based on RIDs. What the patch currently does is use the > bus/slot/function from the requester device. I think that's a little > cleaner anyway because in one case the current code fakes up a slot > and function. Using those values in the UI for forcing DMAR off for a > device feels wrong to me (and difficult to document). However, my > behaviour of forcing users to manually walk up the PCI tree to find > the PCIe-PCI bridge is not really all that much better. If you have > ideas here please let me know. I think that the current behaviour is just a bug, and your change is for better. When you need to disable specific device from using non-identity mapping, it means that you are already very much down the hole. The VT-d busdma is not enabled by default, only people who experimenting with it are potentially affected, so I see no problem. >=20 > The current version of the patch is in the same location. Fine with me. --ensexbfp9Ul6anXl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQIcBAEBAgAGBQJTOqUlAAoJEJDCuSvBvK1BgE4P/AxIYvlSfSf2yfG5ndC/EukB 6HaBDbqlUqNbK35QVWxxYk9nuWHryxygeNvJGtyTh1V1d+bOXWzfAoqV5TwBs0u9 aj+MpwXbaluuPbECyw3QxPOaYoh2aM2ejaWyZvIJBG8RycVrNNhesFvb+rHovA8V jMHPTXVVZOsHRGyfNOFftfTd6rR9t1hCHDLrlPoAAkeBXJBsllTO6DmqagLIfqVt tqfor7kL7mXQqxPynjGJC9bPlr58xoCIWcJNVS9w5Gfcm+6FEbvKlzETWaHXt2Sr e7QboO1T+H4NpN52bZ+6YaZ1KZsvlqWOq3V6sMDOBzBJpGBAYd352Gaf8Jfv4BCR pexEO+inqN2mAoeJnMB5EZaOm5byYZ5ZDM2mK8CREzih6tN43AxBa9Ulqu/r8Zz+ XszU7T5fCDj3xBtPcLs1a0IBFLXWJuwOjyLULka7TyHW2kC4AZGz81gmGVqArA8l Do241GBDtBSbTbQ4BBJvqOGj9AkY7LRqShC8NDNAqCgjZkGsyDu8ZJFAg+idbsL0 laKtovJ1kXzsQUBD0Y+QeszHpoXPxdUyORiJFxFxs7x3+j4cW0gsPEdeWZotY1rJ ptDv6SSwIVObzJqv68lmvgU3htjGRH51iF8uEGruk0L72FXG2cLsSXqltfQKUS7l 6AAlWuNP3fOGpTBYoKyg =0phw -----END PGP SIGNATURE----- --ensexbfp9Ul6anXl--