Re: [GIT PULL] vhost: cleanups and fixes

2021-12-13 Thread pr-tracker-bot
The pull request you sent on Sun, 12 Dec 2021 17:59:51 -0500:

> https://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/5472f14a37421d1bca3dddf33cabd3bd6dbefbbc

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2021-12-12 Thread Michael S. Tsirkin
The email subject is wrong. it's just bugfixes.
But the tag is ok, and that's what matters, right?

On Sun, Dec 12, 2021 at 05:59:58PM -0500, Michael S. Tsirkin wrote:
> The following changes since commit 0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1:
> 
>   Linux 5.16-rc4 (2021-12-05 14:08:22 -0800)
> 
> are available in the Git repository at:
> 
>   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> 
> for you to fetch changes up to bb47620be322c5e9e372536cb6b54e17b3a00258:
> 
>   vdpa: Consider device id larger than 31 (2021-12-08 15:41:50 -0500)
> 
> 
> virtio,vdpa: bugfixes
> 
> Misc bugfixes.
> 
> Signed-off-by: Michael S. Tsirkin 
> 
> 
> Arnd Bergmann (1):
>   virtio: always enter drivers/virtio/
> 
> Dan Carpenter (3):
>   vduse: fix memory corruption in vduse_dev_ioctl()
>   vdpa: check that offsets are within bounds
>   vduse: check that offset is within bounds in get_config()
> 
> Parav Pandit (1):
>   vdpa: Consider device id larger than 31
> 
> Wei Wang (1):
>   virtio/vsock: fix the transport to work with VMADDR_CID_ANY
> 
> Will Deacon (1):
>   virtio_ring: Fix querying of maximum DMA mapping size for virtio device
> 
>  drivers/Makefile| 3 +--
>  drivers/vdpa/vdpa.c | 3 ++-
>  drivers/vdpa/vdpa_user/vduse_dev.c  | 6 --
>  drivers/vhost/vdpa.c| 2 +-
>  drivers/virtio/virtio_ring.c| 2 +-
>  net/vmw_vsock/virtio_transport_common.c | 3 ++-
>  6 files changed, 11 insertions(+), 8 deletions(-)

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[GIT PULL] vhost: cleanups and fixes

