Add a new device, ivshmem-flat, which is similar to the ivshmem PCI but
does not require a PCI bus. It's meant to be used on machines like those
with Cortex-M MCUs, which usually lack a PCI/PCIe bus, e.g. lm3s6965evb
and mps2-an385.
The device currently only supports the sysbus bus.
The new device, just like the ivshmem PCI device, supports both peer
notification via hardware interrupts and shared memory.
The device shared memory size can be set using the 'shmem-size' option
and it defaults to 4 MiB, which is the default size of shmem allocated
by the ivshmem server.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1134
Message-ID: <20231127052024.435743-2-gustavo.romero@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
docs/system/devices/ivshmem-flat.rst | 33 ++
hw/misc/Kconfig | 5 +
hw/misc/ivshmem-flat.c | 463 +++++++++++++++++++++++++++
hw/misc/meson.build | 2 +
hw/misc/trace-events | 16 +
include/hw/misc/ivshmem-flat.h | 85 +++++
6 files changed, 604 insertions(+)
create mode 100644 docs/system/devices/ivshmem-flat.rst
create mode 100644 hw/misc/ivshmem-flat.c
create mode 100644 include/hw/misc/ivshmem-flat.h