Skip to content

feat(config): add VirtIO block mmio device configuration#3

Draft
luodeb wants to merge 1 commit into
mainfrom
debin/add_virtio_mmio
Draft

feat(config): add VirtIO block mmio device configuration#3
luodeb wants to merge 1 commit into
mainfrom
debin/add_virtio_mmio

Conversation

@luodeb

@luodeb luodeb commented Jun 24, 2025

Copy link
Copy Markdown

Add VirtioBlkMmioDeviceConfig struct to represent VirtIO block device configuration

[devices]
# Emu_devices.
# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig.
emu_devices = []

# Pass-through devices.
# Name Base-Ipa Base-Pa Length Alloc-Irq.
passthrough_devices = []

[[devices.virtio_blk_mmio]]
# Virtio block device configuration.
# Device ID.
device_id = "vda"
# MMIO base address.
mmio_base = "0x0a000000"
# MMIO size.
mmio_size = "0x200"
# Interrupt type.
interrupt_type = "level"
# Interrupt number.
interrupt_number = 16
# Guest device path.
guest_device_path = "/dev/vda"
# Backend type.
backend_type = "file"
# Backend path.
backend_path = "vm_nimbos.img"
# Image size.
size = "10GB"
# Readonly.
readonly = false
# Serial.
serial = "MMIO_DISK001"

- Add VirtioBlkMmioDeviceConfig struct to represent VirtIO block device configuration
- Include VirtIO block device information in VMDevicesConfig
- Update VM configuration template to support VirtIO block devices
@luodeb luodeb marked this pull request as draft June 24, 2025 09:00
@ZR233

ZR233 commented Jun 24, 2025

Copy link
Copy Markdown

mmio_size 是代码中定义的吧,是否有必要作为配置项?

ZCShou pushed a commit that referenced this pull request Mar 26, 2026
* chore: code fmt

* chore: update dependencies and remove unused patches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants