New issue
Advanced search Search tips

Issue 708267 link

Starred by 3 users

Issue metadata

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

Blocked on:
issue 708265

Blocking:
issue 708732



Sign in to add a comment

Implement virtio_vsock

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

Issue description

Once we've backported the virtio_vsock code to the guest kernel we need to implement it in kvmtool.
 
Blocking: 708732
Owner: chirantan@chromium.org
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, May 5 2017

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

commit fb3e7969d9c6ecfbd8bd229dba79b6d248803465
Author: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Date: Fri May 05 21:42:52 2017

UPSTREAM: AF_VSOCK: Shrink the area influenced by prepare_to_wait

When a thread is prepared for waiting by calling prepare_to_wait, sleeping
is not allowed until either the wait has taken place or finish_wait has
been called.  The existing code in af_vsock imposed unnecessary no-sleep
assumptions to a broad list of backend functions.
This patch shrinks the influence of prepare_to_wait to the area where it
is strictly needed, therefore relaxing the no-sleep restriction there.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

(cherry picked from commit f7f9b5e7f8eccfd68ffa7b8d74b07c478bb9e7f0)

BUG= chromium:708267 
TEST=Run nc-vsock between host and guest and see that there is no
     warning message printed by the kernel.

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

[modify] https://crrev.com/fb3e7969d9c6ecfbd8bd229dba79b6d248803465/net/vmw_vsock/af_vsock.c

Project Member

Comment 5 by bugdroid1@chromium.org, May 11 2017

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

commit 428bf9bb67b29bcf7564d529a8357fe468f3f347
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 11 00:27:34 2017

UPSTREAM: vhost: drop vringh dependency

vringh isn't used by vhost net or scsi - it's used
by CAIF only at the moment. Drop the dependency.

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

(cherry picked from commit b2fbd8b0737803f527bc7671a14bd6736d78b5d7)

BUG= chromium:708267 
TEST=Build kernel and see that vhost code gets built.

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

[modify] https://crrev.com/428bf9bb67b29bcf7564d529a8357fe468f3f347/drivers/Makefile

Project Member

Comment 6 by bugdroid1@chromium.org, May 11 2017

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

commit 6ac35f6946f66349050de76429bc8377553a9d1d
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Thu May 11 00:27:35 2017

UPSTREAM: vhost: drop vringh dependency

vringh isn't used by vhost net or scsi - it's used
by CAIF only at the moment. Drop the dependency.

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

(cherry picked from commit 6190efb08c16dcd68c64b096a28f47ab33f017d7)

BUG= chromium:708267 
TEST=Build kernel (no vhost-net runtime tests yet)

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

[modify] https://crrev.com/6ac35f6946f66349050de76429bc8377553a9d1d/drivers/vhost/Kconfig

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/455475268753c5053e152c1afa3e6a21e2baf0c2

commit 455475268753c5053e152c1afa3e6a21e2baf0c2
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Sat Jun 10 04:44:03 2017

cros-kernel2: Enable vhost modules for kvm_host

Build the vhost-vsock module when the kvm_host USE flag is set.
The vhost infrastructure improves performance for high-bandwidth virtio devices.
Since these will be built as modules, something needs to load them into the
kernel before it will recognize the AF_VSOCK family.

BUG= chromium:708267 
TEST=Build and boot on samus and see that running nc-vsock between guest and
     host works properly.

Change-Id: Id04da4f05695b095be4558010db2ff228c780046
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/496927
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/455475268753c5053e152c1afa3e6a21e2baf0c2/eclass/cros-kernel2.eclass

Labels: OS-Chrome
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosvm/+/195457e48494e5a3082a35e7b3d570dc7c292de1

commit 195457e48494e5a3082a35e7b3d570dc7c292de1
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Tue Aug 29 04:15:36 2017

Refactor VhostNet into separate vhost and net pieces

A large portion of the VhostNet implementation is common to all vhost
devices.  Create a new Vhost trait that encapsulates this behavior and
split the network specific bits into a new Net type and implement the
Vhost trait for it.

BUG= chromium:708267 
TEST=build and run with a VHOST_NET enabled kernel and see that
     everything still works fine

Change-Id: Ia6b7591f9428c1fba1e13b11791fe40e1bd3942b
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/630060
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/195457e48494e5a3082a35e7b3d570dc7c292de1/vhost/src/lib.rs
[add] https://crrev.com/195457e48494e5a3082a35e7b3d570dc7c292de1/vhost/src/net.rs
[modify] https://crrev.com/195457e48494e5a3082a35e7b3d570dc7c292de1/src/hw/virtio/vhost_net.rs

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosvm/+/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f

commit 86fb9567b588a11ed1f7ed2e3223c25fad07cc6f
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Wed Aug 30 20:04:22 2017

Refactor the VhostNet virtio device

Split the VhostNet virtio device into generic and specific bits.  Almost
the entire Worker implementation is generic between all vhost devices.
The only non-generic bit is a device-specific ioctl to activate a
virtqueue.

To deal with this add a callback to the Worker's Run function to
activate all the virtqueues after they have been set up.

BUG= chromium:708267 
TEST=build and run with a vhost-net enabled kernel and see that
     everything still works

Change-Id: I262c07e4d2c289f9528924ba708d0b88bd0379bb
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/636121
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>

[modify] https://crrev.com/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f/src/main.rs
[modify] https://crrev.com/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f/src/hw/virtio/mod.rs
[add] https://crrev.com/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f/src/hw/virtio/vhost/worker.rs
[delete] https://crrev.com/ee73bf34a841fd7720e1af0c7a1a3346fc6c5768/src/hw/virtio/vhost_net.rs
[add] https://crrev.com/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f/src/hw/virtio/vhost/mod.rs
[add] https://crrev.com/86fb9567b588a11ed1f7ed2e3223c25fad07cc6f/src/hw/virtio/vhost/net.rs

Summary: Implement virtio_vsock (was: Implement virtio_vsock in kvmtool)
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/crosvm/+/88f9cba448ff7f1cd61c8bf66e34772132a8663f

commit 88f9cba448ff7f1cd61c8bf66e34772132a8663f
Author: Chirantan Ekbote <chirantan@chromium.org>
Date: Mon Sep 18 23:48:43 2017

Implement virtio-vsock

Implement the virtual sockets device using vhost subsystem of the host
kernel to handle data transfer.

BUG= chromium:708267 
TEST=build and run maitred in guest VM without issue

Change-Id: I35b542c0fc7e0fd9296f7ba3e1dfce60bf524d15
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/638838
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/src/main.rs
[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/src/hw/virtio/mod.rs
[add] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/vhost/src/vsock.rs
[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/virtio_sys/src/lib.rs
[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/vhost/src/net.rs
[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/vhost/src/lib.rs
[add] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/src/hw/virtio/vhost/vsock.rs
[modify] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/src/hw/virtio/vhost/mod.rs
[add] https://crrev.com/88f9cba448ff7f1cd61c8bf66e34772132a8663f/seccomp/x86_64/vhost_vsock_device.policy

Status: Fixed (was: Started)

Comment 14 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 15 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Components: OS>Systems>Containers

Sign in to add a comment