Skip to content

Conversation

@alyssais
Copy link
Member

DeviceManager::add_virtio_console_device used to create the console resize pipe and assign it to self.console_resize_pipe, but when this was changed to use console_info, that was deleted without replacement. This meant that, even though the console resize pipe was created by pre_create_console_devices, the DeviceManager never found out about it, so console resize didn't work (at least for pty consoles).

To fix this, the console resize pipe needs to be passed to the Vm initializer, which is already supported, it was just previously not used for new VMs.

Since DeviceManager already stores the console resize pipe in an Arc, and Vmm also needs a copy of it, the sensible thing to do is change DeviceManager::new to take Arc, and then we don't need to dup the file descriptor, which could fail.

Fixes: 52eebaf ("vmm: refactor DeviceManager to use console_info")

DeviceManager::add_virtio_console_device used to create the console
resize pipe and assign it to self.console_resize_pipe, but when this
was changed to use console_info, that was deleted without replacement.
This meant that, even though the console resize pipe was created by
pre_create_console_devices, the DeviceManager never found out about
it, so console resize didn't work (at least for pty consoles).

To fix this, the console resize pipe needs to be passed to the Vm
initializer, which is already supported, it was just previously not
used for new VMs.

Since DeviceManager already stores the console resize pipe in an Arc,
and Vmm also needs a copy of it, the sensible thing to do is change
DeviceManager::new to take Arc, and then we don't need to dup the file
descriptor, which could fail.

Fixes: 52eebaf ("vmm: refactor DeviceManager to use console_info")
Signed-off-by: Alyssa Ross <[email protected]>
@alyssais alyssais requested a review from a team as a code owner August 29, 2024 20:18
@rbradford rbradford added the bug-fix Bug fix to include in release notes label Aug 31, 2024
Copy link
Member

@rbradford rbradford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work - thank you!

@rbradford rbradford added this pull request to the merge queue Aug 31, 2024
Merged via the queue into cloud-hypervisor:main with commit 4bfeba9 Aug 31, 2024
@alyssais alyssais deleted the resize branch September 6, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants