Re: [PATCH] VSOCK: Only check error on skb_recv_datagram when skb is NULL

2016-04-19 Thread David Miller
From: Jorgen Hansen Date: Mon, 18 Apr 2016 23:58:52 -0700 > If skb_recv_datagram returns an skb, we should ignore the err > value returned. Otherwise, datagram receives will return EAGAIN > when they have to wait for a datagram. > > Acked-by: Adit Ranadive > Signed-off-by: Jorgen Hansen Appli

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Tue, Apr 19, 2016 at 1:54 PM, Michael S. Tsirkin wrote: > On Tue, Apr 19, 2016 at 01:27:29PM -0700, Andy Lutomirski wrote: >> On Tue, Apr 19, 2016 at 1:16 PM, Michael S. Tsirkin wrote: >> > On Tue, Apr 19, 2016 at 11:01:38AM -0700, Andy Lutomirski wrote: >> >> On Tue, Apr 19, 2016 at 10:49 AM,

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 01:27:29PM -0700, Andy Lutomirski wrote: > On Tue, Apr 19, 2016 at 1:16 PM, Michael S. Tsirkin wrote: > > On Tue, Apr 19, 2016 at 11:01:38AM -0700, Andy Lutomirski wrote: > >> On Tue, Apr 19, 2016 at 10:49 AM, Michael S. Tsirkin > >> wrote: > >> > On Tue, Apr 19, 2016 at

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Tue, Apr 19, 2016 at 1:16 PM, Michael S. Tsirkin wrote: > On Tue, Apr 19, 2016 at 11:01:38AM -0700, Andy Lutomirski wrote: >> On Tue, Apr 19, 2016 at 10:49 AM, Michael S. Tsirkin wrote: >> > On Tue, Apr 19, 2016 at 12:26:44PM -0400, David Woodhouse wrote: >> >> On Tue, 2016-04-19 at 19:20 +030

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 11:01:38AM -0700, Andy Lutomirski wrote: > On Tue, Apr 19, 2016 at 10:49 AM, Michael S. Tsirkin wrote: > > On Tue, Apr 19, 2016 at 12:26:44PM -0400, David Woodhouse wrote: > >> On Tue, 2016-04-19 at 19:20 +0300, Michael S. Tsirkin wrote: > >> > > >> > > I thought that PLATF

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Tue, Apr 19, 2016 at 10:49 AM, Michael S. Tsirkin wrote: > On Tue, Apr 19, 2016 at 12:26:44PM -0400, David Woodhouse wrote: >> On Tue, 2016-04-19 at 19:20 +0300, Michael S. Tsirkin wrote: >> > >> > > I thought that PLATFORM served that purpose. Woudn't the host >> > > advertise PLATFORM suppor

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 12:26:44PM -0400, David Woodhouse wrote: > On Tue, 2016-04-19 at 19:20 +0300, Michael S. Tsirkin wrote: > > > > > I thought that PLATFORM served that purpose.  Woudn't the host > > > advertise PLATFORM support and, if the guest doesn't ack it, the host > > > device would sk

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread David Woodhouse
On Tue, 2016-04-19 at 19:20 +0300, Michael S. Tsirkin wrote: > > > I thought that PLATFORM served that purpose.  Woudn't the host > > advertise PLATFORM support and, if the guest doesn't ack it, the host > > device would skip translation?  Or is that problematic for vfio? > > Exactly that's probl

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 09:12:03AM -0700, Andy Lutomirski wrote: > On Tue, Apr 19, 2016 at 9:09 AM, Michael S. Tsirkin wrote: > > On Tue, Apr 19, 2016 at 09:02:14AM -0700, Andy Lutomirski wrote: > >> On Tue, Apr 19, 2016 at 3:27 AM, Michael S. Tsirkin > >> wrote: > >> > On Mon, Apr 18, 2016 at 1

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Tue, Apr 19, 2016 at 9:09 AM, Michael S. Tsirkin wrote: > On Tue, Apr 19, 2016 at 09:02:14AM -0700, Andy Lutomirski wrote: >> On Tue, Apr 19, 2016 at 3:27 AM, Michael S. Tsirkin wrote: >> > On Mon, Apr 18, 2016 at 12:24:15PM -0700, Andy Lutomirski wrote: >> >> On Mon, Apr 18, 2016 at 11:29 AM,

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 09:02:14AM -0700, Andy Lutomirski wrote: > On Tue, Apr 19, 2016 at 3:27 AM, Michael S. Tsirkin wrote: > > On Mon, Apr 18, 2016 at 12:24:15PM -0700, Andy Lutomirski wrote: > >> On Mon, Apr 18, 2016 at 11:29 AM, David Woodhouse > >> wrote: > >> > For x86, you *can* enable v

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Tue, Apr 19, 2016 at 09:00:27AM -0700, Andy Lutomirski wrote: > On Apr 19, 2016 2:13 AM, "Michael S. Tsirkin" wrote: > > > > > > I guess you are right in that we should split this part out. > > What I wanted is really the combination > > PASSTHROUGH && !PLATFORM so that we can say "ok we don't

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Tue, Apr 19, 2016 at 3:27 AM, Michael S. Tsirkin wrote: > On Mon, Apr 18, 2016 at 12:24:15PM -0700, Andy Lutomirski wrote: >> On Mon, Apr 18, 2016 at 11:29 AM, David Woodhouse >> wrote: >> > For x86, you *can* enable virtio-behind-IOMMU if your DMAR tables tell >> > the truth, and even legacy

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Andy Lutomirski
On Apr 19, 2016 2:13 AM, "Michael S. Tsirkin" wrote: > > > I guess you are right in that we should split this part out. > What I wanted is really the combination > PASSTHROUGH && !PLATFORM so that we can say "ok we don't > need to guess, this device actually bypasses the IOMMU". What happens when

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Alex Williamson
On Tue, 19 Apr 2016 12:13:29 +0300 "Michael S. Tsirkin" wrote: > On Mon, Apr 18, 2016 at 02:29:33PM -0400, David Woodhouse wrote: > > On Mon, 2016-04-18 at 19:27 +0300, Michael S. Tsirkin wrote: > > > I balk at adding more hacks to a broken system. My goals are > > > merely to > > > - make thin

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 12:24:15PM -0700, Andy Lutomirski wrote: > On Mon, Apr 18, 2016 at 11:29 AM, David Woodhouse wrote: > > For x86, you *can* enable virtio-behind-IOMMU if your DMAR tables tell > > the truth, and even legacy kernels ought to cope with that. > > FSVO 'ought to' where I suspect

