[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] [question] why only one vport in /dev/char/ when I use qe
From: |
Zhang Haoyu |
Subject: |
[Qemu-discuss] [question] why only one vport in /dev/char/ when I use qemu option "-device virtio-serial, max_ports=2" |
Date: |
Sat, 13 Sep 2014 19:42:17 +0800 |
Hi, Amit,
I start a VM with the option "-device virtio-serial,max_ports=2", but only one
vport I can see in /dev/char/,
I read the source,
guest virtio console driver
qemu virtio-serial
virtcons_probe
|
init_vqs
|
__send_control_msg(
VIRTIO_CONSOLE_DEVICE_READY) =====> control_out
|
handle_control_message
|
QTAILQ_FOREACH(port, &vser->ports, next) {
control_intr <=====
send_control_event(VIRTIO_CONSOLE_PORT_ADD) }
|
control_work_handler
|
add_port
|
device_create("vport%up%u")
And, I add debug log in virtser_port_device_realize(), find that
virtser_port_device_realize() was called only once,
i.e., only one port in vser->ports, why?
How does max_ports option take effection ?
Thanks,
Zhang Haoyu
- [Qemu-discuss] [question] why only one vport in /dev/char/ when I use qemu option "-device virtio-serial, max_ports=2",
Zhang Haoyu <=