New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 708265 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 708267
issue 708732



Sign in to add a comment

Backport virtio_vsock from upstream for guest kernel

Project Member Reported by chirantan@chromium.org, Apr 4 2017

Issue description

virtio_vsock (http://wiki.qemu-project.org/Features/VirtioVsock) is an implementation of the sockets api over virtio.  It creates a secure zero-config channel for applications on the host and guest to communicate with each other.

This would be used for NFS as well as for the daemon we'll use to manage containers inside the VM.
 
Labels: Proj-Containers
Blocking: 708267
Blocking: 708732
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 21 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/4f09186f037b6d2a1b684ddc0c578985802534c1

commit 4f09186f037b6d2a1b684ddc0c578985802534c1
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Fri Apr 21 22:45:36 2017

UPSTREAM: virtio: make find_vqs() checkpatch.pl-friendly

checkpatch.pl wants arrays of strings declared as follows:

  static const char * const names[] = { "vq-1", "vq-2", "vq-3" };

Currently the find_vqs() function takes a const char *names[] argument
so passing checkpatch.pl's const char * const names[] results in a
compiler error due to losing the second const.

This patch adjusts the find_vqs() prototype and updates all virtio
transports.  This makes it possible for virtio_balloon.c, virtio_input.c,
virtgpu_kms.c, and virtio_rpmsg_bus.c to use the checkpatch.pl-friendly
type.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>

(cherry picked from commit f7ad26ff952b3ca2702d7da03aad0ab1f6c01d7c)

BUG= chromium:708265 
TEST='emerge-$BOARD chromeos-kernel-4_4' for both tatl and tael completes
     successfully.  No runtime tests yet because we don't have a hypervisor that
     supports the device.

Change-Id: Iaab0cce464ab59fe65f55a392c994b3a182ba2d4
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483921
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/s390/virtio/virtio_ccw.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_mmio.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/rpmsg/virtio_rpmsg_bus.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/include/linux/virtio_config.h
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/s390/virtio/kvm_virtio.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/remoteproc/remoteproc_virtio.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/gpu/drm/virtio/virtgpu_kms.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/misc/mic/card/mic_virtio.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_input.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_pci_common.h
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_pci_common.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_pci_modern.c
[modify] https://crrev.com/4f09186f037b6d2a1b684ddc0c578985802534c1/drivers/virtio/virtio_balloon.c

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/55b263c10de8cfb6408d4f25ad0491253e0d82a2

commit 55b263c10de8cfb6408d4f25ad0491253e0d82a2
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Sat Apr 22 02:18:59 2017

UPSTREAM: VSOCK: transport-specific vsock_transport functions

struct vsock_transport contains function pointers called by AF_VSOCK
core code.  The transport may want its own transport-specific function
pointers and they can be added after struct vsock_transport.

Allow the transport to fetch vsock_transport.  It can downcast it to
access transport-specific function pointers.

The virtio transport will use this.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

BUG= chromium:708265 
TEST='emerge-$BOARD chromeos-kernel-4_4' for both tatl and tael completes
     successfully.  No runtime tests yet because we don't have a hypervisor that
     supports the device.

(cherry picked from commit 0b01aeb3d2fbf16787f0c9629f4ca52ae792f732)
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>

Change-Id: I1fe4fccaad0cbb9ca90acf827bea93b5556f3013
Reviewed-on: https://chromium-review.googlesource.com/483922
Commit-Ready: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

[modify] https://crrev.com/55b263c10de8cfb6408d4f25ad0491253e0d82a2/include/net/af_vsock.h
[modify] https://crrev.com/55b263c10de8cfb6408d4f25ad0491253e0d82a2/net/vmw_vsock/af_vsock.c

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/48a7cfda825a92dc6528a183dcdbe130ebce4403

commit 48a7cfda825a92dc6528a183dcdbe130ebce4403
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: Sat Apr 22 02:19:00 2017

UPSTREAM: VSOCK: defer sock removal to transports

The virtio transport will implement graceful shutdown and the related
SO_LINGER socket option.  This requires orphaning the sock but keeping
it in the table of connections after .release().

This patch adds the vsock_remove_sock() function and leaves it up to the
transport when to remove the sock.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 6773b7dc39f165bd9d824b50ac52cbb3f87d53c8)

BUG= chromium:708265 
TEST='emerge-$BOARD chromeos-kernel-4_4' for both tatl and tael completes
     successfully.  No runtime tests yet because we don't have a hypervisor that
     supports the device.

Change-Id: I09ec218184a478015eeb6f9ab967805cb870fc59
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/483923
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

[modify] https://crrev.com/48a7cfda825a92dc6528a183dcdbe130ebce4403/include/net/af_vsock.h
[modify] https://crrev.com/48a7cfda825a92dc6528a183dcdbe130ebce4403/net/vmw_vsock/vmci_transport.c
[modify] https://crrev.com/48a7cfda825a92dc6528a183dcdbe130ebce4403/net/vmw_vsock/af_vsock.c

Status: Fixed (was: Assigned)
Not sure why all the CLs are not showing up here but the whole branch has landed so this is fixed now.
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/01fac4e5884c0ce768d75c0bcbac8d06590fe642

commit 01fac4e5884c0ce768d75c0bcbac8d06590fe642
Author: Greg Kurz <gkurz@linux.vnet.ibm.com>
Date: Tue Apr 25 21:03:54 2017

UPSTREAM: vhost: rename vhost_init_used()

Looking at how callers use this, maybe we should just rename init_used
to vhost_vq_init_access. The _used suffix was a hint that we
access the vq used ring. But maybe what callers care about is
that it must be called after access_ok.

Also, this function manipulates the vq->is_le field which isn't related
to the vq used ring.

This patch simply renames vhost_init_used() to vhost_vq_init_access() as
suggested by Michael.

No behaviour change.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

(cherry picked from commit 80f7d0301e7913f704d3505722f806717c61dff5)

BUG= chromium:708265 
TEST='make allmodconfig && make -j64' succeeds

Change-Id: I78412b65345d6c2c2ebf05d2c9973e960bdc38f1
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486201
Reviewed-by: Guenter Roeck <groeck@chromium.org>

[modify] https://crrev.com/01fac4e5884c0ce768d75c0bcbac8d06590fe642/drivers/vhost/vhost.h
[modify] https://crrev.com/01fac4e5884c0ce768d75c0bcbac8d06590fe642/drivers/vhost/test.c
[modify] https://crrev.com/01fac4e5884c0ce768d75c0bcbac8d06590fe642/drivers/vhost/scsi.c
[modify] https://crrev.com/01fac4e5884c0ce768d75c0bcbac8d06590fe642/drivers/vhost/vhost.c
[modify] https://crrev.com/01fac4e5884c0ce768d75c0bcbac8d06590fe642/drivers/vhost/net.c

Components: OS>Systems>Containers

Sign in to add a comment