Re: [PATCH RFC 3/3] vfio: add virtio pci quirk

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 02:00:06PM -0600, Alex Williamson wrote: > On Mon, 18 Apr 2016 12:58:28 +0300 > "Michael S. Tsirkin" wrote: > > > Modern virtio pci devices can set VIRTIO_F_IOMMU_PLATFORM > > to signal they are safe to use with an IOMMU. > > > > Without this bit, exposing the device to u

Re: [PATCH RFC] fixup! virtio: convert to use DMA api

2016-04-19 Thread Michael S. Tsirkin
On Mon, Apr 18, 2016 at 02:29:33PM -0400, David Woodhouse wrote: > On Mon, 2016-04-18 at 19:27 +0300, Michael S. Tsirkin wrote: > > I balk at adding more hacks to a broken system. My goals are > > merely to > > - make things work correctly with an IOMMU and new guests, > >   so people can use users

Re: [PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-04-19 Thread Sergey Senozhatsky
Hello Minchan, On (04/19/16 16:51), Minchan Kim wrote: [..] > > I guess it is remained thing after I rebased to catch any mistake. > But I'm heavily chainging this part. > Please review next version instead of this after a few days. :) ah, got it. thanks! -ss ___

Re: [PATCH v3 11/16] zsmalloc: separate free_zspage from putback_zspage

2016-04-19 Thread Minchan Kim
Hi Sergey, On Mon, Apr 18, 2016 at 10:04:08AM +0900, Sergey Senozhatsky wrote: > Hello Minchan, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > @@ -1835,23 +1827,31 @@ static void __zs_compact(struct zs_pool *pool, > > struct size_class *class) > > if (!migrate_zspage(

Re: [PATCH v3 10/16] zsmalloc: factor page chain functionality out

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 09:33:05AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > > @@ -1421,7 +1434,6 @@ static unsigned long obj_malloc(struct size_class > > *class, > > unsigned long m_offset; > > void *vaddr; > > > > - handle |= OBJ_ALLOCAT

Re: [PATCH v3 08/16] zsmalloc: squeeze freelist into page->mapping

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 12:56:21AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > +static void objidx_to_page_and_offset(struct size_class *class, > > + struct page *first_page, > > + unsigned lon

Re: [PATCH v3 06/16] zsmalloc: squeeze inuse into page->mapping

2016-04-19 Thread Minchan Kim
On Mon, Apr 18, 2016 at 12:08:04AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (03/30/16 16:12), Minchan Kim wrote: > [..] > > +static int get_zspage_inuse(struct page *first_page) > > +{ > > + struct zs_meta *m; > > + > > + VM_BUG_ON_PAGE(!is_first_page(first_page), first_page); > > + >