2021-12-12 Thread Michael S. Tsirkin
The following changes since commit 0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1:

  Linux 5.16-rc4 (2021-12-05 14:08:22 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to bb47620be322c5e9e372536cb6b54e17b3a00258:

  vdpa: Consider device id larger than 31 (2021-12-08 15:41:50 -0500)


virtio,vdpa: bugfixes

Misc bugfixes.

Signed-off-by: Michael S. Tsirkin 


Arnd Bergmann (1):
  virtio: always enter drivers/virtio/

Dan Carpenter (3):
  vduse: fix memory corruption in vduse_dev_ioctl()
  vdpa: check that offsets are within bounds
  vduse: check that offset is within bounds in get_config()

Parav Pandit (1):
  vdpa: Consider device id larger than 31

Wei Wang (1):
  virtio/vsock: fix the transport to work with VMADDR_CID_ANY

Will Deacon (1):
  virtio_ring: Fix querying of maximum DMA mapping size for virtio device

 drivers/Makefile| 3 +--
 drivers/vdpa/vdpa.c | 3 ++-
 drivers/vdpa/vdpa_user/vduse_dev.c  | 6 --
 drivers/vhost/vdpa.c| 2 +-
 drivers/virtio/virtio_ring.c| 2 +-
 net/vmw_vsock/virtio_transport_common.c | 3 ++-
 6 files changed, 11 insertions(+), 8 deletions(-)

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2021-03-18 Thread pr-tracker-bot
The pull request you sent on Thu, 18 Mar 2021 14:11:35 -0400:

> https://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/bf152b0b41dc141c8d32eb6e974408f5804f4d00

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[GIT PULL] vhost: cleanups and fixes

2021-03-18 Thread Michael S. Tsirkin
The following changes since commit 16c10bede8b3d8594279752bf53153491f3f944f:

  virtio-input: add multi-touch support (2021-02-23 07:52:59 -0500)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 0bde59c1723a29e294765c96dbe5c7fb639c2f96:

  vhost-vdpa: set v->config_ctx to NULL if eventfd_ctx_fdget() fails 
(2021-03-14 18:10:07 -0400)


virtio: fixes, cleanups

Some fixes and cleanups all over the place.

Signed-off-by: Michael S. Tsirkin 


Gautam Dawar (1):
  vhost_vdpa: fix the missing irq_bypass_unregister_producer() invocation

Jason Wang (1):
  vdpa: set the virtqueue num during register

Laurent Vivier (1):
  vhost: Fix vhost_vq_reset()

Parav Pandit (1):
  vdpa_sim: Skip typecasting from void*

Stefano Garzarella (2):
  vhost-vdpa: fix use-after-free of v->config_ctx
  vhost-vdpa: set v->config_ctx to NULL if eventfd_ctx_fdget() fails

Tang Bin (1):
  virtio-mmio: Use to_virtio_mmio_device() to simply code

Xianting Tian (1):
  virtio: remove export for virtio_config_{enable, disable}

 drivers/vdpa/ifcvf/ifcvf_main.c  |  5 ++---
 drivers/vdpa/mlx5/net/mlx5_vnet.c|  4 ++--
 drivers/vdpa/vdpa.c  | 18 ++
 drivers/vdpa/vdpa_sim/vdpa_sim.c |  2 +-
 drivers/vdpa/vdpa_sim/vdpa_sim_net.c |  5 ++---
 drivers/vhost/vdpa.c | 20 +++-
 drivers/vhost/vhost.c|  2 +-
 drivers/virtio/virtio.c  |  6 ++
 drivers/virtio/virtio_mmio.c |  3 +--
 include/linux/vdpa.h | 10 +-
 include/linux/virtio.h   |  2 --
 11 files changed, 37 insertions(+), 40 deletions(-)

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2020-04-16 Thread Michael S. Tsirkin
On Thu, Apr 16, 2020 at 10:01:51AM -0700, Linus Torvalds wrote:
> On Thu, Apr 16, 2020 at 5:20 AM Michael S. Tsirkin  wrote:
> > Well it's all just fallout from
> 
> What? No. Half of it seems to be the moving of "struct vring" around
> to other headers and stuff.
> 
> And then that is done very confusingly too, using two different
> structures both called "struct vring".
> 
> No way can I pull that kind of craziness as a "fix".
> 
> Linus

OK, I'll just disable vhost on that config for now - it was
suggested previously. Thanks for the comment and sorry about geeting it
wrong!


-- 
MST

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2020-04-16 Thread Linus Torvalds
On Thu, Apr 16, 2020 at 5:20 AM Michael S. Tsirkin  wrote:
> Well it's all just fallout from

What? No. Half of it seems to be the moving of "struct vring" around
to other headers and stuff.

And then that is done very confusingly too, using two different
structures both called "struct vring".

No way can I pull that kind of craziness as a "fix".

Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2020-04-16 Thread Michael S. Tsirkin
On Wed, Apr 15, 2020 at 05:46:33PM -0700, Linus Torvalds wrote:
> On Tue, Apr 14, 2020 at 9:36 AM Michael S. Tsirkin  wrote:
> >
> > virtio: fixes, cleanups
> 
> Looking at this, about 75% of it looks like it should have come in
> during the merge window, not now.
> 
>   Linus

Well it's all just fallout from

commit 61b89f23f854f458b8e23719978df58260f051ed
Author: Michael S. Tsirkin 
Date:   Mon Apr 6 08:42:55 2020 -0400

vhost: force spec specified alignment on types

which I didn't know we need until things landed upstream and
people started testing with weird configs.

That forced changes to a header file and the rest followed.

We could just ignore -mabi=apcs-gnu build being broken for this release -
is that preferable? Pls let me know.

-- 
MST

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [GIT PULL] vhost: cleanups and fixes

2020-04-15 Thread Linus Torvalds
On Tue, Apr 14, 2020 at 9:36 AM Michael S. Tsirkin  wrote:
>
> virtio: fixes, cleanups

Looking at this, about 75% of it looks like it should have come in
during the merge window, not now.

  Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[GIT PULL] vhost: cleanups and fixes

2020-04-14 Thread Michael S. Tsirkin
The following changes since commit 835a6a649d0dd1b1f46759eb60fff2f63ed253a7:

  virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for 
VIRTIO_BALLOON_F_DEFLATE_ON_OOM" (2020-04-07 05:44:57 -0400)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to d4a85c2ace895a58dcab687ff49c76719011f58d:

  vdpa: fix comment of vdpa_register_device() (2020-04-13 07:16:41 -0400)


virtio: fixes, cleanups

Some bug fixes.
Cleanup a couple of issues that surfaced meanwhile.

Signed-off-by: Michael S. Tsirkin 


Eugenio Pérez (4):
  vhost: Create accessors for virtqueues private_data
  tools/virtio: Add --batch option
  tools/virtio: Add --batch=random option
  tools/virtio: Add --reset=random

Gustavo A. R. Silva (1):
  vhost: vdpa: remove unnecessary null check

Jason Wang (1):
  vdpa: fix comment of vdpa_register_device()

Jason Yan (1):
  vhost: remove set but not used variable 'status'

Markus Elfring (1):
  virtio-mmio: Delete an error message in vm_find_vqs()

Matej Genci (1):
  virtio: add VIRTIO_RING_NO_LEGACY

Michael S. Tsirkin (22):
  vdpa-sim: depend on HAS_DMA
  virtio/test: fix up after IOTLB changes
  vhost: drop vring dependency on iotlb
  tools/virtio: define aligned attribute
  tools/virtio: make asm/barrier.h self contained
  tools/virtio: define __KERNEL__
  virtgpu: pull in uaccess.h
  virtio-rng: pull in slab.h
  remoteproc: pull in slab.h
  virtio_input: pull in slab.h
  rpmsg: pull in slab.h
  remoteproc: pull in slab.h
  virtio: stop using legacy struct vring in kernel
  vhost: force spec specified alignment on types
  virtio: add legacy init/size APIs
  virtio_ring: switch to virtio_legacy_init/size
  tools/virtio: switch to virtio_legacy_init/size
  vop: switch to virtio_legacy_init/size
  remoteproc: switch to virtio_legacy_init/size
  mellanox: switch to virtio_legacy_init/size
  vdpa: allow a 32 bit vq alignment
  vdpa: make vhost, virtio depend on menu

Stephen Rothwell (1):
  drm/virtio: fix up for include file changes

YueHaibing (2):
  vdpa: remove unused variables 'ifcvf' and 'ifcvf_lm'
  vdpasim: Return status in vdpasim_get_status

 drivers/block/virtio_blk.c   |   1 +
 drivers/char/hw_random/virtio-rng.c  |   1 +
 drivers/gpu/drm/virtio/virtgpu_ioctl.c   |   1 +
 drivers/gpu/drm/virtio/virtgpu_kms.c |   1 +
 drivers/misc/mic/vop/vop_main.c  |   5 +-
 drivers/misc/mic/vop/vop_vringh.c|   8 ++-
 drivers/platform/mellanox/mlxbf-tmfifo.c |   6 +-
 drivers/remoteproc/remoteproc_core.c |   2 +-
 drivers/remoteproc/remoteproc_sysfs.c|   1 +
 drivers/remoteproc/remoteproc_virtio.c   |   2 +-
 drivers/remoteproc/stm32_rproc.c |   1 +
 drivers/rpmsg/mtk_rpmsg.c|   1 +
 drivers/vdpa/Kconfig |  19 +++---
 drivers/vdpa/ifcvf/ifcvf_base.c  |   2 -
 drivers/vdpa/ifcvf/ifcvf_main.c  |   4 +-
 drivers/vdpa/vdpa.c  |   2 +-
 drivers/vdpa/vdpa_sim/vdpa_sim.c |   4 +-
 drivers/vhost/Kconfig|   5 +-
 drivers/vhost/net.c  |  28 +
 drivers/vhost/scsi.c |  14 ++---
 drivers/vhost/test.c |  71 +++---
 drivers/vhost/test.h |   1 +
 drivers/vhost/vdpa.c |   5 --
 drivers/vhost/vhost.h|  33 +-
 drivers/vhost/vringh.c   |   5 ++
 drivers/vhost/vsock.c|  14 ++---
 drivers/virtio/Kconfig   |   2 +-
 drivers/virtio/virtio_input.c|   1 +
 drivers/virtio/virtio_mmio.c |   4 +-
 drivers/virtio/virtio_pci_modern.c   |   1 +
 drivers/virtio/virtio_ring.c |  15 +++--
 include/linux/vdpa.h |   2 +-
 include/linux/virtio.h   |   1 -
 include/linux/virtio_ring.h  |  46 ++
 include/linux/vringh.h   |   7 +++
 include/uapi/linux/virtio_ring.h |  30 ++---
 tools/virtio/Makefile|   5 +-
 tools/virtio/asm/barrier.h   |   1 +
 tools/virtio/generated/autoconf.h|   0
 tools/virtio/linux/compiler.h|   1 +
 tools/virtio/ringtest/virtio_ring_0_9.c  |   6 +-
 tools/virtio/virtio_test.c   | 101 ++-
 tools/virtio/vringh_test.c   |  18 +++---
 43 files changed, 354 insertions(+), 124 deletions(-)
 create mode 100644 tools/virtio/generated/autoconf.h

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org

Re: [PULL] vhost: cleanups and fixes

2020-02-10 Thread Linus Torvalds
On Sun, Feb 9, 2020 at 10:03 PM Michael S. Tsirkin  wrote:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

Hmm? Pull request re-send? This already got merged on Friday as commit
e0f121c5cc2c, as far as I can tell.

It looks like the pr-tracker-bot didn't reply to that old email. Maybe
because the subject line only says "PULL", not "GIT PULL". But more
likely because it looks like lore.kernel.org doesn't have a record of
that email at all.

You might want to check your email settings. You have some odd headers
(including a completely broken name that has "Cc:" in it in the "To:"
field).

   Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2020-02-09 Thread Michael S. Tsirkin
The following changes since commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755:

  Linux 5.5 (2020-01-26 16:23:03 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 1ad6f58ea9364b0a5d8ae06249653ac9304a8578:

  virtio_balloon: Fix memory leaks on errors in virtballoon_probe() (2020-02-06 
03:40:27 -0500)


virtio: fixes, cleanups

Some bug fixes/cleanups.
Deprecated scsi passthrough for blk removed.

Signed-off-by: Michael S. Tsirkin 


Christoph Hellwig (1):
  virtio-blk: remove VIRTIO_BLK_F_SCSI support

Daniel Verkamp (2):
  virtio-balloon: initialize all vq callbacks
  virtio-pci: check name when counting MSI-X vectors

David Hildenbrand (2):
  virtio-balloon: Fix memory leak when unloading while hinting is in 
progress
  virtio_balloon: Fix memory leaks on errors in virtballoon_probe()

Michael S. Tsirkin (1):
  virtio_balloon: prevent pfn array overflow

Yangtao Li (1):
  virtio-mmio: convert to devm_platform_ioremap_resource

 arch/powerpc/configs/guest.config  |   1 -
 drivers/block/Kconfig  |  10 
 drivers/block/virtio_blk.c | 115 +
 drivers/virtio/virtio_balloon.c|  21 +--
 drivers/virtio/virtio_mmio.c   |  15 +
 drivers/virtio/virtio_pci_common.c |   2 +-
 6 files changed, 22 insertions(+), 142 deletions(-)

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2020-02-06 Thread Michael S. Tsirkin
The following changes since commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755:

  Linux 5.5 (2020-01-26 16:23:03 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 1ad6f58ea9364b0a5d8ae06249653ac9304a8578:

  virtio_balloon: Fix memory leaks on errors in virtballoon_probe() (2020-02-06 
03:40:27 -0500)


virtio: fixes, cleanups

Some bug fixes/cleanups.
Deprecated scsi passthrough for blk removed.

Signed-off-by: Michael S. Tsirkin 


Christoph Hellwig (1):
  virtio-blk: remove VIRTIO_BLK_F_SCSI support

Daniel Verkamp (2):
  virtio-balloon: initialize all vq callbacks
  virtio-pci: check name when counting MSI-X vectors

David Hildenbrand (2):
  virtio-balloon: Fix memory leak when unloading while hinting is in 
progress
  virtio_balloon: Fix memory leaks on errors in virtballoon_probe()

Michael S. Tsirkin (1):
  virtio_balloon: prevent pfn array overflow

Yangtao Li (1):
  virtio-mmio: convert to devm_platform_ioremap_resource

 arch/powerpc/configs/guest.config  |   1 -
 drivers/block/Kconfig  |  10 
 drivers/block/virtio_blk.c | 115 +
 drivers/virtio/virtio_balloon.c|  21 +--
 drivers/virtio/virtio_mmio.c   |  15 +
 drivers/virtio/virtio_pci_common.c |   2 +-
 6 files changed, 22 insertions(+), 142 deletions(-)

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2019-10-28 Thread Michael S. Tsirkin
The following changes since commit 7d194c2100ad2a6dded545887d02754948ca5241:

  Linux 5.4-rc4 (2019-10-20 15:56:22 -0400)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to b3683dee840274e9997d958b9d82e5de95950f0b:

  vringh: fix copy direction of vringh_iov_push_kern() (2019-10-28 04:25:04 
-0400)


virtio: fixes

Some minor fixes

Signed-off-by: Michael S. Tsirkin 


Jason Wang (1):
  vringh: fix copy direction of vringh_iov_push_kern()

Marvin Liu (1):
  virtio_ring: fix stalls for packed rings

Stefano Garzarella (1):
  vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'

 drivers/vhost/vringh.c   | 8 +++-
 drivers/virtio/virtio_ring.c | 7 +++
 include/linux/virtio_vsock.h | 1 -
 3 files changed, 10 insertions(+), 6 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2019-10-15 Thread pr-tracker-bot
The pull request you sent on Tue, 15 Oct 2019 17:19:08 -0400:

> https://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/3b1f00aceb7a67bf079a5a64aa5c6baf78a8f442

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2019-10-15 Thread Michael S. Tsirkin
The following changes since commit da0c9ea146cbe92b832f1b0f694840ea8eb33cce:

  Linux 5.4-rc2 (2019-10-06 14:27:30 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 245cdd9fbd396483d501db83047116e2530f245f:

  vhost/test: stop device before reset (2019-10-13 09:38:27 -0400)


virtio: fixes

Some minor bugfixes

Signed-off-by: Michael S. Tsirkin 


Michael S. Tsirkin (3):
  tools/virtio: more stubs
  tools/virtio: xen stub
  vhost/test: stop device before reset

 drivers/vhost/test.c | 2 ++
 tools/virtio/crypto/hash.h   | 0
 tools/virtio/linux/dma-mapping.h | 2 ++
 tools/virtio/xen/xen.h   | 6 ++
 4 files changed, 10 insertions(+)
 create mode 100644 tools/virtio/crypto/hash.h
 create mode 100644 tools/virtio/xen/xen.h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2019-06-03 Thread Michael S. Tsirkin
The following changes since commit cd6c84d8f0cdc911df435bb075ba22ce3c605b07:

  Linux 5.2-rc2 (2019-05-26 16:49:19 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to c1ea02f15ab5efb3e93fc3144d895410bf79fcf2:

  vhost: scsi: add weight support (2019-05-27 11:08:23 -0400)


virtio: fixes

several fixes, some of them for CVEs.

Signed-off-by: Michael S. Tsirkin 


Fabrizio Castro (1):
  virtio: Fix indentation of VIRTIO_MMIO

Igor Stoppa (1):
  virtio: add unlikely() to WARN_ON_ONCE()

Jason Wang (4):
  vhost: introduce vhost_exceeds_weight()
  vhost_net: fix possible infinite loop
  vhost: vsock: add weight support
  vhost: scsi: add weight support

 drivers/vhost/net.c | 41 ++---
 drivers/vhost/scsi.c| 21 ++---
 drivers/vhost/vhost.c   | 20 +++-
 drivers/vhost/vhost.h   |  5 -
 drivers/vhost/vsock.c   | 28 +---
 drivers/virtio/Kconfig  |  8 
 tools/virtio/linux/kernel.h |  2 +-
 7 files changed, 77 insertions(+), 48 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2019-05-14 Thread pr-tracker-bot
The pull request you sent on Tue, 14 May 2019 17:11:47 -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/35c99ffa20edd3c24be352d28a63cd3a23121282

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2019-05-14 Thread Michael S. Tsirkin
The following changes since commit e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd:

  Linux 5.1 (2019-05-05 17:42:58 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 050f4c4d2fbbd8217d94dc21051cc597d2a6848b:

  virtio/s390: enable packed ring (2019-05-12 13:11:36 -0400)


virtio: fixes, features

s390 has packed ring support.
several fixes.

Signed-off-by: Michael S. Tsirkin 


Halil Pasic (3):
  virtio/s390: use vring_create_virtqueue
  virtio/s390: DMA support for virtio-ccw
  virtio/s390: enable packed ring

Jiang Biao (1):
  virtio/virtio_ring: do some comment fixes

Jonathan Neuschäfer (1):
  tools/virtio/ringtest: Remove bogus definition of BUG_ON()

Paolo Bonzini (1):
  vhost-scsi: remove incorrect memory barrier

YueHaibing (1):
  virtio_ring: Fix potential mem leak in virtqueue_add_indirect_packed

 drivers/s390/virtio/virtio_ccw.c | 52 +++-
 drivers/vhost/scsi.c |  1 -
 drivers/virtio/virtio_ring.c | 28 --
 include/linux/virtio.h   | 17 -
 tools/virtio/ringtest/ptr_ring.c |  1 -
 5 files changed, 40 insertions(+), 59 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PULL] vhost: cleanups and fixes

2018-11-30 Thread Michael S. Tsirkin
On Fri, Nov 30, 2018 at 11:01:03AM -0800, Bijan Mottahedeh wrote:
> On 11/30/2018 5:44 AM, Michael S. Tsirkin wrote:
> > On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
> > > > +   memset(, 0, sizeof(rsp));
> > > > +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > > +   resp = vq->iov[out].iov_base;
> > > > +   ret = __copy_to_user(resp, , sizeof(rsp));
> > > > 
> > > > Is it actually safe to trust that iov_base has passed an earlier
> > > > access_ok() check here? Why not just use copy_to_user() instead?
> > > Good point.
> > > 
> > > We really should have removed those double-underscore things ages ago.
> > > 
> > > Also, apart from the address, what about the size? Wouldn't it be
> > > better to use copy_to_iter() rather than implement it badly by hand?
> > > 
> > > Linus
> > Bijan can you respond please?
> > Are you going to look into this and convert code to copy_to_iter?
> > I don't think we should release Linux like this, so if you don't
> > have the time I'd rather revert for now and you can look
> > into reposting for the next release.
> > 
> > Thanks,
> > 
> 
> Sure, will do.  Can I send an individual patch for the fix to
> vhost_scsi_send_tmf_reject()?
> 
> Thanks.
> 
> --bijan

Please go ahead.

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-30 Thread Michael S. Tsirkin
On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
> >
> > +   memset(, 0, sizeof(rsp));
> > +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +   resp = vq->iov[out].iov_base;
> > +   ret = __copy_to_user(resp, , sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.
> 
> Also, apart from the address, what about the size? Wouldn't it be
> better to use copy_to_iter() rather than implement it badly by hand?
> 
>Linus

Bijan can you respond please?
Are you going to look into this and convert code to copy_to_iter?
I don't think we should release Linux like this, so if you don't
have the time I'd rather revert for now and you can look
into reposting for the next release.

Thanks,

-- 
MST

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Al Viro
On Fri, Nov 02, 2018 at 10:15:56AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds
>  wrote:
> >
> > Don't you take over the VM with "use_mm()" when you do the copies? So
> > yes, it's a kernel thread, but it has a user VM, and though that
> > should have the user limits.
> 
> Oooh. *Just* as I sent this, I realized that "use_mm()" doesn't update
> the thread addr_limit.
> 
> That actually looks like a bug to me - although one that you've
> apparently been aware of and worked around.
> 
> Wouldn't it be nicer to just make "use_mm()" do
> 
> set_fs(USER_DS);
> 
> instead? And undo it on unuse_mm()?
> 
> And, in fact, maybe we should default kernel threads to have a zero
> address limit, so that they can't do any user accesses at all without
> doing this?

Try it and watch it fail to set initramfs up, let alone exec the init...

> Adding Al to the cc, because I think he's been looking at set_fs() in general.

It would be the right thing (with return to KERNEL_DS), but I'm not certain
if GPU users will survive - these two
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h:157: 
use_mm(mmptr);  \
drivers/gpu/drm/i915/gvt/kvmgt.c:1799:  use_mm(kvm->mm);
I don't understand the call chains there (especially for the first one) well
enough to tell.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Michael S. Tsirkin
On Fri, Nov 02, 2018 at 11:02:35AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 10:21 AM Michael S. Tsirkin  wrote:
> >
> > it seems that it depends on current not on the active mm.
> 
> Yes, see my other suggestion to just fix "use_mm()" to update the address 
> range.
> 
> Would you mind testing that?

Sure, I'll test it.

> Because that would seem to be the *much* less error-prone model..
> 
>Linus

I agree, it's always been bothering me.

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 10:21 AM Michael S. Tsirkin  wrote:
>
> it seems that it depends on current not on the active mm.

Yes, see my other suggestion to just fix "use_mm()" to update the address range.

Would you mind testing that?

Because that would seem to be the *much* less error-prone model..

   Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 9:59 AM Michael S. Tsirkin  wrote:
>
> Just for completeness I'd like to point out for vhost the copies are
> done from the kernel thread.  So yes we can switch to copy_to/from_user
> but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
> IIUC not sufficient - we must *also* do access_ok checks on control path
> when addresses are passed to the kernel and when current points to the
> correct task struct.

Don't you take over the VM with "use_mm()" when you do the copies? So
yes, it's a kernel thread, but it has a user VM, and though that
should have the user limits.

No?

  Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 10:10 AM Linus Torvalds
 wrote:
>
> Don't you take over the VM with "use_mm()" when you do the copies? So
> yes, it's a kernel thread, but it has a user VM, and though that
> should have the user limits.

Oooh. *Just* as I sent this, I realized that "use_mm()" doesn't update
the thread addr_limit.

That actually looks like a bug to me - although one that you've
apparently been aware of and worked around.

Wouldn't it be nicer to just make "use_mm()" do

set_fs(USER_DS);

instead? And undo it on unuse_mm()?

And, in fact, maybe we should default kernel threads to have a zero
address limit, so that they can't do any user accesses at all without
doing this?

Adding Al to the cc, because I think he's been looking at set_fs() in general.

  Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Michael S. Tsirkin
On Fri, Nov 02, 2018 at 10:10:45AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 9:59 AM Michael S. Tsirkin  wrote:
> >
> > Just for completeness I'd like to point out for vhost the copies are
> > done from the kernel thread.  So yes we can switch to copy_to/from_user
> > but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
> > IIUC not sufficient - we must *also* do access_ok checks on control path
> > when addresses are passed to the kernel and when current points to the
> > correct task struct.
> 
> Don't you take over the VM with "use_mm()" when you do the copies?

Yes we do.

> So
> yes, it's a kernel thread, but it has a user VM, and though that
> should have the user limits.
> 
> No?
> 
>   Linus

Here's what I meant: we have

#define access_ok(type, addr, size) \
({  \
WARN_ON_IN_IRQ();   \
likely(!__range_not_ok(addr, size, user_addr_max()));   \
})

and

#define user_addr_max() (current->thread.addr_limit.seg)

it seems that it depends on current not on the active mm.

get_user and friends are similar:

ENTRY(__get_user_1)
mov PER_CPU_VAR(current_task), %_ASM_DX
cmp TASK_addr_limit(%_ASM_DX),%_ASM_AX
jae bad_get_user
sbb %_ASM_DX, %_ASM_DX  /* array_index_mask_nospec() */
and %_ASM_DX, %_ASM_AX
ASM_STAC
1:  movzbl (%_ASM_AX),%edx
xor %eax,%eax
ASM_CLAC
ret
ENDPROC(__get_user_1)
EXPORT_SYMBOL(__get_user_1)

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Michael S. Tsirkin
On Fri, Nov 02, 2018 at 09:14:51AM -0700, Linus Torvalds wrote:
> On Fri, Nov 2, 2018 at 6:04 AM Michael S. Tsirkin  wrote:
> >
> > I've tried making access_ok mask the parameter it gets.
> 
> PLEASE don't do this.

Okay.

> Just use "copy_to/from_user()".

Just for completeness I'd like to point out for vhost the copies are
done from the kernel thread.  So yes we can switch to copy_to/from_user
but for e.g. 32-bit userspace running on top of a 64 bit kernel it is
IIUC not sufficient - we must *also* do access_ok checks on control path
when addresses are passed to the kernel and when current points to the
correct task struct.

> We have had lots of bugs because code bitrots.

Yes, I wish we did not need these access_ok checks and could just rely
on copy_to/from_user.

> And no, the access_ok() checks aren't expensive, not even in a loop.
> They *used* to be somewhat expensive compared to the access, but that
> simply isn't true any more. The real expense in copy_to_user and
> friends are in the user access bit setting (STAC and CLAC on x86),
> which easily an order of magnitude more expensive than access_ok().
> 
> So just get rid of the double-underscore version. It's basically
> always a mis-optimization due to entirely historical reasons. I can
> pretty much guarantee that it's not visible in profiles.
> 
>   Linus

OK. So maybe we should focus on switching to user_access_begin/end +
unsafe_get_user/unsafe_put_user in a loop which does seem to be
measureable.  That moves the barrier out of the loop, which seems to be
consistent with what you would expect.

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Linus Torvalds
On Fri, Nov 2, 2018 at 6:04 AM Michael S. Tsirkin  wrote:
>
> I've tried making access_ok mask the parameter it gets.

PLEASE don't do this.

Just use "copy_to/from_user()".

We have had lots of bugs because code bitrots.

And no, the access_ok() checks aren't expensive, not even in a loop.
They *used* to be somewhat expensive compared to the access, but that
simply isn't true any more. The real expense in copy_to_user and
friends are in the user access bit setting (STAC and CLAC on x86),
which easily an order of magnitude more expensive than access_ok().

So just get rid of the double-underscore version. It's basically
always a mis-optimization due to entirely historical reasons. I can
pretty much guarantee that it's not visible in profiles.

  Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-03 Thread Michael S. Tsirkin
On Fri, Nov 02, 2018 at 11:46:36AM +, Mark Rutland wrote:
> On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> > On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
> > >
> > > +   memset(, 0, sizeof(rsp));
> > > +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > > +   resp = vq->iov[out].iov_base;
> > > +   ret = __copy_to_user(resp, , sizeof(rsp));
> > >
> > > Is it actually safe to trust that iov_base has passed an earlier
> > > access_ok() check here? Why not just use copy_to_user() instead?
> > 
> > Good point.
> > 
> > We really should have removed those double-underscore things ages ago.
> 
> FWIW, on arm64 we always check/sanitize the user address as a result of
> our sanitization of speculated values. Almost all of our uaccess
> routines have an explicit access_ok().
> 
> All our uaccess routines mask the user pointer based on addr_limit,
> which prevents speculative or architectural uaccess to kernel addresses
> when addr_limit it USER_DS:
> 
> 4d8efc2d5ee4c9cc ("arm64: Use pointer masking to limit uaccess 
> speculation")
> 
> We also inhibit speculative stores to addr_limit being forwarded under
> speculation:
> 
> c2f0ad4fc089cff8 ("arm64: uaccess: Prevent speculative use of the current 
> addr_limit")
> 
> ... and given all that, we folded explicit access_ok() checks into
> __{get,put}_user():
> 
> 84624087dd7e3b48 ("arm64: uaccess: Don't bother eliding access_ok checks 
> in __{get, put}_user")
> 
> IMO we could/should do the same for __copy_{to,from}_user().
> 
> Thanks,
> Mark.

I've tried making access_ok mask the parameter it gets.  Works because
access_ok is a macro. Most users pass in a variable so that will block
attempts to use speculation to bypass the access_ok checks.

Not 100% as someone can copy the value before access_ok, but
then it's all mitigation anyway.

Places which call access_ok on a non-lvalue need to be fixed then but
there are not too many of these.

The advantage here is that a code like this:

access_ok
for(...)
__get_user

isn't slowed down as the masking is outside the loop.

OTOH macros changing their arguments are kind of ugly.
What do others think?

Just to show what I mean:

Signed-off-by: Michael S. Tsirkin 

diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index aae77eb8491c..c4d12c8f47d7 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -7,6 +7,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -69,6 +70,33 @@ static inline bool __chk_range_not_ok(unsigned long addr, 
unsigned long size, un
__chk_range_not_ok((unsigned long __force)(addr), size, limit); \
 })
 
+/*
+ * Test whether a block of memory is a valid user space address.
+ * Returns 0 if the range is valid, address itself otherwise.
+ */
+static inline unsigned long __verify_range_nospec(unsigned long addr,
+ unsigned long size,
+ unsigned long limit)
+{
+   /* Be careful about overflow */
+   limit = array_index_nospec(limit, size);
+
+   /*
+* If we have used "sizeof()" for the size,
+* we know it won't overflow the limit (but
+* it might overflow the 'addr', so it's
+* important to subtract the size from the
+* limit, not add it to the address).
+*/
+   if (__builtin_constant_p(size)) {
+   return array_index_nospec(addr, limit - size + 1);
+   }
+
+   /* Arbitrary sizes? Be careful about overflow */
+   return array_index_mask_nospec(limit, size) &
+   array_index_nospec(addr, limit - size + 1);
+}
+
 #ifdef CONFIG_DEBUG_ATOMIC_SLEEP
 # define WARN_ON_IN_IRQ()  WARN_ON_ONCE(!in_task())
 #else
@@ -95,12 +123,46 @@ static inline bool __chk_range_not_ok(unsigned long addr, 
unsigned long size, un
  * checks that the pointer is in the user space range - after calling
  * this function, memory access functions may still return -EFAULT.
  */
-#define access_ok(type, addr, size)\
+#define unsafe_access_ok(type, addr, size) 
\
 ({ \
WARN_ON_IN_IRQ();   \
likely(!__range_not_ok(addr, size, user_addr_max()));   \
 })
 
+/**
+ * access_ok_nospec: - Checks if a user space pointer is valid
+ * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE.  Note that
+ *%VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe
+ *to write to a block, it is always safe to read from it.
+ * @addr: User space pointer to start of block to check
+ * @size: Size of block to check
+ *
+ * Context: User context only. This function may sleep if pagefaults are
+ *  enabled.
+ *
+ * Checks if a pointer to a block of memory in user space is 

Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Mark Rutland
On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
> >
> > +   memset(, 0, sizeof(rsp));
> > +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +   resp = vq->iov[out].iov_base;
> > +   ret = __copy_to_user(resp, , sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.

FWIW, on arm64 we always check/sanitize the user address as a result of
our sanitization of speculated values. Almost all of our uaccess
routines have an explicit access_ok().

All our uaccess routines mask the user pointer based on addr_limit,
which prevents speculative or architectural uaccess to kernel addresses
when addr_limit it USER_DS:

4d8efc2d5ee4c9cc ("arm64: Use pointer masking to limit uaccess speculation")

We also inhibit speculative stores to addr_limit being forwarded under
speculation:

c2f0ad4fc089cff8 ("arm64: uaccess: Prevent speculative use of the current 
addr_limit")

... and given all that, we folded explicit access_ok() checks into
__{get,put}_user():

84624087dd7e3b48 ("arm64: uaccess: Don't bother eliding access_ok checks in 
__{get, put}_user")

IMO we could/should do the same for __copy_{to,from}_user().

Thanks,
Mark.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Michael S. Tsirkin
On Thu, Nov 01, 2018 at 04:06:19PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
> >
> > +   memset(, 0, sizeof(rsp));
> > +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> > +   resp = vq->iov[out].iov_base;
> > +   ret = __copy_to_user(resp, , sizeof(rsp));
> >
> > Is it actually safe to trust that iov_base has passed an earlier
> > access_ok() check here? Why not just use copy_to_user() instead?
> 
> Good point.
> 
> We really should have removed those double-underscore things ages ago.

Well in case of vhost there are a bunch of reasons to keep them.

One is that all access_ok checks take place
way earlier in context of the owner task. Result is saved
and then used for access repeatedly. Skipping reding access_ok twice
did seem to give a small speedup in the past.
In fact I am looking
into switching some of the uses to unsafe_put_user/unsafe_get_user
after doing something like barrier_nospec after the
access_ok checks. Seems to give a measureable speedup.


Another is that the double underscore things actually can be done
in softirq context if you do preempt_disable/preempt_enable.
IIUC Jason's looking into using that to cut down the latency
for when the access is very small.

> Also, apart from the address, what about the size? Wouldn't it be
> better to use copy_to_iter() rather than implement it badly by hand?
> 
>Linus

Generally size is checked when we retrieve the iov but I will recheck
this case and reply here.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Michael S. Tsirkin
On Thu, Nov 01, 2018 at 04:00:23PM -0700, Kees Cook wrote:
> On Thu, Nov 1, 2018 at 2:19 PM, Michael S. Tsirkin  wrote:
> > The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
> >
> >   Linux 4.19 (2018-10-22 07:37:37 +0100)
> >
> > are available in the Git repository at:
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
> >
> > for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:
> >
> >   MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 
> > -0400)
> >
> > 
> > virtio, vhost: fixes, tweaks
> >
> > virtio balloon page hinting support
> > vhost scsi control queue
> >
> > misc fixes.
> >
> > Signed-off-by: Michael S. Tsirkin 
> >
> > 
> > Bijan Mottahedeh (3):
> >   vhost/scsi: Respond to control queue operations
> 
> +static void
> +vhost_scsi_send_tmf_resp(struct vhost_scsi *vs,
> +  struct vhost_virtqueue *vq,
> +  int head, unsigned int out)
> +{
> +   struct virtio_scsi_ctrl_tmf_resp __user *resp;
> +   struct virtio_scsi_ctrl_tmf_resp rsp;
> +   int ret;
> +
> +   pr_debug("%s\n", __func__);
> +   memset(, 0, sizeof(rsp));
> +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> +   resp = vq->iov[out].iov_base;
> +   ret = __copy_to_user(resp, , sizeof(rsp));
> 
> Is it actually safe to trust that iov_base has passed an earlier
> access_ok() check here? Why not just use copy_to_user() instead?
> 
> -Kees

I am not sure copy_to_user will do the right thing here, because all
this runs in context of a kernel thread.  We do need access_ok which
takes place way earlier in context of the task.

Another reason it is safe is because the address is not
coming from userspace at all.




> >   vhost/scsi: Extract common handling code from control queue handler
> >   vhost/scsi: Use common handling code in request queue handler
> >
> > Greg Edwards (1):
> >   vhost/scsi: truncate T10 PI iov_iter to prot_bytes
> >
> > Lénaïc Huard (1):
> >   kvm_config: add CONFIG_VIRTIO_MENU
> >
> > Stefan Hajnoczi (1):
> >   MAINTAINERS: remove reference to bogus vsock file
> >
> > Wei Wang (3):
> >   virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> >   mm/page_poison: expose page_poisoning_enabled to kernel modules
> >   virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
> >
> >  MAINTAINERS |   1 -
> >  drivers/vhost/scsi.c| 426 
> > 
> >  drivers/virtio/virtio_balloon.c | 380 +---
> >  include/uapi/linux/virtio_balloon.h |   8 +
> >  kernel/configs/kvm_guest.config |   1 +
> >  mm/page_poison.c|   6 +
> >  6 files changed, 688 insertions(+), 134 deletions(-)
> 
> 
> 
> -- 
> Kees Cook
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Linus Torvalds
On Thu, Nov 1, 2018 at 4:00 PM Kees Cook  wrote:
>
> +   memset(, 0, sizeof(rsp));
> +   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
> +   resp = vq->iov[out].iov_base;
> +   ret = __copy_to_user(resp, , sizeof(rsp));
>
> Is it actually safe to trust that iov_base has passed an earlier
> access_ok() check here? Why not just use copy_to_user() instead?

Good point.

We really should have removed those double-underscore things ages ago.

Also, apart from the address, what about the size? Wouldn't it be
better to use copy_to_iter() rather than implement it badly by hand?

   Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Kees Cook
On Thu, Nov 1, 2018 at 2:19 PM, Michael S. Tsirkin  wrote:
> The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:
>
>   Linux 4.19 (2018-10-22 07:37:37 +0100)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
>
> for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:
>
>   MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 
> -0400)
>
> 
> virtio, vhost: fixes, tweaks
>
> virtio balloon page hinting support
> vhost scsi control queue
>
> misc fixes.
>
> Signed-off-by: Michael S. Tsirkin 
>
> 
> Bijan Mottahedeh (3):
>   vhost/scsi: Respond to control queue operations

+static void
+vhost_scsi_send_tmf_resp(struct vhost_scsi *vs,
+  struct vhost_virtqueue *vq,
+  int head, unsigned int out)
+{
+   struct virtio_scsi_ctrl_tmf_resp __user *resp;
+   struct virtio_scsi_ctrl_tmf_resp rsp;
+   int ret;
+
+   pr_debug("%s\n", __func__);
+   memset(, 0, sizeof(rsp));
+   rsp.response = VIRTIO_SCSI_S_FUNCTION_REJECTED;
+   resp = vq->iov[out].iov_base;
+   ret = __copy_to_user(resp, , sizeof(rsp));

Is it actually safe to trust that iov_base has passed an earlier
access_ok() check here? Why not just use copy_to_user() instead?

-Kees

>   vhost/scsi: Extract common handling code from control queue handler
>   vhost/scsi: Use common handling code in request queue handler
>
> Greg Edwards (1):
>   vhost/scsi: truncate T10 PI iov_iter to prot_bytes
>
> Lénaïc Huard (1):
>   kvm_config: add CONFIG_VIRTIO_MENU
>
> Stefan Hajnoczi (1):
>   MAINTAINERS: remove reference to bogus vsock file
>
> Wei Wang (3):
>   virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
>   mm/page_poison: expose page_poisoning_enabled to kernel modules
>   virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
>
>  MAINTAINERS |   1 -
>  drivers/vhost/scsi.c| 426 
> 
>  drivers/virtio/virtio_balloon.c | 380 +---
>  include/uapi/linux/virtio_balloon.h |   8 +
>  kernel/configs/kvm_guest.config |   1 +
>  mm/page_poison.c|   6 +
>  6 files changed, 688 insertions(+), 134 deletions(-)



-- 
Kees Cook
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PULL] vhost: cleanups and fixes

2018-11-02 Thread Linus Torvalds
On Thu, Nov 1, 2018 at 2:19 PM Michael S. Tsirkin  wrote:
>
> virtio, vhost: fixes, tweaks

Pulled.

   Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2018-11-01 Thread Michael S. Tsirkin
The following changes since commit 84df9525b0c27f3ebc2ebb1864fa62a97fdedb7d:

  Linux 4.19 (2018-10-22 07:37:37 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 79f800b2e76923cd8ce0aa659cb5c019d9643bc9:

  MAINTAINERS: remove reference to bogus vsock file (2018-10-24 21:16:14 -0400)


virtio, vhost: fixes, tweaks

virtio balloon page hinting support
vhost scsi control queue

misc fixes.

Signed-off-by: Michael S. Tsirkin 


Bijan Mottahedeh (3):
  vhost/scsi: Respond to control queue operations
  vhost/scsi: Extract common handling code from control queue handler
  vhost/scsi: Use common handling code in request queue handler

Greg Edwards (1):
  vhost/scsi: truncate T10 PI iov_iter to prot_bytes

Lénaïc Huard (1):
  kvm_config: add CONFIG_VIRTIO_MENU

Stefan Hajnoczi (1):
  MAINTAINERS: remove reference to bogus vsock file

Wei Wang (3):
  virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
  mm/page_poison: expose page_poisoning_enabled to kernel modules
  virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

 MAINTAINERS |   1 -
 drivers/vhost/scsi.c| 426 
 drivers/virtio/virtio_balloon.c | 380 +---
 include/uapi/linux/virtio_balloon.h |   8 +
 kernel/configs/kvm_guest.config |   1 +
 mm/page_poison.c|   6 +
 6 files changed, 688 insertions(+), 134 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PULL] vhost: cleanups and fixes

2018-06-14 Thread Wei Wang

On 06/14/2018 11:01 PM, Nitesh Narayan Lal wrote:

Hi Wei,


On 06/12/2018 07:05 AM, Wei Wang wrote:

On 06/12/2018 09:59 AM, Linus Torvalds wrote:

On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin 
wrote:

Maybe it will help to have GFP_NONE which will make any allocation
fail if attempted. Linus, would this address your comment?

It would definitely have helped me initially overlook that call chain.

But then when I started looking at the whole dma_map_page() thing, it
just raised my hackles again.

I would seriously suggest having a much simpler version for the "no
allocation, no dma mapping" case, so that it's *obvious* that that
never happens.

So instead of having virtio_balloon_send_free_pages() call a really
generic complex chain of functions that in _some_ cases can do memory
allocation, why isn't there a short-circuited "vitruque_add_datum()"
that is guaranteed to never do anything like that?

Honestly, I look at "add_one_sg()" and it really doesn't make me
happy. It looks hacky as hell. If I read the code right, you're really
trying to just queue up a simple tuple of , except you encode
it as a page pointer in order to play games with the SG logic, and
then you hmap that to the ring, except in this case it's all a fake
ring that just adds the cpu-physical address instead.

And to figuer that out, it's like five layers of indirection through
different helper functions that *can* do more generic things but in
this case don't.

And you do all of this from a core VM callback function with some
_really_ core VM locks held.

That makes no sense to me.

How about this:

   - get rid of all that code

   - make the core VM callback save the "these are the free memory
regions" in a fixed and limited array. One that DOES JUST THAT. No
crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
size, pre-allocated for that virtio instance.

   - make it obvious that what you do in that sequence is ten
instructions and no allocations ("Look ma, I wrote a value to an array
and incremented the array idex, and I'M DONE")

   - then in that workqueue entry that you start *anyway*, you empty the
array and do all the crazy virtio stuff.

In fact, while at it, just simplify the VM interface too. Instead of
traversing a random number of buddy lists, just trraverse *one* - the
top-level one. Are you seriously ever going to shrink or mark
read-only anythin *but* something big enough to be in the maximum
order?

MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
want the balloon code to work on smaller things, particularly since
the whole interface is fundamentally racy and opportunistic to begin
with?

OK, I will implement a new version based on the suggestions. Thanks.

I have been working on a similar series [1] that is more generic, which
solves the problem of giving unused memory back to the host and could be
used to solve the migration problem as well. Can you take a look and see
if you can use my series in some way?


Hi Nitesh,

I actually checked the last version, which dates back to last year. It 
seems the new version does not have fundamental differences.


Actually there are obvious differences between the two series. This 
series provides a simple lightweight method (will continue to post out a 
new version with simpler interfaces based on the above suggestions) to 
offer free pages hints, and the hints are quit helpful for usages like 
accelerating live migration and guest snapshot. If I read that 
correctly, that series seems to provide true (guaranteed) free pages 
with much more heavyweight logics, but true free pages are not necessary 
for the live migration optimization, which is the goal and motivation of 
this work. And from my point of view, that series seems more like an 
alternative function to ballooning, which takes out free pages (or say 
guest unused pages) via allocation.


I will join the discussion in that thread. Probably we would need to 
think about other new usages for that series.


Best,
Wei
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-12 Thread Wei Wang

On 06/12/2018 09:59 AM, Linus Torvalds wrote:

On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin  wrote:

Maybe it will help to have GFP_NONE which will make any allocation
fail if attempted. Linus, would this address your comment?

It would definitely have helped me initially overlook that call chain.

But then when I started looking at the whole dma_map_page() thing, it
just raised my hackles again.

I would seriously suggest having a much simpler version for the "no
allocation, no dma mapping" case, so that it's *obvious* that that
never happens.

So instead of having virtio_balloon_send_free_pages() call a really
generic complex chain of functions that in _some_ cases can do memory
allocation, why isn't there a short-circuited "vitruque_add_datum()"
that is guaranteed to never do anything like that?

Honestly, I look at "add_one_sg()" and it really doesn't make me
happy. It looks hacky as hell. If I read the code right, you're really
trying to just queue up a simple tuple of , except you encode
it as a page pointer in order to play games with the SG logic, and
then you hmap that to the ring, except in this case it's all a fake
ring that just adds the cpu-physical address instead.

And to figuer that out, it's like five layers of indirection through
different helper functions that *can* do more generic things but in
this case don't.

And you do all of this from a core VM callback function with some
_really_ core VM locks held.

That makes no sense to me.

How about this:

  - get rid of all that code

  - make the core VM callback save the "these are the free memory
regions" in a fixed and limited array. One that DOES JUST THAT. No
crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
size, pre-allocated for that virtio instance.

  - make it obvious that what you do in that sequence is ten
instructions and no allocations ("Look ma, I wrote a value to an array
and incremented the array idex, and I'M DONE")

  - then in that workqueue entry that you start *anyway*, you empty the
array and do all the crazy virtio stuff.

In fact, while at it, just simplify the VM interface too. Instead of
traversing a random number of buddy lists, just trraverse *one* - the
top-level one. Are you seriously ever going to shrink or mark
read-only anythin *but* something big enough to be in the maximum
order?

MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
want the balloon code to work on smaller things, particularly since
the whole interface is fundamentally racy and opportunistic to begin
with?


OK, I will implement a new version based on the suggestions. Thanks.

Best,
Wei

___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-11 Thread Linus Torvalds
On Mon, Jun 11, 2018 at 6:36 PM Michael S. Tsirkin  wrote:
>
> Maybe it will help to have GFP_NONE which will make any allocation
> fail if attempted. Linus, would this address your comment?

It would definitely have helped me initially overlook that call chain.

But then when I started looking at the whole dma_map_page() thing, it
just raised my hackles again.

I would seriously suggest having a much simpler version for the "no
allocation, no dma mapping" case, so that it's *obvious* that that
never happens.

So instead of having virtio_balloon_send_free_pages() call a really
generic complex chain of functions that in _some_ cases can do memory
allocation, why isn't there a short-circuited "vitruque_add_datum()"
that is guaranteed to never do anything like that?

Honestly, I look at "add_one_sg()" and it really doesn't make me
happy. It looks hacky as hell. If I read the code right, you're really
trying to just queue up a simple tuple of , except you encode
it as a page pointer in order to play games with the SG logic, and
then you hmap that to the ring, except in this case it's all a fake
ring that just adds the cpu-physical address instead.

And to figuer that out, it's like five layers of indirection through
different helper functions that *can* do more generic things but in
this case don't.

And you do all of this from a core VM callback function with some
_really_ core VM locks held.

That makes no sense to me.

How about this:

 - get rid of all that code

 - make the core VM callback save the "these are the free memory
regions" in a fixed and limited array. One that DOES JUST THAT. No
crazy "SG IO dma-mapping function crap". Just a plain array of a fixed
size, pre-allocated for that virtio instance.

 - make it obvious that what you do in that sequence is ten
instructions and no allocations ("Look ma, I wrote a value to an array
and incremented the array idex, and I'M DONE")

 - then in that workqueue entry that you start *anyway*, you empty the
array and do all the crazy virtio stuff.

In fact, while at it, just simplify the VM interface too. Instead of
traversing a random number of buddy lists, just trraverse *one* - the
top-level one. Are you seriously ever going to shrink or mark
read-only anythin *but* something big enough to be in the maximum
order?

MAX_ORDER is what, 11? So we're talking 8MB blocks. Do you *really*
want the balloon code to work on smaller things, particularly since
the whole interface is fundamentally racy and opportunistic to begin
with?

The whole sequence of events really looks "this is too much
complexity, and way too fragile" to me at so many levels.

 Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-11 Thread Michael S. Tsirkin
On Mon, Jun 11, 2018 at 11:32:41AM -0700, Linus Torvalds wrote:
> On Mon, Jun 11, 2018 at 9:24 AM Michael S. Tsirkin  wrote:
> >
> >   virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> 
> Is this really a good idea?

Well knowing which pages are unused does seem to be useful.  Do you
refer to this generally or to the idea of scanning the free list,
or to the specific implementation issues you listed below?


> Plus it seems entirely broken.
> 
> The report_pfn_range() callback is done under the zone lock, but
> virtio_balloon_send_free_pages() (which is the only callback used that
> I can find) does add_one_sg(), which does virtqueue_add_inbuf(vq, ,
> 1, vq, GFP_KERNEL);
> 
> So now we apparently do a GFP_KERNEL allocation insider the mm zone
> lock, which is broken on just _so_ many levels.
> 
> Pulled and then unpulled again.
> 
> Either somebody needs to explain why I'm wrong and you can re-submit
> this, or this kind of garbage needs to go away.
> 
> I do *not* want to be in the situation where I pull stuff from the
> virtio people that adds completely broken core VM functionality.
> 
> Because if I'm in that situation, I will stop pulling from you guys.
> Seriously. You have *no* place sending me broken shit that is outside
> the virtio layer.
> 
> Subsystems that break code MM will get shunned. You just aren't
> important enough to allow you breaking code VM.
> 
> Linus

So no, it doesn't do any allocations - GFP_KERNEL or otherwise, but I
agree how it might be confusing.

So I'll drop this for now, but it would be nice if there is a bit more
direction on this feature since I know several people are trying to work
on this.


-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-11 Thread Michael S. Tsirkin
On Mon, Jun 11, 2018 at 11:44:05AM -0700, Linus Torvalds wrote:
> On Mon, Jun 11, 2018 at 11:32 AM Linus Torvalds
>  wrote:
> >
> > So now we apparently do a GFP_KERNEL allocation insider the mm zone
> > lock, which is broken on just _so_ many levels.
> 
> Oh, I see the comment about how it doesn't actually do an allocation
> at all because it's a single-entry.
> 
> Still too damn ugly to live, and much too fragile. No way in hell do
> we even _hint_ at a GFP_KERNEL when we're inside a context that can't
> do any memory allocation at all.
> 
> Plus I'm not convinced it's a "no allocation" path even despite that
> comment, because it also does a "dma_map_page()" etc, which can cause
> allocations to do the dma mapping thing afaik. No?

Well no because DMA is triggered by the IOMMU flag and
that is always off for the balloon. But I hear what you
are saying about it being fragile.

> Maybe there's some reason why that doesn't happen either, but
> basically this whole callchain looks *way* to complicated to be used
> under a core VM spinlock.
> 
> Linus

Maybe it will help to have GFP_NONE which will make any allocation
fail if attempted. Linus, would this address your comment?
-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-11 Thread Linus Torvalds
On Mon, Jun 11, 2018 at 11:32 AM Linus Torvalds
 wrote:
>
> So now we apparently do a GFP_KERNEL allocation insider the mm zone
> lock, which is broken on just _so_ many levels.

Oh, I see the comment about how it doesn't actually do an allocation
at all because it's a single-entry.

Still too damn ugly to live, and much too fragile. No way in hell do
we even _hint_ at a GFP_KERNEL when we're inside a context that can't
do any memory allocation at all.

Plus I'm not convinced it's a "no allocation" path even despite that
comment, because it also does a "dma_map_page()" etc, which can cause
allocations to do the dma mapping thing afaik. No?

Maybe there's some reason why that doesn't happen either, but
basically this whole callchain looks *way* to complicated to be used
under a core VM spinlock.

Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2018-06-11 Thread Linus Torvalds
On Mon, Jun 11, 2018 at 9:24 AM Michael S. Tsirkin  wrote:
>
>   virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

Is this really a good idea?

Plus it seems entirely broken.

The report_pfn_range() callback is done under the zone lock, but
virtio_balloon_send_free_pages() (which is the only callback used that
I can find) does add_one_sg(), which does virtqueue_add_inbuf(vq, ,
1, vq, GFP_KERNEL);

So now we apparently do a GFP_KERNEL allocation insider the mm zone
lock, which is broken on just _so_ many levels.

Pulled and then unpulled again.

Either somebody needs to explain why I'm wrong and you can re-submit
this, or this kind of garbage needs to go away.

I do *not* want to be in the situation where I pull stuff from the
virtio people that adds completely broken core VM functionality.

Because if I'm in that situation, I will stop pulling from you guys.
Seriously. You have *no* place sending me broken shit that is outside
the virtio layer.

Subsystems that break code MM will get shunned. You just aren't
important enough to allow you breaking code VM.

Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2018-06-11 Thread Michael S. Tsirkin
The following changes since commit 29dcea88779c856c7dc92040a0c01233263101d4:

  Linux 4.17 (2018-06-03 14:15:21 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to aa15783ee62d57d69433101ede3e3ed11e48161d:

  virtio: update the comments for transport features (2018-06-07 22:17:40 +0300)


virtio, vhost: features, fixes

VF support for virtio.
Free page hint request support for VM migration.
DMA barriers for virtio strong barriers.
Bugfixes.

Signed-off-by: Michael S. Tsirkin 


Michael S. Tsirkin (2):
  virtio_ring: switch to dma_XX barriers for rpmsg
  vhost: fix info leak due to uninitialized memory

Tiwei Bie (2):
  virtio_pci: support enabling VFs
  virtio: update the comments for transport features

Wei Wang (4):
  mm: support reporting free page blocks
  virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
  mm/page_poison: expose page_poisoning_enabled to kernel modules
  virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON

 drivers/vhost/vhost.c   |   3 +
 drivers/virtio/virtio_balloon.c | 298 +++-
 drivers/virtio/virtio_pci_common.c  |  30 
 drivers/virtio/virtio_pci_modern.c  |  14 ++
 include/linux/mm.h  |   6 +
 include/linux/virtio_ring.h |   4 +-
 include/uapi/linux/virtio_balloon.h |   7 +
 include/uapi/linux/virtio_config.h  |  16 +-
 mm/page_alloc.c |  97 
 mm/page_poison.c|   6 +
 10 files changed, 439 insertions(+), 42 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-12-08 Thread Michael S. Tsirkin
The following changes since commit d9e427f6ab8142d6868eb719e6a7851aafea56b6:

  virtio_balloon: fix increment of vb->num_pfns in fill_balloon() (2017-12-01 
16:55:45 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 03e9f8a05bce7330bcd9c5cc54c8e42d0fcbf993:

  virtio_net: fix return value check in receive_mergeable() (2017-12-07 
18:34:52 +0200)


virtio: bugfixes

A couple of minor bugfixes.

Signed-off-by: Michael S. Tsirkin 


Yunjian Wang (1):
  virtio_net: fix return value check in receive_mergeable()

weiping zhang (2):
  virtio_mmio: add cleanup for virtio_mmio_probe
  virtio_mmio: add cleanup for virtio_mmio_remove

 drivers/net/virtio_net.c |  2 +-
 drivers/virtio/virtio_mmio.c | 57 
 2 files changed, 48 insertions(+), 11 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-12-04 Thread Michael S. Tsirkin
The following changes since commit c1d0c3f623ada808904dec676da0126f5b800630:

  fw_cfg: fix the command line module name (2017-11-14 23:57:40 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to d9e427f6ab8142d6868eb719e6a7851aafea56b6:

  virtio_balloon: fix increment of vb->num_pfns in fill_balloon() (2017-12-01 
16:55:45 +0200)


virtio,qemu: bugfixes

A couple of bugfixes that just became ready.

Signed-off-by: Michael S. Tsirkin 


Jan Stancek (1):
  virtio_balloon: fix increment of vb->num_pfns in fill_balloon()

Marc-André Lureau (1):
  fw_cfg: fix driver remove

weiping zhang (1):
  virtio: release virtio index when fail to device_register

 drivers/firmware/qemu_fw_cfg.c  | 3 ++-
 drivers/virtio/virtio.c | 2 ++
 drivers/virtio/virtio_balloon.c | 3 +--
 3 files changed, 5 insertions(+), 3 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-08-25 Thread Michael S. Tsirkin
The following changes since commit 14ccee78fc82f5512908f4424f541549a5705b89:

  Linux 4.13-rc6 (2017-08-20 14:13:52 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to ba74b6f7fcc07355d087af6939712eed4a454821:

  virtio_pci: fix cpu affinity support (2017-08-25 21:38:26 +0300)


virtio: bugfix

Fixes two obvious bugs in virtio pci.

Signed-off-by: Michael S. Tsirkin 


Christoph Hellwig (1):
  virtio_pci: fix cpu affinity support

Stefan Hajnoczi (1):
  virtio_blk: fix incorrect message when disk is resized

 drivers/block/virtio_blk.c | 16 ++--
 drivers/virtio/virtio_pci_common.c | 10 +++---
 2 files changed, 17 insertions(+), 9 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-04-10 Thread Michael S. Tsirkin
These changes were as in linux-next as e1c287efcd4cf688564ed1112d032b5dac29b159 
-
I tweaked the commit log slightly.

Too many people were complaining of warnings and errors in virtio
so I decided revert is the safest path forward right now.

The following changes since commit a71c9a1c779f2499fb2afc0553e543f18aff6edf:

  Linux 4.11-rc5 (2017-04-02 17:23:54 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 2f8dc3a01f1cf8ed17b1e295812ad12b688be5d3:

  virtio-pci: Remove affinity hint before freeing the interrupt (2017-04-11 
00:30:20 +0300)


virtio: oops fixes

virtio pci rework using shared interrupts caused a lot of issues. We
tried to fix them but run out of time. Revert for now, and revisit the
issue for the next kernel.

Luckily we are able to do this without loosing automatic
interrupt NUMA affinity which was the main motivator for the
rework.

Signed-off-by: Michael S. Tsirkin 


Cornelia Huck (1):
  MAINTAINERS: fix virtio file pattern

Marc Zyngier (1):
  virtio-pci: Remove affinity hint before freeing the interrupt

Michael S. Tsirkin (9):
  virtio_net: enable big packets for large MTU values
  virtio: allow drivers to validate features
  virtio_net: clear MTU when out of range
  virtio_console: fix uninitialized variable use
  Revert "virtio_pci: fix out of bound access for msix_names"
  Revert "virtio_pci: simplify MSI-X setup"
  Revert "virtio_pci: don't duplicate the msix_enable flag in struct 
pci_dev"
  Revert "virtio_pci: use shared interrupts for virtqueues"
  Revert "virtio_pci: remove struct virtio_pci_vq_info"

 MAINTAINERS|   2 +-
 drivers/char/virtio_console.c  |   6 +-
 drivers/net/virtio_net.c   |  45 +++--
 drivers/virtio/virtio.c|   6 +
 drivers/virtio/virtio_pci_common.c | 375 ++---
 drivers/virtio/virtio_pci_common.h |  43 -
 drivers/virtio/virtio_pci_legacy.c |   8 +-
 drivers/virtio/virtio_pci_modern.c |   8 +-
 include/linux/virtio.h |   1 +
 include/uapi/linux/virtio_pci.h|   2 +-
 10 files changed, 323 insertions(+), 173 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-03-01 Thread Michael S. Tsirkin
The following changes since commit c470abd4fde40ea6a0846a2beab642a578c0b8cd:

  Linux 4.10 (2017-02-19 14:34:00 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to c4baad50297d84bde1a7ad45e50c73adae4a2192:

  virtio-console: avoid DMA from stack (2017-03-02 01:35:06 +0200)


virtio, vhost: optimizations, fixes

Looks like a quiet cycle for vhost/virtio, just a couple of minor
tweaks. Most notable is automatic interrupt affinity for blk and scsi.
Hopefully other devices are not far behind.

Signed-off-by: Michael S. Tsirkin 


Christoph Hellwig (9):
  virtio_pci: remove struct virtio_pci_vq_info
  virtio_pci: use shared interrupts for virtqueues
  virtio_pci: don't duplicate the msix_enable flag in struct pci_dev
  virtio_pci: simplify MSI-X setup
  virtio: allow drivers to request IRQ affinity when creating VQs
  virtio: provide a method to get the IRQ affinity mask for a virtqueue
  blk-mq: provide a default queue mapping for virtio device
  virtio_blk: use virtio IRQ affinity
  virtio_scsi: use virtio IRQ affinity

Jason Wang (2):
  vhost: try avoiding avail index access when getting descriptor
  vhost: introduce O(1) vq metadata cache

Michael S. Tsirkin (1):
  virtio_mmio: expose header to userspace

Omar Sandoval (1):
  virtio-console: avoid DMA from stack

 block/Kconfig  |   5 +
 block/Makefile |   1 +
 block/blk-mq-virtio.c  |  54 +
 drivers/block/virtio_blk.c |  14 +-
 drivers/char/virtio_console.c  |  14 +-
 drivers/crypto/virtio/virtio_crypto_core.c |   2 +-
 drivers/gpu/drm/virtio/virtgpu_kms.c   |   2 +-
 drivers/misc/mic/vop/vop_main.c|   2 +-
 drivers/net/caif/caif_virtio.c |   3 +-
 drivers/net/virtio_net.c   |   2 +-
 drivers/remoteproc/remoteproc_virtio.c |   3 +-
 drivers/rpmsg/virtio_rpmsg_bus.c   |   2 +-
 drivers/s390/virtio/kvm_virtio.c   |   3 +-
 drivers/s390/virtio/virtio_ccw.c   |   3 +-
 drivers/scsi/virtio_scsi.c | 127 +-
 drivers/vhost/vhost.c  | 173 +
 drivers/vhost/vhost.h  |   8 +
 drivers/virtio/virtio_balloon.c|   3 +-
 drivers/virtio/virtio_input.c  |   3 +-
 drivers/virtio/virtio_mmio.c   |   5 +-
 drivers/virtio/virtio_pci_common.c | 376 -
 drivers/virtio/virtio_pci_common.h |  50 +---
 drivers/virtio/virtio_pci_legacy.c |   9 +-
 drivers/virtio/virtio_pci_modern.c |  17 +-
 include/linux/blk-mq-virtio.h  |  10 +
 include/linux/cpuhotplug.h |   1 -
 include/linux/virtio_config.h  |  12 +-
 include/uapi/linux/Kbuild  |   1 +
 include/{ => uapi}/linux/virtio_mmio.h |   0
 include/uapi/linux/virtio_pci.h|   2 +-
 net/vmw_vsock/virtio_transport.c   |   3 +-
 31 files changed, 456 insertions(+), 454 deletions(-)
 create mode 100644 block/blk-mq-virtio.c
 create mode 100644 include/linux/blk-mq-virtio.h
 rename include/{ => uapi}/linux/virtio_mmio.h (100%)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-02-03 Thread Michael S. Tsirkin
The following changes since commit 566cf877a1fcb6d6dc0126b076aad062054c2637:

  Linux 4.10-rc6 (2017-01-29 14:25:17 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 79134d11d030b886106bf45a5638c1ccb1f0856c:

  MAINTAINERS: update email address for Amit Shah (2017-02-03 23:40:36 +0200)


virtio, vhost: last minute fixes

ARM DMA fix revert
vhost endian-ness fix
MAINTAINERS: email address change for Amit

Signed-off-by: Michael S. Tsirkin 


Amit Shah (1):
  MAINTAINERS: update email address for Amit Shah

Halil Pasic (1):
  vhost: fix initialization for vq->is_le

Michael S. Tsirkin (1):
  Revert "vring: Force use of DMA API for ARM-based systems with legacy 
devices"

 MAINTAINERS  |  2 +-
 drivers/vhost/vhost.c| 10 --
 drivers/virtio/virtio_ring.c |  7 ---
 3 files changed, 5 insertions(+), 14 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2017-01-23 Thread Michael S. Tsirkin
On Mon, Jan 23, 2017 at 01:50:32PM -0800, Linus Torvalds wrote:
> On Mon, Jan 23, 2017 at 7:05 AM, Michael S. Tsirkin  wrote:
> >
> > virtio, vhost: fixes, cleanups
> 
> Was there a reason why you sent this twice?
> 
> Or was this *supposed* to be the ARM DMA fix pull request? Because it wasn't.
> 
>   Linus

Ouch sorry. Was tired and forgot I already sent it.  Should have
checked.

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2017-01-23 Thread Linus Torvalds
On Mon, Jan 23, 2017 at 7:05 AM, Michael S. Tsirkin  wrote:
>
> virtio, vhost: fixes, cleanups

Was there a reason why you sent this twice?

Or was this *supposed* to be the ARM DMA fix pull request? Because it wasn't.

  Linus
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2017-01-23 Thread Michael S. Tsirkin
The following changes since commit 49def1853334396f948dcb4cedb9347abb318df5:

  Linux 4.10-rc4 (2017-01-15 16:21:59 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 0db1dba5dfaf70fb3baf07973996db2078528cde:

  virtio/s390: virtio: constify virtio_config_ops structures (2017-01-19 
23:46:34 +0200)

Note: ARM DMA fixes missed this pull, will be in the next one.


virtio, vhost: fixes, cleanups

Random fixes and cleanups that accumulated over the time.

Signed-off-by: Michael S. Tsirkin 


Bhumika Goyal (2):
  vhost: scsi: constify target_core_fabric_ops structures
  virtio/s390: virtio: constify virtio_config_ops structures

Colin Ian King (1):
  virtio/s390: add missing \n to end of dev_err message

Dan Carpenter (1):
  vhost/scsi: silence uninitialized variable warning

G. Campana (1):
  virtio_console: fix a crash in config_work_handler

Halil Pasic (2):
  tools/virtio/ringtest: fix run-on-all.sh for offline cpus
  tools/virtio/ringtest: tweaks for s390

Pierre Morel (1):
  virtio/s390: support READ_STATUS command for virtio-ccw

 drivers/char/virtio_console.c   |  2 +-
 drivers/s390/virtio/virtio_ccw.c| 29 +++--
 drivers/vhost/scsi.c|  4 ++--
 tools/virtio/ringtest/main.h| 12 
 tools/virtio/ringtest/run-on-all.sh |  5 +++--
 5 files changed, 45 insertions(+), 7 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2016-05-24 Thread Michael S. Tsirkin
The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a:

  Linux 4.6 (2016-05-15 15:43:13 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to bb991288728e6a47a6f0fac6a4e9dfaeecc27956:

  ringtest: pass buf != NULL (2016-05-22 19:44:14 +0300)


virtio: patches for 4.7

Looks like a quiet cycle for virtio.  There's a new inorder option for the
ringtest tool, and a bugfix for balloon for ppc platforms when using virtio 1
mode.

Signed-off-by: Michael S. Tsirkin 


Michael S. Tsirkin (3):
  virtio: add inorder option
  virtio_balloon: fix PFN format for virtio-1
  ringtest: pass buf != NULL

 drivers/virtio/virtio_balloon.c | 20 +++-
 tools/virtio/ringtest/main.c|  2 +-
 tools/virtio/ringtest/virtio_ring_0_9.c | 49 -
 tools/virtio/ringtest/virtio_ring_inorder.c |  2 ++
 tools/virtio/ringtest/Makefile  |  5 ++-
 5 files changed, 67 insertions(+), 11 deletions(-)
 create mode 100644 tools/virtio/ringtest/virtio_ring_inorder.c
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-12-20 Thread Michael S. Tsirkin
The following changes since commit 9f9499ae8e6415cefc4fe0a96ad0e27864353c89:

  Linux 4.4-rc5 (2015-12-13 17:42:58 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 74a599f09bec7419b2490039f0fb33bc8581ef7c:

  virtio/s390: handle error values in irb (2015-12-17 10:37:33 +0200)


virtio: fixes on top of 4.4-rc5

This includes a single fix for virtio ccw error handling.

Signed-off-by: Michael S. Tsirkin 


Cornelia Huck (1):
  virtio/s390: handle error values in irb

 drivers/s390/virtio/virtio_ccw.c | 62 
 1 file changed, 37 insertions(+), 25 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-12-07 Thread Michael S. Tsirkin
The following changes since commit 527e9316f8ec44bd53d90fb9f611fa752bb9:

  Linux 4.4-rc4 (2015-12-06 15:43:12 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to f277ec42f38f406ed073569b24b04f1c291fec0f:

  virtio_ring: shadow available ring flags & index (2015-12-07 17:28:11 +0200)


virtio: fixes on top of 4.4-rc4

This includes some fixes and cleanups in virtio and vhost code. Most notably,
shadowing the index fixes the excessive cacheline bouncing observed on AMD
platforms.

Signed-off-by: Michael S. Tsirkin 


Michael S. Tsirkin (5):
  virtio-net: Stop doing DMA from the stack
  vhost: relax log address alignment
  tools/virtio: move list macro stubs
  tools/virtio: fix byteswap logic
  vhost: replace % with & on data path

Michal Hocko (1):
  virtio: Do not drop __GFP_HIGH in alloc_indirect

Suman Anna (1):
  virtio: fix memory leak of virtio ida cache layers

Venkatesh Srinivas (1):
  virtio_ring: shadow available ring flags & index

 tools/virtio/linux/kernel.h|  6 +
 tools/virtio/linux/virtio.h|  6 -
 tools/virtio/linux/virtio_config.h | 20 ++--
 drivers/net/virtio_net.c   | 34 +++
 drivers/vhost/vhost.c  |  8 +++
 drivers/virtio/virtio.c|  1 +
 drivers/virtio/virtio_ring.c   | 48 +++---
 7 files changed, 78 insertions(+), 45 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-09-18 Thread Michael S. Tsirkin
The following changes since commit 997e120843e82609c8d99a9d5714e6cf91e14cbe:

  virtio_balloon: do not change memory amount visible via /proc/meminfo 
(2015-09-08 13:32:11 +0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to ad2aa04218de9bd734d593adb0ac59854ec0cb68:

  virtio/s390: handle failures of READ_VQ_CONF ccw (2015-09-16 12:48:08 +0300)


virtio: fixes on top of 4.3-rc1

This fixes the virtio-test tool, and improves
the error handling for virtio-ccw.

Signed-off-by: Michael S. Tsirkin 


Michael S. Tsirkin (3):
  tools/virtio: fix build after 4.2 changes
  vhost: move features to core
  tools/virtio: propagate V=X to kernel build

Pierre Morel (1):
  virtio/s390: handle failures of READ_VQ_CONF ccw

 drivers/vhost/vhost.h|  4 +++-
 tools/virtio/asm/barrier.h   |  2 ++
 tools/virtio/linux/export.h  |  3 +++
 tools/virtio/linux/kernel.h  |  8 
 drivers/s390/virtio/virtio_ccw.c | 10 +-
 drivers/vhost/net.c  |  3 +--
 drivers/vhost/scsi.c |  4 +---
 drivers/vhost/test.c |  3 +++
 tools/virtio/Makefile|  2 +-
 9 files changed, 31 insertions(+), 8 deletions(-)
 create mode 100644 tools/virtio/linux/export.h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-09-09 Thread Michael S. Tsirkin
The following changes since commit 64291f7db5bd8150a74ad2036f1037e6a0428df2:

  Linux 4.2 (2015-08-30 11:34:09 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 997e120843e82609c8d99a9d5714e6cf91e14cbe:

  virtio_balloon: do not change memory amount visible via /proc/meminfo 
(2015-09-08 13:32:11 +0300)


virtio: fixes and features 4.3

virtio-mmio can now be auto-loaded through acpi.
virtio blk supports extended partitions.
total memory is better reported when using virtio balloon with auto-deflate.
cache control is re-enabled when using virtio-blk in modern mode.

Signed-off-by: Michael S. Tsirkin 


Denis V. Lunev (2):
  virtio_ballon: change stub of release_pages_by_pfn
  virtio_balloon: do not change memory amount visible via /proc/meminfo

Fam Zheng (1):
  virtio-blk: Allow extended partitions

Graeme Gregory (1):
  virtio_mmio: add ACPI probing

Paolo Bonzini (1):
  virtio-blk: use VIRTIO_BLK_F_WCE and VIRTIO_BLK_F_CONFIG_WCE in virtio1

 drivers/block/virtio_blk.c  |  6 +++---
 drivers/virtio/virtio_balloon.c | 16 ++--
 drivers/virtio/virtio_mmio.c| 10 ++
 3 files changed, 23 insertions(+), 9 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-07-28 Thread Michael S. Tsirkin
The following changes since commit cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f:

  Linux 4.2-rc4 (2015-07-26 12:26:21 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 1e0994730f772580ff98754eb5595190cdf371ef:

  vhost: fix error handling for memory region alloc (2015-07-27 18:05:05 +0300)


vhost: fixes for 4.2

Two bugfixes only here.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Igor Mammedov (1):
  vhost: fix error handling for memory region alloc

Marc-André Lureau (1):
  vhost: actually track log eventfd file

 drivers/vhost/vhost.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2015-07-15 Thread Michael S. Tsirkin
On Wed, Jul 15, 2015 at 01:50:24PM +0300, Michael S. Tsirkin wrote:
 The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee:
 
   virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200)
 
 are available in the git repository at:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
 
 for you to fetch changes up to c9ce42f72fd0ba180fd35539829e4139dca31494:
 
   vhost: add max_mem_regions module parameter (2015-07-13 23:17:19 +0300)
 
 
 virtio/vhost: fixes for 4.2
 
 Bugfixes and documentation fixes. Igor's patch that allows
 users to tweak memory table size is borderline,
 but it does fix known crashes, so I merged it.
 
 Signed-off-by: Michael S. Tsirkin m...@redhat.com

Ouch.  Turns out there was a bug in error handling here.
Linus, please don't pull this one yet, I will fix it up and
resend. I've deleted the tag for now so it won't get pulled
by mistake.

 
 Cornelia Huck (2):
   MAINTAINERS: separate section for s390 virtio drivers
   virtio/s390: rename drivers/s390/kvm - drivers/s390/virtio
 
 Igor Mammedov (3):
   vhost: use binary search instead of linear in find_region()
   vhost: extend memory regions allocation to vmalloc
   vhost: add max_mem_regions module parameter
 
 Michael S. Tsirkin (2):
   virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
   virtio: define virtio_pci_cfg_cap in header.
 
 Pierre Morel (1):
   9p/trans_virtio: reset virtio device on remove
 
 Stephen Rothwell (1):
   virtio scsi: fix unused variable warning
 
 Thomas Huth (1):
   virtio: Fix typecast of pointer in vring_init()
 
  include/uapi/linux/virtio_net.h   | 16 
  include/uapi/linux/virtio_pci.h   |  6 +++
  include/uapi/linux/virtio_ring.h  |  5 ++-
  drivers/s390/{kvm = virtio}/kvm_virtio.c |  0
  drivers/s390/{kvm = virtio}/virtio_ccw.c |  0
  drivers/scsi/virtio_scsi.c|  4 +-
  drivers/vhost/vhost.c | 67 
 +++
  net/9p/trans_virtio.c |  1 +
  MAINTAINERS   | 10 -
  drivers/s390/Makefile |  2 +-
  drivers/s390/{kvm = virtio}/Makefile |  0
  11 files changed, 91 insertions(+), 20 deletions(-)
  rename drivers/s390/{kvm = virtio}/kvm_virtio.c (100%)
  rename drivers/s390/{kvm = virtio}/virtio_ccw.c (100%)
  rename drivers/s390/{kvm = virtio}/Makefile (100%)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-07-15 Thread Michael S. Tsirkin
The following changes since commit 59a5b0f7bf74f88da6670bcbf924d8cc1e75b1ee:

  virtio-pci: alloc only resources actually used. (2015-06-24 08:15:09 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to c9ce42f72fd0ba180fd35539829e4139dca31494:

  vhost: add max_mem_regions module parameter (2015-07-13 23:17:19 +0300)


virtio/vhost: fixes for 4.2

Bugfixes and documentation fixes. Igor's patch that allows
users to tweak memory table size is borderline,
but it does fix known crashes, so I merged it.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Cornelia Huck (2):
  MAINTAINERS: separate section for s390 virtio drivers
  virtio/s390: rename drivers/s390/kvm - drivers/s390/virtio

Igor Mammedov (3):
  vhost: use binary search instead of linear in find_region()
  vhost: extend memory regions allocation to vmalloc
  vhost: add max_mem_regions module parameter

Michael S. Tsirkin (2):
  virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS
  virtio: define virtio_pci_cfg_cap in header.

Pierre Morel (1):
  9p/trans_virtio: reset virtio device on remove

Stephen Rothwell (1):
  virtio scsi: fix unused variable warning

Thomas Huth (1):
  virtio: Fix typecast of pointer in vring_init()

 include/uapi/linux/virtio_net.h   | 16 
 include/uapi/linux/virtio_pci.h   |  6 +++
 include/uapi/linux/virtio_ring.h  |  5 ++-
 drivers/s390/{kvm = virtio}/kvm_virtio.c |  0
 drivers/s390/{kvm = virtio}/virtio_ccw.c |  0
 drivers/scsi/virtio_scsi.c|  4 +-
 drivers/vhost/vhost.c | 67 +++
 net/9p/trans_virtio.c |  1 +
 MAINTAINERS   | 10 -
 drivers/s390/Makefile |  2 +-
 drivers/s390/{kvm = virtio}/Makefile |  0
 11 files changed, 91 insertions(+), 20 deletions(-)
 rename drivers/s390/{kvm = virtio}/kvm_virtio.c (100%)
 rename drivers/s390/{kvm = virtio}/virtio_ccw.c (100%)
 rename drivers/s390/{kvm = virtio}/Makefile (100%)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-06-01 Thread Michael S. Tsirkin
The following changes since commit c65b99f046843d2455aa231747b5a07a999a9f3d:

  Linux 4.1-rc6 (2015-05-31 19:01:07 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 8a7b19d8b542b87bccc3eaaf81dcc90a5ca48aea:

  include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h (2015-06-01 
15:46:54 +0200)


virtio: last-minute fix for 4.1

This tweaks an exported user-space header to fix
build breakage for userspace using it.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Mikko Rapeli (1):
  include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h

 include/uapi/linux/virtio_balloon.h | 1 +
 1 file changed, 1 insertion(+)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2015-06-01 Thread Michael S. Tsirkin
The mail subject is wrong or course - the one in
the pull request is correct.
Sorry about that - this shouldn't interfere with merging it, I'll
correct it for future requests.

-- 
MST
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-01-07 Thread Michael S. Tsirkin
The following changes since commit b1940cd21c0f4abdce101253e860feff547291b0:

  Linux 3.19-rc3 (2015-01-05 17:05:20 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 99975cc6ada0d5f2675e83abecae05aba5f437d2:

  vhost/net: length miscalculation (2015-01-07 12:22:00 +0200)


virtio, vhost fixes for 3.19

This fixes a couple of bugs triggered by hot-unplug
of virtio devices, as well as a regression in vhost-net.

Cc: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Michael S. Tsirkin m...@redhat.com


Michael S. Tsirkin (4):
  virtio: make del_vqs idempotent
  virtio_pci: device-specific release callback
  virtio_pci: document why we defer kfree
  vhost/net: length miscalculation

Sasha Levin (1):
  virtio_pci: defer kfree until release callback

 drivers/virtio/virtio_pci_common.h |  1 -
 drivers/vhost/net.c|  2 +-
 drivers/virtio/virtio_pci_common.c | 10 +-
 drivers/virtio/virtio_pci_legacy.c | 12 +++-
 4 files changed, 13 insertions(+), 12 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2015-01-02 Thread Michael S. Tsirkin
The following changes since commit b7392d2247cfe6771f95d256374f1a8e6a6f48d6:

  Linux 3.19-rc2 (2014-12-28 16:49:37 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 5d9a07b0de512b77bf28d2401e5fe3351f00a240:

  vhost: relax used address alignment (2014-12-29 10:55:06 +0200)


vhost: virtio 1.0 bugfix

There's a single change here, fixing a vhost bug where vhost initialization
fails due to used ring alignment check being too strict.

Cc: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Michael S. Tsirkin m...@redhat.com


Michael S. Tsirkin (2):
  virtio_ring: document alignment requirements
  vhost: relax used address alignment

 include/uapi/linux/virtio_ring.h |  7 +++
 drivers/vhost/vhost.c| 10 +++---
 2 files changed, 14 insertions(+), 3 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2014-12-18 Thread Michael S. Tsirkin
The following changes since commit f01a2a811ae04124fc9382925038fcbbd2f0b7c8:

  virtio_ccw: finalize_features error handling (2014-12-09 21:42:06 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 5ff16110c637726111662c1df41afd9df7ef36bd:

  virtio_pci: restore module attributes (2014-12-17 00:59:40 +0200)


vhost/virtio: virtio 1.0 related fixes

Most importantly, this fixes using virtio_pci as a module.

Further, the big virtio 1.0 conversion missed a couple of places. This fixes
them up.

This isn't 100% sparse-clean yet because on many architectures get_user
triggers sparse warnings when used with __bitwise tag (when same tag is on both
pointer and value read).

I posted a patchset to fix it up by adding __force on all
arches that don't already have it (many do), when that's
merged these warnings will go away.

Cc: Rusty Russell ru...@rustcorp.com.au
Signed-off-by: Michael S. Tsirkin m...@redhat.com


Herbert Xu (1):
  virtio_pci: restore module attributes

Michael S. Tsirkin (15):
  virtio: set VIRTIO_CONFIG_S_FEATURES_OK on restore
  virtio_config: fix virtio_cread_bytes
  virtio_pci_common.h: drop VIRTIO_PCI_NO_LEGACY
  virtio_pci: move probe to common file
  virtio_pci: add VIRTIO_PCI_NO_LEGACY
  virtio: core support for config generation
  tools/virtio: more stubs
  tools/virtio: fix vringh test
  tools/virtio: 64 bit features
  tools/virtio: enable -Werror
  tools/virtio: add virtio 1.0 in virtio_test
  tools/virtio: add virtio 1.0 in vringh_test
  vringh: 64 bit features
  vringh: update for virtio 1.0 APIs
  mic/host: fix up virtio 1.0 APIs

 drivers/virtio/virtio_pci_common.h |   7 +-
 include/linux/virtio_config.h  |  29 +++-
 include/linux/vringh.h |  37 +-
 include/uapi/linux/virtio_pci.h|  15 ++--
 tools/virtio/linux/virtio.h|   1 +
 tools/virtio/linux/virtio_byteorder.h  |   8 +++
 tools/virtio/linux/virtio_config.h |  70 +-
 tools/virtio/uapi/linux/virtio_types.h |   1 +
 drivers/misc/mic/host/mic_debugfs.c|  18 +++--
 drivers/vhost/vringh.c | 125 -
 drivers/virtio/virtio.c|  37 ++
 drivers/virtio/virtio_pci_common.c |  39 +-
 drivers/virtio/virtio_pci_legacy.c |  24 +--
 tools/virtio/virtio_test.c |  15 +++-
 tools/virtio/vringh_test.c |   5 +-
 tools/virtio/Makefile  |   2 +-
 16 files changed, 324 insertions(+), 109 deletions(-)
 create mode 100644 tools/virtio/linux/virtio_byteorder.h
 create mode 100644 tools/virtio/uapi/linux/virtio_types.h
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2014-11-13 Thread Michael S. Tsirkin
The following changes since commit 206c5f60a3d902bc4b56dab2de3e88de5eb06108:

  Linux 3.18-rc4 (2014-11-09 14:55:29 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 65eca3a20264a8999570c269406196bd1ae23be7:

  virtio_console: move early VQ enablement (2014-11-13 09:53:26 +0200)

It seems like a good idea to merge this bugfix now, as it's clearly
a regression and several people complained.


virtio: bugfix for 3.18

This fixes a crash in virtio console
multi-channel mode that got introduced in -rc1.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Cornelia Huck (1):
  virtio_console: move early VQ enablement

 drivers/char/virtio_console.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PULL] vhost: cleanups and fixes

2013-07-22 Thread Michael S. Tsirkin
On Mon, Jul 15, 2013 at 09:31:49PM +0300, Michael S. Tsirkin wrote:
 The following changes since commit 09a34c8404c1d4c5782de319c02e1d742c57875c:
 
   vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)
 
 are available in the git repository at:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus
 
 for you to fetch changes up to 22fa90c7fb479694d6affebc049d21f06b714be6:
 
   vhost: Remove custom vhost rcu usage (2013-07-11 15:38:40 +0300)
 
 
 vhost: more fixes for 3.11
 
 This includes some fixes for vhost net and scsi drivers.
 The test module has already been reworked to avoid rcu
 usage, but the necessary core changes are missing,
 we fixed this.
 Unlikely to affect any real-world users, but it's
 early in the cycle so, let's merge them.
 
 Signed-off-by: Michael S. Tsirkin m...@redhat.com
 
 
 Asias He (3):
   vhost-net: Always access vq-private_data under vq mutex
   vhost-scsi: Always access vq-private_data under vq mutex
   vhost: Remove custom vhost rcu usage


Hi Linus,
Just checking that all's well with this PULL request.
If it's not merged, we'll have to revert the relevant change
in the test module.
Either way, need to keep them in sync.

Pls let me know,
Thanks

  drivers/vhost/net.c   | 37 -
  drivers/vhost/scsi.c  | 17 ++---
  drivers/vhost/test.c  |  6 ++
  drivers/vhost/vhost.h | 10 ++
  4 files changed, 26 insertions(+), 44 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2013-07-15 Thread Michael S. Tsirkin
The following changes since commit 09a34c8404c1d4c5782de319c02e1d742c57875c:

  vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 22fa90c7fb479694d6affebc049d21f06b714be6:

  vhost: Remove custom vhost rcu usage (2013-07-11 15:38:40 +0300)


vhost: more fixes for 3.11

This includes some fixes for vhost net and scsi drivers.
The test module has already been reworked to avoid rcu
usage, but the necessary core changes are missing,
we fixed this.
Unlikely to affect any real-world users, but it's
early in the cycle so, let's merge them.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Asias He (3):
  vhost-net: Always access vq-private_data under vq mutex
  vhost-scsi: Always access vq-private_data under vq mutex
  vhost: Remove custom vhost rcu usage

 drivers/vhost/net.c   | 37 -
 drivers/vhost/scsi.c  | 17 ++---
 drivers/vhost/test.c  |  6 ++
 drivers/vhost/vhost.h | 10 ++
 4 files changed, 26 insertions(+), 44 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


[PULL] vhost: cleanups and fixes

2013-07-08 Thread Michael S. Tsirkin
The following changes since commit 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376:

  Linux 3.10 (2013-06-30 15:13:29 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus

for you to fetch changes up to 09a34c8404c1d4c5782de319c02e1d742c57875c:

  vhost/test: update test after vhost cleanups (2013-07-07 18:02:25 +0300)


vhost: fixes and cleanups 3.11

This includes some fixes and cleanups for vhost net and scsi drivers.
The scsi driver changes will cause a conflict with  Nicholas Bellinger's scsi
target changes, but the conflicting commit in my tree simply renames some
variables so it's trivial to resolve.

Signed-off-by: Michael S. Tsirkin m...@redhat.com


Asias He (8):
  vhost: Simplify dev-vqs[i] access
  vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
  vhost-scsi: Rename struct vhost_scsi *s to *vs
  vhost-scsi: Make func indention more consistent
  vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
  vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
  vhost: Make vhost a separate module
  vhost: Make local function static

Michael S. Tsirkin (2):
  vhost-net: fix use-after-free in vhost_net_flush
  vhost/test: update test after vhost cleanups

 drivers/vhost/Kconfig  |   8 +
 drivers/vhost/Makefile |   3 +-
 drivers/vhost/net.c|  13 +-
 drivers/vhost/scsi.c   | 472 ++---
 drivers/vhost/test.c   |  33 ++--
 drivers/vhost/vhost.c  |  86 +++--
 drivers/vhost/vhost.h  |   2 +
 7 files changed, 356 insertions(+), 261 deletions(-)
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization