Re: [PATCH] drm/qxl: Call qxl_bo_unref outside atomic context

2018-06-04 Thread Gerd Hoffmann
On Fri, Jun 01, 2018 at 04:05:32PM -0400, Jeremy Cline wrote: > "qxl_bo_unref" may sleep, but calling "qxl_release_map" causes > "preempt_disable()" to be called and "preempt_enable()" isn't called > until "qxl_release_unmap" is used. Move the call to "qxl_bo_unref" out > from in between the two

Re: [net] vhost: Use kzalloc() to allocate vhost_msg_node

2018-06-04 Thread Dmitry Vyukov via Virtualization
On Wed, May 30, 2018 at 5:01 AM, Michael S. Tsirkin wrote: > On Tue, May 29, 2018 at 03:19:08PM -0700, Guenter Roeck wrote: >> On Fri, Apr 27, 2018 at 11:45:02AM -0400, Kevin Easton wrote: >> > The struct vhost_msg within struct vhost_msg_node is copied to userspace, >> > so it should be

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: > > > I re-read that discussion and I'm still unclear on the > > original question, since I got several apparently > > conflicting answers. > > > > I asked: > >

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 07:48:54PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 18:57 +1000, David Gibson wrote: > > > > > - First qemu doesn't know that the guest will switch to "secure mode" > > > in advance. There is no difference between a normal and a secure > > > partition

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Christoph Hellwig
On Mon, Jun 04, 2018 at 03:43:09PM +0300, Michael S. Tsirkin wrote: > Another is that given the basic functionality is in there, optimizations > can possibly wait until per-device quirks in DMA API are supported. We have had per-device dma_ops for quite a while.

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Benjamin Herrenschmidt
On Mon, 2018-06-04 at 18:57 +1000, David Gibson wrote: > > > - First qemu doesn't know that the guest will switch to "secure mode" > > in advance. There is no difference between a normal and a secure > > partition until the partition does the magic UV call to "enter secure > > mode" and qemu

Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-04 Thread Paolo Bonzini
On 04/06/2018 06:14, Liu, Changpeng wrote: >>> But I believe the specification says VIRTIO_BLK_T_OUT means direction, so >>> OR the two bits together should compliance with the specification. >> I cannot find that in the specification: >> >> >>

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread David Gibson
On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: > > > I re-read that discussion and I'm still unclear on the > > original question, since I got several apparently > > conflicting answers. > > > > I asked: > >

Re: [PATCH] virtio_ring: switch to dma_XX barriers for rpmsg

2018-06-04 Thread Bjorn Andersson
On Thu 19 Apr 10:35 PDT 2018, Michael S. Tsirkin wrote: > virtio is using barriers to order memory accesses, thus > dma_wmb/rmb is a good match. > > Build-tested on x86: Before > > [mst@tuck linux]$ size drivers/virtio/virtio_ring.o >textdata bss dec hex filename > 11392

Re: [PATCH] virtio_ring: switch to dma_XX barriers for rpmsg

2018-06-04 Thread Bjorn Andersson
On Thu 19 Apr 10:48 PDT 2018, Paolo Bonzini wrote: > On 19/04/2018 19:46, Michael S. Tsirkin wrote: > >> This should be okay, but I wonder if there should be a virtio_wmb(...) > >> or an "if (weak_barriers) wmb()" before the "writel" in vm_notify > >> (drivers/virtio/virtio_mmio.c). > >> > >>

Re: [PATCH v2 0/9] x86: macrofying inline asm for better compilation

2018-06-04 Thread Josh Poimboeuf
On Mon, Jun 04, 2018 at 04:21:22AM -0700, Nadav Amit wrote: > This patch-set deals with an interesting yet stupid problem: kernel code > that does not get inlined despite its simplicity. There are several > causes for this behavior: "cold" attribute on __init, different function > optimization

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Benjamin Herrenschmidt
On Mon, 2018-06-04 at 05:55 -0700, Christoph Hellwig wrote: > On Mon, Jun 04, 2018 at 03:43:09PM +0300, Michael S. Tsirkin wrote: > > Another is that given the basic functionality is in there, optimizations > > can possibly wait until per-device quirks in DMA API are supported. > > We have had

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Benjamin Herrenschmidt
On Mon, 2018-06-04 at 19:21 +0300, Michael S. Tsirkin wrote: > > > > > - First qemu doesn't know that the guest will switch to "secure mode" > > > > in advance. There is no difference between a normal and a secure > > > > partition until the partition does the magic UV call to "enter secure > > >

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-04 Thread Samudrala, Sridhar
Ping on this patch now that the kernel patches are accepted into davem's net-next tree. https://patchwork.ozlabs.org/cover/920005/ On 5/7/2018 4:09 PM, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net device to act as a standby for another device with

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread David Gibson
On Mon, Jun 04, 2018 at 07:48:54PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 18:57 +1000, David Gibson wrote: > > > > > - First qemu doesn't know that the guest will switch to "secure mode" > > > in advance. There is no difference between a normal and a secure > > > partition

Re: [PATCH] qemu: Introduce VIRTIO_NET_F_STANDBY feature bit to virtio_net

2018-06-04 Thread Jason Wang
On 2018年06月05日 09:41, Samudrala, Sridhar wrote: Ping on this patch now that the kernel patches are accepted into davem's net-next tree. https://patchwork.ozlabs.org/cover/920005/ On 5/7/2018 4:09 PM, Sridhar Samudrala wrote: This feature bit can be used by hypervisor to indicate virtio_net

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Christoph Hellwig
On Tue, Jun 05, 2018 at 09:26:56AM +1000, Benjamin Herrenschmidt wrote: > Sorry Michael, that doesn't click. Yes of course virtio is implemented > in qemu, but the problem we are trying to solve is *not* a qemu problem > (the fact that the Linux drivers bypass the DMA API is wrong, needs > fixing,

RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support

2018-06-04 Thread Liu, Changpeng
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Monday, June 4, 2018 6:03 PM > To: Liu, Changpeng ; Stefan Hajnoczi > > Cc: virtualization@lists.linux-foundation.org; cav...@redhat.com; > jasow...@redhat.com; Wang, Wei W > Subject: Re: [PATCH v4]

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Tue, Jun 05, 2018 at 09:26:56AM +1000, Benjamin Herrenschmidt wrote: > I would like to keep however the ability to bypass the iommu for > performance reasons So that's easy, clear the IOMMU flag and this means "bypass the IOMMU". -- MST ___

Re: [virtio-dev] Re: [PATCH v3] virtio_pci: support enabling VFs

2018-06-04 Thread Tiwei Bie
On Mon, Jun 04, 2018 at 07:32:25PM +0300, Michael S. Tsirkin wrote: > On Fri, Jun 01, 2018 at 12:02:39PM +0800, Tiwei Bie wrote: > > There is a new feature bit allocated in virtio spec to > > support SR-IOV (Single Root I/O Virtualization): > > > >

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 11:11:52PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 15:43 +0300, Michael S. Tsirkin wrote: > > On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > > > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: > > > > > > > I

Re: [PATCH v3] virtio_pci: support enabling VFs

2018-06-04 Thread Michael S. Tsirkin
On Fri, Jun 01, 2018 at 12:02:39PM +0800, Tiwei Bie wrote: > There is a new feature bit allocated in virtio spec to > support SR-IOV (Single Root I/O Virtualization): > > https://github.com/oasis-tcs/virtio-spec/issues/11 > > This patch enables the support for this feature bit in > virtio

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 11:14:36PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 05:55 -0700, Christoph Hellwig wrote: > > On Mon, Jun 04, 2018 at 03:43:09PM +0300, Michael S. Tsirkin wrote: > > > Another is that given the basic functionality is in there, optimizations > > > can