Re: [Spice-devel] Xorg indefinitely hangs in kernelspace

2019-09-06 Thread Hillf Danton
>From Frediano Ziglio > > Where does it came this patch? My fingers tapping the keyboard. > Is it already somewhere? No idea yet. > Is it supposed to fix this issue? It may do nothing else as far as I can tell. > Does it affect some other card beside QXL? Perhaps.

Re: [PATCH v9 00/11] x86: PIE support to extend KASLR randomization

2019-09-06 Thread Thomas Garnier
On Thu, Aug 29, 2019 at 12:55 PM Thomas Garnier wrote: > > On Tue, Aug 6, 2019 at 8:51 AM Peter Zijlstra wrote: > > > > On Tue, Aug 06, 2019 at 05:43:47PM +0200, Borislav Petkov wrote: > > > On Tue, Jul 30, 2019 at 12:12:44PM -0700, Thomas Garnier wrote: > > > > These patches make some of the cha

Re: [Spice-devel] Xorg indefinitely hangs in kernelspace

2019-09-06 Thread Frediano Ziglio
> > On Tue, 6 Aug 2019 21:00:10 +0300 From: Jaak Ristioja > > Hello! > > > > I'm writing to report a crash in the QXL / DRM code in the Linux kernel. > > I originally filed the issue on LaunchPad and more details can be found > > there, although I doubt whether these details are useful. > > >

[vhost:linux-next 15/15] include/linux/page_reporting.h:10:34: error: 'HUGETLB_PAGE_ORDER' undeclared; did you mean 'IOREMAP_MAX_ORDER'?

