Skip to content

Conversation

@luodeb
Copy link

@luodeb luodeb commented Jun 24, 2025

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
Copy link
Contributor

ZR233 commented Jun 24, 2025

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

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.

3 participants