From ae4cc73918b3339a324ae9298e37394ae9ff0e82 Mon Sep 17 00:00:00 2001 From: tommady Date: Fri, 15 Nov 2024 22:02:20 +0000 Subject: [PATCH] fix: Refactor vmm builder code to simplify logic fix up aarch64 attach_legacy_devices_aarch64 fn Signed-off-by: tommady --- src/vmm/src/builder.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vmm/src/builder.rs b/src/vmm/src/builder.rs index 4a3eb48e0fc..d0ea317df6a 100644 --- a/src/vmm/src/builder.rs +++ b/src/vmm/src/builder.rs @@ -168,7 +168,9 @@ pub mod aarch64 { if cmdline_contains_console { // Make stdout non-blocking. set_stdout_nonblocking(); - let serial = setup_serial_device(event_manager, std::io::stdin(), std::io::stdout())?; + let serial = setup_serial_device(std::io::stdin(), std::io::stdout())?; + event_manager.add_subscriber(serial.clone()); + vmm.mmio_device_manager .register_mmio_serial(vmm.vm.fd(), &mut vmm.resource_allocator, serial, None) .map_err(VmmError::RegisterMMIODevice)?;