|
| 1 | +This series adds the virtio-msg transport layer. |
| 2 | + |
| 3 | +The individuals and organizations involved in this effort have had difficulty in |
| 4 | +using the existing virtio-transports in various situations and desire to add one |
| 5 | +more transport that performs its transport layer operations by sending and |
| 6 | +receiving messages. |
| 7 | + |
| 8 | +Implementations of virtio-msg will normally be done in multiple layers: |
| 9 | +* common / device level |
| 10 | +* bus level |
| 11 | + |
| 12 | +The common / device level defines the messages exchanged between the driver |
| 13 | +and a device. This common part should lead to a common driver holding most |
| 14 | +of the virtio specifics and can be shared by all virtio-msg bus implementations. |
| 15 | +The kernel implementation in [3] shows this separation. As with other transport |
| 16 | +layers, virtio-msg should not require modifications to existing virtio device |
| 17 | +implementations (virtio-net, virtio-blk etc). The common / device level is the |
| 18 | +main focus of this version of the patch series. |
| 19 | + |
| 20 | +The virtio-msg bus level implements the normal things a bus defines |
| 21 | +(enumeration, dma operations, etc) but also implements the message send and |
| 22 | +receive operations. A number of bus implementations are envisioned, |
| 23 | +some of which will be reusable and general purpose. Other bus implementations |
| 24 | +might be unique to a given situation, for example only used by a PCIe card |
| 25 | +and its driver. |
| 26 | + |
| 27 | +How much of the bus level should be described in the virtio spec is one item |
| 28 | +we wish to discuss. This draft takes a middle approach by describing the bus |
| 29 | +level and defining some standard bus level messages that MAY be used by the bus. |
| 30 | +It also describes a range of bus messages that are implementation dependent. |
| 31 | + |
| 32 | +The standard bus messages are an effort to avoid different bus implementations |
| 33 | +doing the same thing in different ways for no good reason. However the |
| 34 | +different environments will require different things. Instead of trying to |
| 35 | +anticipate all needs and provide something very abstract, we think |
| 36 | +implementation specific messages will be needed at the bus level. Over time, |
| 37 | +if we see similar messages across multiple bus implementations, we will move to |
| 38 | +standardize a bus level message for that. |
| 39 | + |
| 40 | +We are working on two reusable bus implementations: |
| 41 | + |
| 42 | +* virtio-msg-ffa based on Arm FF-A interface for use between: |
| 43 | + * normal world and secure world |
| 44 | + * host and VM or VM to VM |
| 45 | + * Can be used w/ or with out a hypervisor |
| 46 | + * Any Hypervisor that implements FF-A can be used |
| 47 | + |
| 48 | +* virtio-msg-amp for use between heterogenous systems |
| 49 | + * The main processors and its co-processors on an AMP SOC |
| 50 | + * Two or more systems connected via PCIe |
| 51 | + * Minimal requirements: bi-directional interrupts and |
| 52 | + at least one shared memory area |
| 53 | + |
| 54 | +We also anticipate a third: |
| 55 | + |
| 56 | +* virtio-msg-xen specific to Xen |
| 57 | + * Usable on any Xen system (including x86 where FF-A does not exist) |
| 58 | + * Using Xen events and page grants |
| 59 | + |
| 60 | +This series is a work in progress and we acknowledge at least the following |
| 61 | +issues we need to work on: |
| 62 | + |
| 63 | +* Conform to virtio spec nouns (device/driver vs frontend/backend) |
| 64 | + and verbs (must/may) |
| 65 | +* Perhaps move error definition elsewhere it the spec and align on its symbols |
| 66 | + and numeric values |
| 67 | +* Allow message size to be greater than 40 bytes and allow bus implementations |
| 68 | + to define their max message size |
| 69 | +* Add a way to discover the protocol version |
| 70 | +* Add a better description of the types of things a bus can do, specifically |
| 71 | + including out-of-band notification and memory area sharing/discovery |
| 72 | +* Maybe redo configuration generation handling |
| 73 | + |
| 74 | +Background info and work in progress implementations: |
| 75 | +* HVAC project page with intro slides [1] |
| 76 | +* HVAC demo repo w/ instructions in README.md [2] |
| 77 | +* Kernel w/ virtio-msg common level and ffa support [3] |
| 78 | +* QEMU w/ support for one form of virtio-msg-amp [4] |
| 79 | +* Portable RTOS library w/ one form of virtio-msg-amp [5] |
| 80 | + |
| 81 | +In addition to the QEMU system based demos in the hvac-demo repo, we also have |
| 82 | +two hardware systems running: |
| 83 | +* AMD x86 + AMD Arm Versal connected via PCIe |
| 84 | +* ST STM32MP157 A7 Linux using virtio-i2c provided by M4 Zephyr |
| 85 | + |
| 86 | +Please note that although the demos work, they are not yet aligned with each |
| 87 | +other nor this version of the spec. |
| 88 | + |
| 89 | +[1] https://linaro.atlassian.net/wiki/spaces/HVAC/overview |
| 90 | +[2] https://github.com/wmamills/hvac-demo |
| 91 | +[3] https://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git/log/?h=virtio/msg |
| 92 | +[4] https://github.com/edgarigl/qemu/commits/edgar/virtio-msg-new |
| 93 | +[5] https://github.com/arnopo/open-amp/commits/virtio-msg/ |
0 commit comments