Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-10-02 Thread David Woodhouse
On Sat, 2013-09-21 at 21:59 -0500, David Woodhouse wrote: > Here's a completely untested work-in-progress that attempts to fix that. > I'll be able to test it myself on about Tuesday when I'm home from New > Orleans and awake... Or might have been if my laptop's hard drive hadn't died. Here's an u

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 23:15 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 15:46 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > > > I wouldn't bother to go looking for opportunities to use super pages if > > > we remove the last non-SP-capable I

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 15:46 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > > I wouldn't bother to go looking for opportunities to use super pages if > > we remove the last non-SP-capable IOMMU from the domain. > > I predict bugs getting filed if a guest

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 21:11 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 13:44 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > > > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > > > On Wed, 2013-09-25 at 17:05 +0100, David Woodho

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 13:44 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > > > Why would it ever care? If it *happens* to map

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 19:52 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > > Why would it ever care? If it *happens* to map something that can use > > > large pages, yay!. If it subsequently

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 11:36 -0600, Alex Williamson wrote: > On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > > Why would it ever care? If it *happens* to map something that can use > > large pages, yay!. If it subsequently breaks apart those large pages by > > unmapping 4KiB in the middl

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 17:05 +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > > actually clearly documented anywhere?

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Joerg Roedel
On Wed, Sep 25, 2013 at 05:05:13PM +0100, David Woodhouse wrote: > On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > > Yeah, I agree that this should be documented since it is quite > > non-standard/non-obvious behaviour of a function. The reason the > > interface was implemented this way is

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread David Woodhouse
On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > actually clearly documented anywhere? Why on earth is it not just > > returning void, and expected to un

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Alex Williamson
On Wed, 2013-09-25 at 17:54 +0200, Joerg Roedel wrote: > On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > > I *hate* the bizarre calling convention for iommu_unmap(). Is it > > actually clearly documented anywhere? Why on earth is it not just > > returning void, and expected to un

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-25 Thread Joerg Roedel
On Sat, Sep 21, 2013 at 09:59:00PM -0500, David Woodhouse wrote: > I *hate* the bizarre calling convention for iommu_unmap(). Is it > actually clearly documented anywhere? Why on earth is it not just > returning void, and expected to unmap what it was *asked* to unmap? Yeah, I agree that this shou

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-21 Thread David Woodhouse
On Mon, 2013-09-02 at 02:24 +, Shankar, Hari wrote: > Patch Description: The patch is for Intel IOMMU driver. It forces > IOMMU TLB flush for the particular domain and return correct unmap > size when intel_iommu_unmap() is called I *hate* the bizarre calling convention for iommu_unmap(). Is i

[PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-06 Thread Shankar, Hari
Patch Description: The patch is for Intel IOMMU driver. It forces IOMMU TLB flush for the particular domain and return correct unmap size when intel_iommu_unmap() is called The patch is generated on Linux kernel version 3.6.11 --- linux/drivers/iommu/intel-iommu.c.orig 2013-09-01 10:10:14.

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-06 Thread Shankar, Hari
Hi Alex, See inline, On 9/2/13 9:25 PM, "Alex Williamson" wrote: >Hi Hari, > >On Mon, 2013-09-02 at 02:24 +, Shankar, Hari wrote: >> Patch Description: The patch is for Intel IOMMU driver. It forces IOMMU >>TLB flush for the particular domain and return correct unmap size when >>intel_iommu_

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-04 Thread Alex Williamson
On Thu, 2013-09-05 at 04:05 +, Shankar, Hari wrote: > Hi Alex, > See inline, > > On 9/2/13 9:25 PM, "Alex Williamson" wrote: > > >Hi Hari, > > > >On Mon, 2013-09-02 at 02:24 +, Shankar, Hari wrote: > >> Patch Description: The patch is for Intel IOMMU driver. It forces IOMMU > >>TLB flush

Re: [PATCH] On unmap, flush IOMMU TLB and return correct size

2013-09-02 Thread Alex Williamson
Hi Hari, On Mon, 2013-09-02 at 02:24 +, Shankar, Hari wrote: > Patch Description: The patch is for Intel IOMMU driver. It forces IOMMU TLB > flush for the particular domain and return correct unmap size when > intel_iommu_unmap() is called "Patch Description:" is unnecessary. Look at other