linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* question on "powerpc/pseries/dma: Allow SWIOTLB"
@ 2019-07-19  7:10 Christoph Hellwig
  2019-07-19  7:52 ` Alexey Kardashevskiy
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2019-07-19  7:10 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: linuxppc-dev

Hey Alexey,

what is the use case for the above commit?  Shouldn't we handle all
addressing limits using the iommu?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  7:10 question on "powerpc/pseries/dma: Allow SWIOTLB" Christoph Hellwig
@ 2019-07-19  7:52 ` Alexey Kardashevskiy
  2019-07-19  7:53   ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Kardashevskiy @ 2019-07-19  7:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linuxppc-dev



On 19/07/2019 17:10, Christoph Hellwig wrote:
> Hey Alexey,
> 
> what is the use case for the above commit?  Shouldn't we handle all
> addressing limits using the iommu?

Our secure VMs is the use case, when only a fraction of system memory is 
available for DMA.


-- 
Alexey

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  7:52 ` Alexey Kardashevskiy
@ 2019-07-19  7:53   ` Christoph Hellwig
  2019-07-19  8:00     ` Alexey Kardashevskiy
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2019-07-19  7:53 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: Christoph Hellwig, linuxppc-dev

On Fri, Jul 19, 2019 at 05:52:37PM +1000, Alexey Kardashevskiy wrote:
> 
> 
> On 19/07/2019 17:10, Christoph Hellwig wrote:
> > Hey Alexey,
> > 
> > what is the use case for the above commit?  Shouldn't we handle all
> > addressing limits using the iommu?
> 
> Our secure VMs is the use case, when only a fraction of system memory is
> available for DMA.

But shouldn't we force usage of the direct ops in that case as the
IOMMU is not neededed at all?  Also isn't that support non-upstream so
far?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  7:53   ` Christoph Hellwig
@ 2019-07-19  8:00     ` Alexey Kardashevskiy
  2019-07-19  8:05       ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Kardashevskiy @ 2019-07-19  8:00 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linuxppc-dev



On 19/07/2019 17:53, Christoph Hellwig wrote:
> On Fri, Jul 19, 2019 at 05:52:37PM +1000, Alexey Kardashevskiy wrote:
>>
>>
>> On 19/07/2019 17:10, Christoph Hellwig wrote:
>>> Hey Alexey,
>>>
>>> what is the use case for the above commit?  Shouldn't we handle all
>>> addressing limits using the iommu?
>>
>> Our secure VMs is the use case, when only a fraction of system memory is
>> available for DMA.
> 
> But shouldn't we force usage of the direct ops in that case as the
> IOMMU is not neededed at all?

We do, for mappings, but not unmappings and syncing.

> Also isn't that support non-upstream so far?

How is this relevant? I expect the existing "swiotlb=force" just work.


-- 
Alexey

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  8:00     ` Alexey Kardashevskiy
@ 2019-07-19  8:05       ` Christoph Hellwig
  2019-07-19  8:23         ` Alexey Kardashevskiy
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2019-07-19  8:05 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: Christoph Hellwig, linuxppc-dev

On Fri, Jul 19, 2019 at 06:00:25PM +1000, Alexey Kardashevskiy wrote:
> > But shouldn't we force usage of the direct ops in that case as the
> > IOMMU is not neededed at all?
> 
> We do, for mappings, but not unmappings and syncing.

Well, I mean as in literally not setting a dma_ops so that the
dma_direct code is used without the indirection through the iommu ops.
This is not only more obvious, but also faster as you avoid the
indirect call (although that probably doesn't matter much if you
are bounce buffering anyway).

> > Also isn't that support non-upstream so far?
> 
> How is this relevant? I expect the existing "swiotlb=force" just work.

I though the whole secure VM support was still not upstream.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  8:05       ` Christoph Hellwig
@ 2019-07-19  8:23         ` Alexey Kardashevskiy
  2019-07-19 12:25           ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Kardashevskiy @ 2019-07-19  8:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linuxppc-dev



