Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Peter Xu
On Mon, Jun 24, 2019 at 12:11:54PM +0200, Paolo Bonzini wrote: > On 24/06/19 11:09, Peter Xu wrote: > > On Mon, Jun 24, 2019 at 10:43:21AM +0200, Paolo Bonzini wrote: > >> On 24/06/19 10:06, Peter Xu wrote: > >>> Well, if with such an error we'd better fix it right away in this > >>> patch... :) >

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Paolo Bonzini
On 24/06/19 11:09, Peter Xu wrote: > On Mon, Jun 24, 2019 at 10:43:21AM +0200, Paolo Bonzini wrote: >> On 24/06/19 10:06, Peter Xu wrote: >>> Well, if with such an error we'd better fix it right away in this >>> patch... :) >>> >>> Let me wait for some more comments, I'll touch that up too if I nee

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Peter Xu
On Mon, Jun 24, 2019 at 10:43:21AM +0200, Paolo Bonzini wrote: > On 24/06/19 10:06, Peter Xu wrote: > > Well, if with such an error we'd better fix it right away in this > > patch... :) > > > > Let me wait for some more comments, I'll touch that up too if I need a > > repost. > > Looks good to me

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Paolo Bonzini
On 24/06/19 10:06, Peter Xu wrote: > Well, if with such an error we'd better fix it right away in this > patch... :) > > Let me wait for some more comments, I'll touch that up too if I need a > repost. Looks good to me, except for one minor issue in this patch. But do not attribute this one to m

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Yan Zhao
Tested-by: Yan Zhao On Mon, Jun 24, 2019 at 02:37:33PM +0800, Peter Xu wrote: > From: Paolo Bonzini > > This is an replacement work of Yan Zhao's patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html > > vtd_address_space_unmap() will do proper page mask alignment to ma

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Peter Xu
On Mon, Jun 24, 2019 at 03:04:50AM -0400, Yan Zhao wrote: [...] > I think it might be helpful if there anything wrong in code. > for example, when previously, size = end - start, it will happen that > size will eventually be less than page size. Well, if with such an error we'd better fix it rig

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-24 Thread Yan Zhao
On Mon, Jun 24, 2019 at 02:57:50PM +0800, Peter Xu wrote: > On Mon, Jun 24, 2019 at 02:41:22AM -0400, Yan Zhao wrote: > > On Mon, Jun 24, 2019 at 02:37:33PM +0800, Peter Xu wrote: > > > From: Paolo Bonzini > > > > > > This is an replacement work of Yan Zhao's patch: > > > > > > https://www.mail-

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-23 Thread Peter Xu
On Mon, Jun 24, 2019 at 02:41:22AM -0400, Yan Zhao wrote: > On Mon, Jun 24, 2019 at 02:37:33PM +0800, Peter Xu wrote: > > From: Paolo Bonzini > > > > This is an replacement work of Yan Zhao's patch: > > > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html > > > > vtd_address_sp

Re: [Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-23 Thread Yan Zhao
On Mon, Jun 24, 2019 at 02:37:33PM +0800, Peter Xu wrote: > From: Paolo Bonzini > > This is an replacement work of Yan Zhao's patch: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html > > vtd_address_space_unmap() will do proper page mask alignment to make > sure each IOTLB m

[Qemu-devel] [PATCH 2/2] intel_iommu: Fix unexpected unmaps during global unmap

2019-06-23 Thread Peter Xu
From: Paolo Bonzini This is an replacement work of Yan Zhao's patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg625340.html vtd_address_space_unmap() will do proper page mask alignment to make sure each IOTLB message will have correct masks for notification messages (2^N-1), but some