RFC IVSHMEM version 2 device for QEMU
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest3 patches 10 repliesIn review
- v1 RFC3 patches 18 repliesSuperseded
Changes in v2 from the cover letter
- changed PCI device ID to Siemens-granted one,
adjusted PCI device revision to 0
- removed unused feature register from device
- addressed feedback on specification document
- rebased over master
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hw/misc: Add implementation of ivshmem revision 2 devicehw/ hw/ include/ +1 more | +1136 | 1 reply | |
| 2/3 | docs/specs: Add specification of ivshmem device revision 2docs/ | +376 | 3 replies | |
| 3/3 | contrib: Add server for ivshmem revision 2Makefile Makefile.objs configure +4 more | +939 | 1 reply |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Liang Yan |
|---|---|
| Series | T-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC][PATCH v2 0/3] IVSHMEM version 2 device for QEMU
Overdue update of the ivshmem 2.0 device model as presented at [1].
Changes in v2:
- changed PCI device ID to Siemens-granted one,
adjusted PCI device revision to 0
- removed unused feature register from device
- addressed feedback on specification document
- rebased over master
This version is now fully in sync with the implementation for Jailhouse that is currently under review [2][3], UIO and virtio-ivshmem drivers are shared. Jailhouse will very likely pick up this revision of the device in order to move forward with stressing it.
More details on the usage with QEMU were in the original cover letter (with adjustements to the new device ID):
If you want to play with this, the basic setup of the shared memory device is described in patch 1 and 3. UIO driver and also the virtio-ivshmem prototype can be found at
http://git.kiszka.org/?p=linux.git;a=shortlog;h=refs/heads/queues/ivshmem2
Accessing the device via UIO is trivial enough. If you want to use it for virtio, this is additionally to the description in patch 3 needed on the virtio console backend side:
modprobe uio_ivshmem
echo "110a 4106 1af4 1100 ffc003 ffffff" > /sys/bus/pci/drivers/uio_ivshmem/new_id
linux/tools/virtio/virtio-ivshmem-console /dev/uio0And for virtio block:
echo "110a 4106 1af4 1100 ffc002 ffffff" > /sys/bus/pci/drivers/uio_ivshmem/new_id linux/tools/virtio/virtio-ivshmem-console /dev/uio0 /path/to/disk.img
After that, you can start the QEMU frontend instance with the virtio-ivshmem driver installed which can use the new /dev/hvc* or /dev/vda* as usual.
Any feedback welcome!
Jan
PS: Let me know if I missed someone potentially interested in this topic on CC - or if you would like to be dropped from the list.
[1] https://kvmforum2019.sched.com/event/TmxI
[2] https://groups.google.com/forum/#!topic/jailhouse-dev/ffnCcRh8LOs
[3] https://groups.google.com/forum/#!topic/jailhouse-dev/HX-0AGF1cjg
Jan Kiszka (3):
hw/misc: Add implementation of ivshmem revision 2 device docs/specs: Add specification of ivshmem device revision 2
contrib: Add server for ivshmem revision 2
Makefile | 3 + Makefile.objs | 1 + configure | 1 + contrib/ivshmem2-server/Makefile.objs | 1 + contrib/ivshmem2-server/ivshmem2-server.c | 462 ++++++++++++ contrib/ivshmem2-server/ivshmem2-server.h | 158 +++++ contrib/ivshmem2-server/main.c | 313 +++++++++ docs/specs/ivshmem-2-device-spec.md | 376 ++++++++++ hw/misc/Makefile.objs | 2 +- hw/misc/ivshmem2.c | 1085 +++++++++++++++++++++++++++++ include/hw/misc/ivshmem2.h | 48 ++ include/hw/pci/pci_ids.h | 2 + 12 files changed, 2451 insertions(+), 1 deletion(-) create mode 100644 contrib/ivshmem2-server/Makefile.objs create mode 100644 contrib/ivshmem2-server/ivshmem2-server.c create mode 100644 contrib/ivshmem2-server/ivshmem2-server.h create mode 100644 contrib/ivshmem2-server/main.c create mode 100644 docs/specs/ivshmem-2-device-spec.md create mode 100644 hw/misc/ivshmem2.c create mode 100644 include/hw/misc/ivshmem2.h
Signature · 1 line
2.16.4