Re: [Qemu-devel] [PATCH v6 15/18] intel_iommu: provide its own replay() callback

2017-02-07 Thread Peter Xu
On Tue, Feb 07, 2017 at 02:10:45PM +0800, Jason Wang wrote: > > > On 2017年02月03日 16:22, Peter Xu wrote: > >+trace_vtd_replay_ce_valid(bus_n, PCI_SLOT(vtd_as->devfn), > >+ PCI_FUNC(vtd_as->devfn), > >+ VTD_CONTEXT_ENTRY_DID(

Re: [Qemu-devel] [PATCH v6 15/18] intel_iommu: provide its own replay() callback

2017-02-06 Thread Jason Wang
On 2017年02月03日 16:22, Peter Xu wrote: +trace_vtd_replay_ce_valid(bus_n, PCI_SLOT(vtd_as->devfn), + PCI_FUNC(vtd_as->devfn), + VTD_CONTEXT_ENTRY_DID(ce.hi), + ce.hi, ce.lo); +vtd_pa

[Qemu-devel] [PATCH v6 15/18] intel_iommu: provide its own replay() callback

2017-02-03 Thread Peter Xu
The default replay() don't work for VT-d since vt-d will have a huge default memory region which covers address range 0-(2^64-1). This will normally consumes a lot of time (which looks like a dead loop). The solution is simple - we don't walk over all the regions. Instead, we jump over the regions