Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Benjamin Herrenschmidt
On Sun, 2018-08-05 at 03:22 +0300, Michael S. Tsirkin wrote: > I see the allure of this, but I think down the road you will > discover passing a flag in libvirt XML saying > "please use a secure mode" or whatever is a good idea. > > Even thought it is probably not required to address this > specif

Re: [PATCH 2/2] powerpc/cpu: post the event cpux add/remove instead of online/offline during hotplug

2018-08-04 Thread Pingfan Liu
On Sat, Aug 4, 2018 at 10:48 AM Michael Ellerman wrote: > > Hi Pingfan, > > Pingfan Liu writes: > > Technically speaking, echo 1/0 > cpuX/online is only a subset of cpu > > hotplug/unplug, i.e. add/remove. The latter one includes the physical > > adding/removing of a cpu device. Some user space t

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Benjamin Herrenschmidt
On Sun, 2018-08-05 at 03:09 +0300, Michael S. Tsirkin wrote: > It seems that the fact that within guest it's implemented using a bounce > buffer and that it's easiest to do by switching virtio to use the DMA API > isn't something virtio spec concerns itself with. Right, this is my reasoning as wel

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Benjamin Herrenschmidt
On Sat, 2018-08-04 at 01:21 -0700, Christoph Hellwig wrote: > No matter if you like it or not (I don't!) virtio is defined to bypass > dma translations, it is very clearly stated in the spec. It has some > ill-defined bits to bypass it, so if you want the dma mapping API > to be used you'll have t

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Benjamin Herrenschmidt
On Sat, 2018-08-04 at 01:15 -0700, Christoph Hellwig wrote: > b) a way to document in a virtio-related spec how the bus handles > dma for Ben's totally fucked up hypervisor. Without that there > is not way we'll get interoperable implementations. Christoph, this isn't a totally fucked

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 09:16:38AM +0100, Will Deacon wrote: > On Tue, Jul 31, 2018 at 03:36:22PM -0500, Benjamin Herrenschmidt wrote: > > On Tue, 2018-07-31 at 10:30 -0700, Christoph Hellwig wrote: > > > > However the question people raise is that DMA API is already full of > > > > arch-specific t

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:21:26PM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 22:08 +0300, Michael S. Tsirkin wrote: > > > > > Please go through these patches and review whether this approach > > > > > broadly > > > > > makes sense. I will appreciate suggestions, inputs, comments

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:22:11PM -0500, Benjamin Herrenschmidt wrote: > (Appologies if you got this twice, my mailer had a brain fart and I don't > know if the first one got through & am about to disappear in a plane for 17h) I got like 3 of these. I hope that's true for everyone as I replied to

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:16:21PM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > > > 2- Make vi

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Sat, Aug 04, 2018 at 01:15:00AM -0700, Christoph Hellwig wrote: > On Fri, Aug 03, 2018 at 10:17:32PM +0300, Michael S. Tsirkin wrote: > > It seems reasonable to teach a platform to override dma-range > > for a specific device e.g. in case it knows about bugs in ACPI. > > A platform will be able

Re: vio.c:__vio_register_driver && LPAR Migration issue

2018-08-04 Thread Tyrel Datwyler
On 08/03/2018 02:23 PM, Tyrel Datwyler wrote: > On 08/02/2018 11:15 AM, Michael Bringmann wrote: >> Hello: >> I have been observing an anomaly during LPAR migrations between >> a couple of P8 systems. >> >> This is the problem. After migrating an LPAR, the PPC mobility code >> receives RTAS re

Re: [PATCH] powpc:feature: of_node_put is not needed after iterator.

2018-08-04 Thread Tyrel Datwyler
On 08/04/2018 07:25 AM, zhong jiang wrote: > for_each_node_by_name iterators only exit normally when the loop > cursor is NULL, So there is no point to call of_node_put. > > Signed-off-by: zhong jiang Reviewed-by: Tyrel Datwyler > --- > arch/powerpc/platforms/powermac/feature.c | 2 -- > 1 f

[PATCH] powpc:feature: of_node_put is not needed after iterator.

2018-08-04 Thread zhong jiang
for_each_node_by_name iterators only exit normally when the loop cursor is NULL, So there is no point to call of_node_put. Signed-off-by: zhong jiang --- arch/powerpc/platforms/powermac/feature.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/platforms/powermac/feature.c b/a

Re: linux-next: manual merge of the powerpc tree with the m68k tree

2018-08-04 Thread Finn Thain
On Thu, 2 Aug 2018, Geert Uytterhoeven wrote: > Hi Stephen, > > On Thu, Aug 2, 2018 at 1:42 AM Stephen Rothwell wrote: > > [forgot the conflict resolution ...] > > > > On Thu, 2 Aug 2018 09:27:20 +1000 Stephen Rothwell > > wrote: > > > > > > Today's linux-next merge of the powerpc tree got a c

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Christoph Hellwig
On Fri, Aug 03, 2018 at 10:17:32PM +0300, Michael S. Tsirkin wrote: > It seems reasonable to teach a platform to override dma-range > for a specific device e.g. in case it knows about bugs in ACPI. A platform will be able override dma-range using the dev->bus_dma_mask field starting in 4.19. But

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Christoph Hellwig
On Fri, Aug 03, 2018 at 01:58:46PM -0500, Benjamin Herrenschmidt wrote: > You are saying something along the lines of "I don't like an > instruction in your ISA, let's not support your entire CPU architecture > in Linux". No. I'm saying if you can't describe your architecture in the virtio spec d