From d086d324e0b17ae54e3d6129095fff27a7fb3edd Mon Sep 17 00:00:00 2001 From: Alex Lyn Date: Tue, 14 Apr 2026 16:19:46 +0800 Subject: [PATCH] kata-types: Introduce independent IO thread for virtio-blk devices The 'indep_iothreads' field is introduced in Hypervisor to make it configurable for number of independent IO threads for virtio-blk devices. When set to a value greater than 0, creates independent IO threads that can be attached to virtio-blk devices during hotplug. Note that it requires 'enable_iothreads' to be true for virtio-blk devices to use these threads. Signed-off-by: Alex Lyn --- src/libs/kata-types/src/config/hypervisor/mod.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/libs/kata-types/src/config/hypervisor/mod.rs b/src/libs/kata-types/src/config/hypervisor/mod.rs index 8edfeaacd7..13dcb42254 100644 --- a/src/libs/kata-types/src/config/hypervisor/mod.rs +++ b/src/libs/kata-types/src/config/hypervisor/mod.rs @@ -1720,11 +1720,19 @@ pub struct Hypervisor { /// Enables the use of iothreads (data-plane). /// - /// When enabled, I/O operations are handled in a separate I/O thread. - /// This is currently only implemented for SCSI devices. + /// This is currently implemented for SCSI devices and for virtio-blk + /// hotplug when `indep_iothreads` is greater than 0. #[serde(default)] pub enable_iothreads: bool, + /// Number of independent IO threads for virtio-blk-pci devices. + /// + /// When set to a value greater than 0, creates independent IO threads + /// that can be attached to virtio-blk-pci devices during hotplug. + /// Requires enable_iothreads to be true for virtio-blk-pci devices to use these threads. + #[serde(default)] + pub indep_iothreads: u32, + /// Block device configuration information. #[serde(default, flatten)] pub blockdev_info: BlockDeviceInfo,