devices: introduce ivshmem device

This patch introduces the inter-vm shared memory(ivshmem) device
to share a memory region between multiple processes running
different guests and the host.

This patch supports the basic ivshmem functions like ivshmem-plain
in QEMU[1].

[1] https://www.qemu.org/docs/master/specs/ivshmem-spec.html

Signed-off-by: Yi Wang <foxywang@tencent.com>
Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
Songqian Li
2024-08-29 15:53:32 +08:00
committed by Bo Chen
parent bd17c84d3c
commit c72414552b
3 changed files with 366 additions and 0 deletions

View File

@@ -24,6 +24,8 @@ pub mod gic;
pub mod interrupt_controller;
#[cfg(target_arch = "x86_64")]
pub mod ioapic;
#[cfg(feature = "ivshmem")]
pub mod ivshmem;
pub mod legacy;
#[cfg(feature = "pvmemcontrol")]
pub mod pvmemcontrol;
@@ -33,6 +35,8 @@ pub mod pvpanic;
pub mod tpm;
pub use self::acpi::{AcpiGedDevice, AcpiPmTimerDevice, AcpiShutdownDevice};
#[cfg(feature = "ivshmem")]
pub use self::ivshmem::IvshmemDevice;
pub use self::pvpanic::{PvPanicDevice, PVPANIC_DEVICE_MMIO_SIZE};
bitflags! {