Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174259588
D59847.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59847.diff
View Options
diff --git a/usr.sbin/bhyve/pci_virtio_console.c b/usr.sbin/bhyve/pci_virtio_console.c
--- a/usr.sbin/bhyve/pci_virtio_console.c
+++ b/usr.sbin/bhyve/pci_virtio_console.c
@@ -515,13 +515,26 @@
break;
case VTCON_PORT_READY:
+ if (ctrl->id >= VTCON_MAXPORTS) {
+ WPRINTF(("VTCON_PORT_READY event for unknown port %d",
+ ctrl->id));
+ return;
+ }
tmp = &sc->vsc_ports[ctrl->id];
- if (ctrl->id >= VTCON_MAXPORTS || !tmp->vsp_enabled) {
+ if (!tmp->vsp_enabled) {
WPRINTF(("VTCON_PORT_READY event for unknown port %d",
ctrl->id));
return;
}
+ if (ctrl->value == 1) {
+ resp.id = ctrl->id;
+ resp.event = VTCON_PORT_NAME;
+ resp.value = 1;
+ pci_vtcon_control_send(sc, &resp, tmp->vsp_name,
+ strlen(tmp->vsp_name));
+ }
+
if (tmp->vsp_console) {
resp.event = VTCON_CONSOLE_PORT;
resp.id = ctrl->id;
@@ -541,10 +554,6 @@
event.event = VTCON_DEVICE_ADD;
event.value = 1;
pci_vtcon_control_send(port->vsp_sc, &event, NULL, 0);
-
- event.event = VTCON_PORT_NAME;
- pci_vtcon_control_send(port->vsp_sc, &event, port->vsp_name,
- strlen(port->vsp_name));
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 7:40 PM (14 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39476004
Default Alt Text
D59847.diff (1 KB)
Attached To
Mode
D59847: bhyve: Defer virtio-console PORT_NAME until the guest is ready
Attached
Detach File
Event Timeline
Log In to Comment