Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-16 Thread Jason Wang
On 2017年01月16日 16:06, Peter Xu wrote: On Mon, Jan 16, 2017 at 04:03:22PM +0800, Jason Wang wrote: [...] Though I haven't tested with huge pages yet, but this patch should both solve above issue? I don't know whether you went over the page walk logic - it should both support huge page, and

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-16 Thread Peter Xu
On Mon, Jan 16, 2017 at 04:03:22PM +0800, Jason Wang wrote: [...] > >>>Though I haven't tested with huge pages yet, but this patch should > >>>both solve above issue? I don't know whether you went over the page > >>>walk logic - it should both support huge page, and it will skip > >>>unmapped

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-16 Thread Jason Wang
On 2017年01月16日 15:59, Peter Xu wrote: On Mon, Jan 16, 2017 at 03:47:08PM +0800, Jason Wang wrote: On 2017年01月16日 15:31, Peter Xu wrote: On Fri, Jan 13, 2017 at 05:26:06PM +0800, Jason Wang wrote: On 2017年01月13日 11:06, Peter Xu wrote: The default replay() don't work for VT-d since vt-d

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-16 Thread Peter Xu
On Mon, Jan 16, 2017 at 03:47:08PM +0800, Jason Wang wrote: > > > On 2017年01月16日 15:31, Peter Xu wrote: > >On Fri, Jan 13, 2017 at 05:26:06PM +0800, Jason Wang wrote: > >> > >>On 2017年01月13日 11:06, Peter Xu wrote: > >>>The default replay() don't work for VT-d since vt-d will have a huge >

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-15 Thread Jason Wang
On 2017年01月16日 15:31, Peter Xu wrote: On Fri, Jan 13, 2017 at 05:26:06PM +0800, Jason Wang wrote: On 2017年01月13日 11:06, Peter Xu wrote: 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 bring

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-15 Thread Peter Xu
On Fri, Jan 13, 2017 at 05:26:06PM +0800, Jason Wang wrote: > > > On 2017年01月13日 11:06, Peter Xu wrote: > >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 bring a dead loop when guest

Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-13 Thread Jason Wang
On 2017年01月13日 11:06, Peter Xu wrote: 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 bring a dead loop when guest starts. I think it just takes too much time instead of dead loop? The

[Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback

2017-01-12 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 bring a dead loop when guest starts. The solution is simple - we don't walk over all the regions. Instead, we jump over the regions when we found