tree: beae100381ec27ed9899a30de5045248eba6f8f0 [path history] [tgz]
  1. init/
  2. BUILD.gn
  3. file_descriptor_util.cc
  4. file_descriptor_util.h
  5. file_descriptor_util_test.cc
  6. fuse_mount.cc
  7. fuse_mount.h
  8. local_file.cc
  9. local_file.h
  10. local_file_test.cc
  11. message.proto
  12. message_stream.cc
  13. message_stream.h
  14. message_stream_test.cc
  15. mojo_proxy.cc
  16. mojo_proxy.h
  17. mojo_proxy_test.cc
  18. OWNERS
  19. proxy_file_system.cc
  20. proxy_file_system.h
  21. proxy_file_system_test.cc
  22. README.md
  23. server_proxy.cc
  24. server_proxy.h
  25. server_proxy_main.cc
arc/vm/mojo_proxy/README.md

ARCVM mojo proxy

ARCVM mojo proxy proxies data sent over file descriptors used for mojo communication between the host and the guest.

        Chrome
           |
     Host mojo proxy
           |
        crosvm
           |
 +---------+----------+
 |ARCVM    |          |
 |         |          |
 |    Guest kernel    |
 |         |          |
 |  Guest mojo proxy  |
 |         |          |
 | ARC bridge service |
 |                    |
 +--------------------+

virtio-wl connection initialization

  1. In the guest VM, the guest mojo proxy process creates a named virtio-wl context whose name is “mojo”.
  2. The guest kernel sends this request to crosvm's virtio-wl process in the host.
  3. In the host, crosvm's virtio-wl process forwards this request to a named UNIX domain socket /run/arcvm/mojo/mojo-proxy.sock.
  4. The host mojo proxy process listens on /run/arcvm/mojo/mojo-proxy.sock and accepts the connection.
  5. Now the guest mojo proxy process and the host mojo proxy process are connected by virtio-wl. Data sent to the virtio-wl context in the guest can be received by /run/arcvm/mojo-proxy.sock in the host and vice versa.

Mojo channel initialization

  1. In the guest VM, the ARC bridge service connects to a named UNIX domain socket /var/run/chrome/arc_bridge.sock.
  2. The guest mojo proxy process listens on /var/run/chrome/arc_bridge.sock and accepts the connection.
  3. The guest mojo proxy process sends the host mojo proxy process a connection request.
  4. In the host, the host mojo proxy process handles the connection request by connecting to a named UNIX domain socket /run/chrome/arc/arc_bridge.sock.
  5. The chrome browser process listens on /run/chrome/arc/arc_bridge.sock and accepts the connection.
  6. Now the ARC bridge service in the guest VM and the chrome browser process in the host are connected by a proxied UNIX domain socket via mojo proxy processes.