On 19/07/2019 18:05, Christoph Hellwig wrote:
> On Fri, Jul 19, 2019 at 06:00:25PM +1000, Alexey Kardashevskiy wrote:
>>> But shouldn't we force usage of the direct ops in that case as the
>>> IOMMU is not neededed at all?
>>
>> We do, for mappings, but not unmappings and syncing.
> 
> Well, I mean as in literally not setting a dma_ops so that the
> dma_direct code is used without the indirection through the iommu ops.
> This is not only more obvious, but also faster as you avoid the
> indirect call (although that probably doesn't matter much if you
> are bounce buffering anyway).

I was not precise. We cannot avoid IOMMU in the guest for passed through 
devices.


>>> Also isn't that support non-upstream so far?
>>
>> How is this relevant? I expect the existing "swiotlb=force" just work.
> 
> I though the whole secure VM support was still not upstream.

It is getting there and I still do not see why "swiotlb=force" should 
not work if chosed in the cmdline.


-- 
Alexey

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19  8:23         ` Alexey Kardashevskiy
@ 2019-07-19 12:25           ` Christoph Hellwig
  2019-07-20 11:22             ` Alexey Kardashevskiy
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2019-07-19 12:25 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: Christoph Hellwig, linuxppc-dev

On Fri, Jul 19, 2019 at 06:23:59PM +1000, Alexey Kardashevskiy wrote:
> It is getting there and I still do not see why "swiotlb=force" should not
> work if chosed in the cmdline.

Ok, makes sense.  But that means we also have the issue in a few
other places..

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-19 12:25           ` Christoph Hellwig
@ 2019-07-20 11:22             ` Alexey Kardashevskiy
  2019-07-22  9:23               ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Kardashevskiy @ 2019-07-20 11:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: linuxppc-dev



On 19/07/2019 22:25, Christoph Hellwig wrote:
> On Fri, Jul 19, 2019 at 06:23:59PM +1000, Alexey Kardashevskiy wrote:
>> It is getting there and I still do not see why "swiotlb=force" should not
>> work if chosed in the cmdline.
> 
> Ok, makes sense.  But that means we also have the issue in a few
> other places..

Hmm, where? I got broadcom ethernet working with this.


-- 
Alexey

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: question on "powerpc/pseries/dma: Allow SWIOTLB"
  2019-07-20 11:22             ` Alexey Kardashevskiy
@ 2019-07-22  9:23               ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2019-07-22  9:23 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: Christoph Hellwig, linuxppc-dev

On Sat, Jul 20, 2019 at 09:22:49PM +1000, Alexey Kardashevskiy wrote:
> 
> 
> On 19/07/2019 22:25, Christoph Hellwig wrote:
> > On Fri, Jul 19, 2019 at 06:23:59PM +1000, Alexey Kardashevskiy wrote:
> >> It is getting there and I still do not see why "swiotlb=force" should not
> >> work if chosed in the cmdline.
> > 
> > Ok, makes sense.  But that means we also have the issue in a few
> > other places..
> 
> Hmm, where? I got broadcom ethernet working with this.

In all the other IOMMU drivers that conditionally forward to the dma
direct ops.  So it shouldn't affect powerpc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-07-22  9:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-19  7:10 question on "powerpc/pseries/dma: Allow SWIOTLB" Christoph Hellwig
2019-07-19  7:52 ` Alexey Kardashevskiy
2019-07-19  7:53   ` Christoph Hellwig
2019-07-19  8:00     ` Alexey Kardashevskiy
2019-07-19  8:05       ` Christoph Hellwig
2019-07-19  8:23         ` Alexey Kardashevskiy
2019-07-19 12:25           ` Christoph Hellwig
2019-07-20 11:22             ` Alexey Kardashevskiy
2019-07-22  9:23               ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).