Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2014 15:43:23 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: [PATCH] Support PCIe Alternative RID Interpretation (ARI)
Message-ID:  <CAFMmRNyZpMXf9gOOufsojZV3coSoLSmyMKTE_i5Bern038EKsQ@mail.gmail.com>
In-Reply-To: <20140330142918.GF21331@kib.kiev.ua>
References:  <20140316141216.GA21331@kib.kiev.ua> <CAFMmRNwormaaPXk6rJ-JJGePS6fDNFsdKAfmmW2jGLNRscf1Pw@mail.gmail.com> <CAFgRE9F632zLseG7MobxgV5CdvD0KyMn28CBSwYqVtZKuLBwRw@mail.gmail.com> <CAFMmRNwCGVhyn5cU29YpsVq44Q5i51C38GVsz33xGeqNyemx0Q@mail.gmail.com> <20140319140236.GM21331@kib.kiev.ua> <CAFMmRNxM1E2aNtZV588V3BGkz1aOaGgAXGbgktYrmzT9M3EyVw@mail.gmail.com> <20140325211355.GG21331@kib.kiev.ua> <CAFMmRNxQRJ2g9Ohu%2BXgj=tQ=tUrTdMQx1KSdd1k%2BjGMOtCZLEA@mail.gmail.com> <20140328133529.GV21331@kib.kiev.ua> <CAFMmRNyLMvTpejhCUov1rnGD4A3Amsz%2BWLbxdhpjHybW69WrKg@mail.gmail.com> <20140330142918.GF21331@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 30, 2014 at 10:29 AM, Konstantin Belousov
<kostikbel@gmail.com> wrote:
>> http://people.freebsd.org/~rstone/patches/ari/0002-Re-implement-the-DMAR-I-O-MMU-code-in-terms-of-PCI-R.patch
>
> I like this patch.
>
> One, trivial note, you do not need () there:
> +       ctxp += (ctx->rid & 0xff);
>

Done.

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.

The current version of the patch is in the same location.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNyZpMXf9gOOufsojZV3coSoLSmyMKTE_i5Bern038EKsQ>