mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Use a common method for spawning virtio threads
Introduce a common solution for spawning the virtio threads which will make it easier to add the panic handling. During this effort I discovered that there were no seccomp filters registered for the vhost-user-net thread nor the vhost-user-block thread. This change also incorporates basic seccomp filters for those as part of the refactoring. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -1862,7 +1862,12 @@ impl DeviceManager {
|
||||
queue_size: disk_cfg.queue_size,
|
||||
};
|
||||
let vhost_user_block_device = Arc::new(Mutex::new(
|
||||
match virtio_devices::vhost_user::Blk::new(id.clone(), vu_cfg, self.restoring) {
|
||||
match virtio_devices::vhost_user::Blk::new(
|
||||
id.clone(),
|
||||
vu_cfg,
|
||||
self.restoring,
|
||||
self.seccomp_action.clone(),
|
||||
) {
|
||||
Ok(vub_device) => vub_device,
|
||||
Err(e) => {
|
||||
return Err(DeviceManagerError::CreateVhostUserBlk(e));
|
||||
|
||||
Reference in New Issue
Block a user