Re: [Xen-devel] [PATCH V2] libxl: set channel devid when not provided by application

2018-03-02 Thread Roger Pau Monné
On Mon, Feb 26, 2018 at 11:28:39AM -0700, Jim Fehlig wrote:
> Applications like libvirt may not populate a device devid field,
> delegating that to libxl. If needed, the application can later
> retrieve the libxl-produced devid. Indeed most devices are handled
> this way in libvirt, channel devices included.
> 
> This works well when only one channel device is defined, but more
> than one results in
> 
> qemu-system-i386: -chardev socket,id=libxl-channel-1,\
> path=/tmp/test-org.qemu.guest_agent.00,server,nowait:
> Duplicate ID 'libxl-channel-1' for chardev
> 
> Besides the odd '-1' value in the id, multiple channels have the same
> id, causing qemu to fail. A simple fix is to set an uninitialized
> devid (-1) to the dev_num passed to libxl__init_console_from_channel().
> 
> Signed-off-by: Jim Fehlig 

Reviewed-by: Roger Pau Monné 

Thanks, Roger.

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V2] libxl: set channel devid when not provided by application

2018-03-01 Thread Wei Liu
On Mon, Feb 26, 2018 at 11:28:39AM -0700, Jim Fehlig wrote:
> Applications like libvirt may not populate a device devid field,
> delegating that to libxl. If needed, the application can later
> retrieve the libxl-produced devid. Indeed most devices are handled
> this way in libvirt, channel devices included.
> 
> This works well when only one channel device is defined, but more
> than one results in
> 
> qemu-system-i386: -chardev socket,id=libxl-channel-1,\
> path=/tmp/test-org.qemu.guest_agent.00,server,nowait:
> Duplicate ID 'libxl-channel-1' for chardev
> 
> Besides the odd '-1' value in the id, multiple channels have the same
> id, causing qemu to fail. A simple fix is to set an uninitialized
> devid (-1) to the dev_num passed to libxl__init_console_from_channel().
> 
> Signed-off-by: Jim Fehlig 

Acked-by: Wei Liu 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel