qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, alex.bennee@linaro.org, bill.mills@linaro.org,
	edgar.iglesias@amd.com
Subject: [PATCH v1 0/5] virtio: Add the virtio-msg transport
Date: Tue, 28 Oct 2025 16:23:45 +0100	[thread overview]
Message-ID: <20251028152351.1247812-1-edgar.iglesias@gmail.com> (raw)

From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>

This adds virtio-msg, a new virtio transport. Virtio-msg works by
exchanging messages over a bus and doesn't rely on trapping and emulation
making it a good fit for a number of applications such as AMP, real-time
and safety applications.

Together with the new transport, this series adds a PCI device that
implements an AMP setup much like it could look if two SoC's would
use virtio-msg across a PCI link.

Current gaps and limitations:
Shared memory FIFO layout likely to change in the future.
Temporarily uses PCI Vendor Xilinx / Device 0x9039.
Documentation.

The virtio-msg draft spec:
https://github.com/Linaro/virtio-msg-spec/

QEMU with these patches:
https://github.com/edgarigl/qemu/tree/edgar/virtio-msg-rfc

Linux with virtio-msg support:
https://github.com/edgarigl/linux/tree/edgari/virtio-msg-6.17

To try it, first build Linux with the following enabled:
CONFIG_VIRTIO_MSG=y
CONFIG_VIRTIO_MSG_AMP=y
CONFIG_VIRTIO_MSG_AMP_PCI=y

Boot linux on QEMU with a virtio-msg-amp-pci device, in this example
with a virtio-net device attached to it:

 -device virtio-msg-amp-pci
 -device virtio-net-device,netdev=n0
 -netdev user,id=n0

If you're running on a QEMU machine that has virtio-mmio enabled, e.g 
ARM virt, you'll need to specify the virtio-bus for the device, otherwise
QEMU will connect it to virtio-mmio. For ARM virt machines:

 -device virtio-msg-amp-pci
 -device virtio-net-device,netdev=n0,bus=/gpex-pcihost/pcie.0/virtio-msg-amp-pci/fifo0/virtio-msg/bus0/virtio-msg-dev
 -netdev user,id=n0

Cheers,
Edgar

Edgar E. Iglesias (5):
  virtio: Introduce notify_queue
  virtio: Add virtio_queue_get_rings
  virtio: Add the virtio-msg transport
  hw/misc: Add generic virtio-msg AMP PCI device
  docs: Describe virtio-msg-amp-pci

 .../devices/virtio/virtio-msg-amp-pci.rst     |  70 ++
 hw/misc/Kconfig                               |   7 +
 hw/misc/meson.build                           |   1 +
 hw/misc/virtio-msg-amp-pci.c                  | 328 +++++++
 hw/virtio/Kconfig                             |   4 +
 hw/virtio/meson.build                         |   5 +
 hw/virtio/virtio-msg-bus.c                    |  89 ++
 hw/virtio/virtio-msg.c                        | 695 ++++++++++++++
 hw/virtio/virtio.c                            |  23 +
 include/hw/virtio/spsc_queue.h                | 213 +++++
 include/hw/virtio/virtio-bus.h                |   1 +
 include/hw/virtio/virtio-msg-bus.h            |  95 ++
 include/hw/virtio/virtio-msg-prot.h           | 846 ++++++++++++++++++
 include/hw/virtio/virtio-msg.h                |  56 ++
 include/hw/virtio/virtio.h                    |   2 +
 15 files changed, 2435 insertions(+)
 create mode 100644 docs/system/devices/virtio/virtio-msg-amp-pci.rst
 create mode 100644 hw/misc/virtio-msg-amp-pci.c
 create mode 100644 hw/virtio/virtio-msg-bus.c
 create mode 100644 hw/virtio/virtio-msg.c
 create mode 100644 include/hw/virtio/spsc_queue.h
 create mode 100644 include/hw/virtio/virtio-msg-bus.h
 create mode 100644 include/hw/virtio/virtio-msg-prot.h
 create mode 100644 include/hw/virtio/virtio-msg.h

-- 
2.43.0



             reply	other threads:[~2025-10-28 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 15:23 Edgar E. Iglesias [this message]
2025-10-28 15:23 ` [PATCH v1 1/5] virtio: Introduce notify_queue Edgar E. Iglesias
2025-11-05 12:38   ` Alex Bennée
2025-11-13 20:43     ` Edgar E. Iglesias
2025-10-28 15:23 ` [PATCH v1 2/5] virtio: Add virtio_queue_get_rings Edgar E. Iglesias
2025-11-05 12:39   ` Alex Bennée
2025-10-28 15:23 ` [PATCH v1 3/5] virtio: Add the virtio-msg transport Edgar E. Iglesias
2025-10-28 15:23 ` [PATCH v1 4/5] hw/misc: Add generic virtio-msg AMP PCI device Edgar E. Iglesias
2025-10-28 15:23 ` [PATCH v1 5/5] docs: Describe virtio-msg-amp-pci Edgar E. Iglesias
2025-11-05 19:52   ` Alex Bennée
2025-10-28 15:30 ` [PATCH v1 0/5] virtio: Add the virtio-msg transport Edgar E. Iglesias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251028152351.1247812-1-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=bill.mills@linaro.org \
    --cc=edgar.iglesias@amd.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).