devices: Implement DMA for fw_cfg device

We pass a reference to the guest memory when we create the device
in DeviceManager. This allows us to access the guest memory for DMA.

Signed-off-by: Alex Orozco <alexorozco@google.com>
This commit is contained in:
Alex Orozco
2025-04-18 16:37:11 +00:00
committed by Bo Chen
parent 1f51e4525b
commit edee53ac1a
4 changed files with 257 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ version = "0.1.0"
acpi_tables = { workspace = true }
anyhow = { workspace = true }
arch = { path = "../arch" }
bitfield-struct = { version = "0.10.1", optional = true }
bitflags = { workspace = true }
byteorder = { workspace = true }
event_monitor = { path = "../event_monitor" }
@@ -43,6 +44,6 @@ arch = { path = "../arch" }
[features]
default = []
fw_cfg = ["linux-loader", "zerocopy"]
fw_cfg = ["bitfield-struct", "linux-loader", "zerocopy"]
kvm = ["arch/kvm"]
pvmemcontrol = []