« Previous | Next » 

Revision 160600fd

ID160600fd137a3a6f0d6a09579cf2282152f842ab

Added by Amit Shah over 11 years ago

virtio-serial-bus: Add a port 'name' property for port discovery in guests

The port 'id' or number is internal state between the guest kernel and
our bus implementation. This is invocation-dependent and isn't part of
the guest-host ABI.

To correcly enumerate and map ports between the host and the guest, the
'name' property is used.

Example:

-device virtserialport,name=org.qemu.port.0

This invocation will get us a char device in the guest at:

/dev/virtio-ports/org.qemu.port.0

which can be a symlink to

/dev/vport0p3

This 'name' property is exposed by the guest kernel in a sysfs
attribute:

/sys/kernel/virtio-ports/vport0p3/name

A simple udev script can pick up this name and create the symlink
mentioned above.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences