From: Ian Campbell Subject: Re: Realtime access to PCI NIC Date: Tue, 8 Jul 2014 15:46:25 +0100 Message-ID: <1404830785.24591.2.camel@kazak.uk.xensource.com> References: <524794479.20140703121338@gmail.com> <20140703180957.GD13710@konrad-lan.dumpdata.com> <1376452421.20140707092147@gmail.com> <1083121389.20140707122233@gmail.com> <724187406.20140707132106@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <724187406.20140707132106@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Simon Martin Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-07-07 at 13:21 +0100, Simon Martin wrote: > Hi all, > > I am reading through the mini-os pcifront.c as an example of how to > implement direct access to a PCI device. However looking at the code > all access seems to go via the PCI Backend driver, which means that I > am subject to the latencies and jitter of the Xen scheduling. Only PCI cfg reads/writes go via the backend, I think. Any MMIO space (i.e. described in the PCI BARS) can be directly mapped, likewise for the IO port spaces associated with the device. I think PCI cfg space is only generally used during probing/setup etc. Hopefully you don't need to poke it at runtime? > Reading the documentation about PCI Passthrough I imagined that I > would have direct access to the PCI hardware once the handover from > dom0 as performed. Is that correct? If so, how do I implement that? > > I am using an Intel processor that has VT-d so that should be > possible. Right, VT-d allows the MMIO stuff to be mapped to an HVM guest (PV doesn't even need that), but unfortunately there are bits in the pci cfg space which even a guest with the device passed to it shouldn't be able to mess with (I don't know the details though). Ian.