2019-09-06 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b commit: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b [15/15] virtio-balloon: Add support for providing unused page reports to host config: arm64-defconfig (attach

[vhost:linux-next 13/15] arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0

2019-09-06 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b commit: b1b0d638e6f93b91cf34585350bb00035d066989 [13/15] mm: Introduce Reported pages config: ia64-defconfig (attached as .config) compiler: ia64-linux-gcc (G

[vhost:linux-next 13/15] htmldocs: mm/page_alloc.c:2207: warning: Function parameter or member 'order' not described in 'free_reported_page'

2019-09-06 Thread kbuild test robot
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/mst/vhost.git linux-next head: c5db5a8d998da36ada7287aa53b4ed501a0a2b2b commit: b1b0d638e6f93b91cf34585350bb00035d066989 [13/15] mm: Introduce Reported pages reproduce: make htmldocs If you fix the issue, kindly add following tag

Re: [PULL] vhost, virtio: last minute fixes

2019-09-06 Thread pr-tracker-bot
The pull request you sent on Fri, 6 Sep 2019 09:41:03 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/9d098a6234c135c3fd1692fc451908b5c2a43244 Thank you! -- Deet-doot-dot, I am a bot.

Re: [PATCH 08/18] virtiofs: Drain all pending requests during ->remove time

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 10:17:05AM -0400, Vivek Goyal wrote: > On Fri, Sep 06, 2019 at 11:52:10AM +0100, Stefan Hajnoczi wrote: > > On Thu, Sep 05, 2019 at 03:48:49PM -0400, Vivek Goyal wrote: > > > +static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) > > > +{ > > > + WARN_ON(fsvq->in_flig

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 04:11:45PM +0200, Miklos Szeredi wrote: > This is not a drop in replacement for blk and scsi transports. More > for virtio-9p. Does that have anything similar? 9p seems to supports unplug, yes. It's not great in that it blocks until we close the channel, but it's there an

Re: [PATCH 08/18] virtiofs: Drain all pending requests during ->remove time

2019-09-06 Thread Vivek Goyal
On Fri, Sep 06, 2019 at 11:52:10AM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 03:48:49PM -0400, Vivek Goyal wrote: > > +static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) > > +{ > > + WARN_ON(fsvq->in_flight < 0); > > + > > + /* Wait for in flight requests to finish.*/ >

Re: [PATCH] virtio: add VIRTIO_RING_NO_LEGACY

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 12:42:14PM +, Matej Genci wrote: > Add macro to disable legacy functions vring_init and vring_size. > > Signed-off-by: Matej Genci > --- > include/uapi/linux/virtio_ring.h | 4 > 1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/virtio_ring.h

Re: [PATCH] virtio_ring: fix unmap of indirect descriptors

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 02:06:59PM +0200, Matthias Lange wrote: > The function virtqueue_add_split() DMA-maps the scatterlist buffers. In > case a mapping error occurs the already mapped buffers must be unmapped. > This happens by jumping to the 'unmap_release' label. > > In case of indirect descr

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 08:08:17AM -0400, Vivek Goyal wrote: > On Fri, Sep 06, 2019 at 01:52:41PM +0200, Miklos Szeredi wrote: > > On Fri, Sep 6, 2019 at 12:36 PM Stefan Hajnoczi wrote: > > > > > > On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > > > > On Thu, Sep 5, 2019 at 9:49

Re: [PATCH v4 15/16] virtio-fs: add virtiofs filesystem

2019-09-06 Thread Michael S. Tsirkin
On Fri, Sep 06, 2019 at 11:22:09AM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 03:15:15PM -0400, Vivek Goyal wrote: > > On Tue, Sep 03, 2019 at 09:55:49AM -0400, Michael S. Tsirkin wrote: > > [..] > > > What's with all of the TODOs? Some of these are really scary, > > > looks like they

Re: [PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path

2019-09-06 Thread Vivek Goyal
On Fri, Sep 06, 2019 at 01:05:34PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote: > > It is possible that a mount is in progress and device is being removed at > > the same time. Use virtio_fs_mutex to avoid races. > > > > This also takes care of bunch

Re: [PATCH 15/18] virtiofs: Make virtio_fs object refcounted

2019-09-06 Thread Vivek Goyal
On Fri, Sep 06, 2019 at 01:03:09PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > > This object is used both by fuse_connection as well virt device. So make > > this object reference counted and that makes it easy to define life cycle > > of the objec

Re: [PATCH 1/2] Revert "vhost: access vq metadata through kernel virtual address"

2019-09-06 Thread Michael S. Tsirkin
On Thu, Sep 05, 2019 at 08:27:35PM +0800, Jason Wang wrote: > It was reported that metadata acceleration introduces several issues, > so this patch reverts commit ff466032dc9e5a61217f22ea34b2df932786bbfc, > 73f628ec9e6bcc45b77c53fe6d0c0ec55eaf82af and > 0b4a7092ffe568a55bf8f3cefdf79ff666586d91. >

[PULL] vhost, virtio: last minute fixes

2019-09-06 Thread Michael S. Tsirkin
Hope this can still make it. I was not sure about virtio-net change but it seems that it prevents livelocks for some people. The following changes since commit 089cf7f6ecb266b6a4164919a2e69bd2f938374a: Linux 5.3-rc7 (2019-09-02 09:57:40 -0700) are available in the Git repository at: git://g

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Michael S. Tsirkin
On Thu, Sep 05, 2019 at 03:48:41PM -0400, Vivek Goyal wrote: > Hi, > > Michael Tsirkin pointed out issues w.r.t various locking related TODO > items and races w.r.t device removal. > > In this first round of cleanups, I have taken care of most pressing > issues. > > These patches apply on top o

Re: [PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference

2019-09-06 Thread Vivek Goyal
On Fri, Sep 06, 2019 at 01:00:09PM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 03:48:55PM -0400, Vivek Goyal wrote: > > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > > index 85e2dcad68c1..04e2c000d63f 100644 > > --- a/fs/fuse/fuse_i.h > > +++ b/fs/fuse/fuse_i.h > > @@ -479,6 +479,1

Re: [PATCH 0/2] Revert and rework on the metadata accelreation

2019-09-06 Thread David Miller
From: Jason Wang Date: Fri, 6 Sep 2019 18:02:35 +0800 > On 2019/9/5 下午9:59, Jason Gunthorpe wrote: >> I think you should apply the revert this cycle and rebase the other >> patch for next.. >> >> Jason > > Yes, the plan is to revert in this release cycle. Then you should reset patch #1 all by i

Re: [PATCH 2/2] vhost: re-introducing metadata acceleration through kernel virtual address

2019-09-06 Thread Jason Wang
On 2019/9/6 上午11:21, Hillf Danton wrote: On Thu, 5 Sep 2019 20:27:36 +0800 From: Jason Wang +static void vhost_set_map_dirty(struct vhost_virtqueue *vq, + struct vhost_map *map, int index) +{ + struct vhost_uaddr *uaddr = &vq->uaddrs[index]; + int i

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Vivek Goyal
On Fri, Sep 06, 2019 at 01:52:41PM +0200, Miklos Szeredi wrote: > On Fri, Sep 6, 2019 at 12:36 PM Stefan Hajnoczi wrote: > > > > On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > > > On Thu, Sep 5, 2019 at 9:49 PM Vivek Goyal wrote: > > > > > > > > Hi, > > > > > > > > Michael Tsir

Re: [PATCH 18/18] virtiofs: Remove TODO item from virtio_fs_free_devs()

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:59PM -0400, Vivek Goyal wrote: > virtio_fs_free_devs() is now called from ->kill_sb(). By this time > all device queues have been quiesced. I am assuming that while > ->kill_sb() is in progress, another mount instance will wait for > it to finish (sb->s_umount mutex pr

Re: [PATCH 17/18] virtiofs: Remove TODO to quiesce/end_requests

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:58PM -0400, Vivek Goyal wrote: > We now stop queues and drain all the pending requests from all virtqueues. > So this is not a TODO anymore. > > Got rid of incrementing fc->dev_count as well. It did not seem meaningful > for virtio_fs. > > Signed-off-by: Vivek Goyal

Re: [PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote: > It is possible that a mount is in progress and device is being removed at > the same time. Use virtio_fs_mutex to avoid races. > > This also takes care of bunch of races and removes some TODO items. > > Signed-off-by: Vivek Goyal > -

Re: [PATCH 15/18] virtiofs: Make virtio_fs object refcounted

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > This object is used both by fuse_connection as well virt device. So make > this object reference counted and that makes it easy to define life cycle > of the object. > > Now deivce can be removed while filesystem is still mounted. This

Re: [PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:55PM -0400, Vivek Goyal wrote: > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > index 85e2dcad68c1..04e2c000d63f 100644 > --- a/fs/fuse/fuse_i.h > +++ b/fs/fuse/fuse_i.h > @@ -479,6 +479,11 @@ struct fuse_iqueue_ops { >*/ > void (*wake_pending_and_unl

Re: [PATCH 13/18] virtiofs: Do not access virtqueue in request submission path

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:54PM -0400, Vivek Goyal wrote: > In request submission path it is possible that virtqueue is already gone > due to driver->remove(). So do not access it in dev_dbg(). Use pr_debug() > instead. > > If virtuqueue is gone, this will result in NULL pointer deference. > >

Re: [PATCH 12/18] virtiofs: Use virtio_fs_free_devs() in error path

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:53PM -0400, Vivek Goyal wrote: > We already have an helper to cleanup fuse devices. Use that instead of > duplicating the code. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Stefan

Re: [PATCH 11/18] virtiofs: stop and drain queues after sending DESTROY

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:52PM -0400, Vivek Goyal wrote: > During virtio_kill_sb() we first stop forget queue and drain it and then > call fuse_kill_sb_anon(). This will result in sending DESTROY request to > fuse server. Once finished, stop all the queues and drain one more time > just to be s

Re: [PATCH 10/18] virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:51PM -0400, Vivek Goyal wrote: > These data structures should go away when virtio_fs object is going away. > When deivce is going away, we need to just make sure virtqueues can go > away and after that none of the code accesses vq and all the requests > get error. > >

Re: [PATCH 09/18] virtiofs: Add an helper to start all the queues

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:50PM -0400, Vivek Goyal wrote: > This just marks are the queues are connected and ready to accept the > request. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) Reviewed-by: Ste

Re: [PATCH 08/18] virtiofs: Drain all pending requests during ->remove time

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:49PM -0400, Vivek Goyal wrote: > +static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) > +{ > + WARN_ON(fsvq->in_flight < 0); > + > + /* Wait for in flight requests to finish.*/ > + while (1) { > + spin_lock(&fsvq->lock); > +

Re: [PATCH 07/18] virtiofs: Stop virtiofs queues when device is being removed

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:48PM -0400, Vivek Goyal wrote: > Stop all the virt queues when device is going away. This will ensure that > no new requests are submitted to virtqueue and and request will end with > error -ENOTCONN. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 14 +

Re: [PATCH 06/18] virtiofs: ->remove should not clean virtiofs fuse devices

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:47PM -0400, Vivek Goyal wrote: > We maintain a fuse device per virt queue. This fuse devices are allocated > and installed during mount time and should be cleaned up when super block > is going away. Device removal should not clean it. Device removal should > stop queu

Re: [PATCH 05/18] Maintain count of in flight requests for VQ_REQUEST queue

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:46PM -0400, Vivek Goyal wrote: > As of now we maintain this count only for VQ_HIPRIO. Maintain it for > VQ_REQUEST as well so that later it can be used to drain VQ_REQUEST > queue. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 4 > 1 file changed

Re: [PATCH 04/18] virtiofs: Check connected state for VQ_REQUEST queue as well

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:45PM -0400, Vivek Goyal wrote: > Right now we are checking ->connected state only for VQ_HIPRIO. Now we want > to make use of this method for all queues. So check it for VQ_REQUEST as > well. > > This will be helpful if device has been removed and virtqueue is gone. I

Re: [PATCH 03/18] virtiofs: Pass fsvq instead of vq as parameter to virtio_fs_enqueue_req

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:44PM -0400, Vivek Goyal wrote: > Pass fsvq instead of vq as parameter to virtio_fs_enqueue_req(). We will > retrieve vq from fsvq under spin lock. > > Later in the patch series we will retrieve vq only if fsvq is still connected > other vq might have been cleaned up b

Re: [PATCH 02/18] virtiofs: Check whether hiprio queue is connected at submission time

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:43PM -0400, Vivek Goyal wrote: > For hiprio queue (forget requests), we are keeping a state in queue whether > queue is connected or not. If queue is not connected, do not try to submit > request and return error instead. > > As of now, we are checking for this state

Re: [PATCH 01/18] virtiofs: Remove request from processing list before calling end

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:42PM -0400, Vivek Goyal wrote: > In error path we are calling fuse_request_end() but we need to clear > FR_SENT bit as well as remove request from processing queue. Otherwise > fuse_request_end() triggers a warning as well as other issues show up. > > Signed-off-by: V

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > On Thu, Sep 5, 2019 at 9:49 PM Vivek Goyal wrote: > > > > Hi, > > > > Michael Tsirkin pointed out issues w.r.t various locking related TODO > > items and races w.r.t device removal. > > > > In this first round of cleanups, I have ta

Re: [PATCH v4 15/16] virtio-fs: add virtiofs filesystem

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:15:15PM -0400, Vivek Goyal wrote: > On Tue, Sep 03, 2019 at 09:55:49AM -0400, Michael S. Tsirkin wrote: > [..] > > What's with all of the TODOs? Some of these are really scary, > > looks like they need to be figured out before this is merged. > > Hi Michael, > > One of

Re: [PATCH 0/2] Revert and rework on the metadata accelreation

2019-09-06 Thread Jason Wang
On 2019/9/5 下午9:59, Jason Gunthorpe wrote: On Thu, Sep 05, 2019 at 08:27:34PM +0800, Jason Wang wrote: Hi: Per request from Michael and Jason, the metadata accelreation is reverted in this version and rework in next version. Please review. Thanks Jason Wang (2): Revert "vhost: access vq

Re: [PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 06:19:28PM +, Matt Lupfer wrote: > The event handler calls scsi_scan_host() when events are missed, which > will hotplug new LUNs. However, this function won't remove any > unplugged LUNs. The result is that hotunplug doesn't work properly when > the number of unplugge