Page MenuHomeFreeBSD

bhyve: Defer virtio-console PORT_NAME until the guest is ready
Needs ReviewPublic

Authored by hayzam_gmail.com on Sat, Sep 19, 5:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 20, 12:44 AM
Unknown Object (File)
Sun, Sep 20, 12:33 AM
Unknown Object (File)
Sun, Sep 20, 12:32 AM
Unknown Object (File)
Sat, Sep 19, 8:24 PM
Unknown Object (File)
Sat, Sep 19, 7:05 PM
Subscribers

Details

Reviewers
markj
Group Reviewers
bhyve
Summary

pci_vtcon_announce_port() sends VIRTIO_CONSOLE_PORT_NAME immediately
after VIRTIO_CONSOLE_DEVICE_ADD, without waiting for the guest to
initialize the port. The Windows virtio-serial driver ignores the
name if the port is not yet available, which can prevent the QEMU
guest agent from finding org.qemu.guest_agent.0.

Send the name after the guest reports successful port initialization
with VIRTIO_CONSOLE_PORT_READY, as QEMU does.

While here, validate the guest-supplied port ID before forming a
pointer into vsc_ports[].

This ports the PORT_NAME ordering fix from illumos change 18082.

Obtained from: illumos 643ee887be44404b690eeaff14f20a27ad3c715c

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77096
Build 73979: arc lint + arc unit