[libvirt] Add support for qemu's guestfwd

2009-11-03 Thread Matthew Booth
This is an update of the patchset I posted yesterday. There have been a few
changes in the 4th patch, which actually adds guestfwd support:

Firstly, after discussion on IRC, it was agreed that 'vmchannel' is a poor name
for the collection of implementations of private host-guest channels, because
it is the name of a specific implementation. Consequently the name has been
changed to just 'channel'.

Secondly, I've fixed a bunch of things I noticed while adding actual vmchannel
support (patches to follow separately).

Lastly, I've changed the relax-ng a bit to check the precise set of attributes
for guestfwd. This change is also followed up in the vmchannel support.

The patch now supports the following domain XML:

channel type='pipe'
  source path='/tmp/guestfwd'/
  target type='guestfwd' address='10.0.2.1' port='4600'/
/channel

It will output the following on the qemu command line for this:

-chardev pipe,id=channel0,path=/tmp/guestfwd \
-net user,guestfwd=tcp:10.0.2.1:4600-chardev:channel0

Support for -chardev is as complete as the current character device support.

Because of the legacy vmchannel, there was also some confusion about whether
these patches are intended for merging. These patches aren't directly related
to vmchannel, and are targeted at merging.

Matt

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Add support for qemu's guestfwd

2009-11-02 Thread Matthew Booth
This series adds support for a vmchannel using qemu's guestfwd. I'll be
following up with support for virtio-serial and RHEL5's vmchannel.

A vmchannel is specified as:

vmchannel type='pipe'
  source path='/tmp/vmchannel'/
  target type='guestfwd' address='10.0.2.1' port='4600'/
/vmchannel

There are a couple of minor complications. Firstly, the existing chrdev
structure assumes that all front-ends take only a port. There's a bit of code
churn adding a second union to this struct to allow for different data for
different backends.

Secondly, it turns out that the existing syntax for character devices doesn't
really work for guestfwd. Specifically it won't allow common options to be
added. This is fixed in qemu git with the new -chardev syntax. Consequently,
this patch only adds support for guestfwd using -chardev. We add detection for
-chardev, and a new internal utility function to output -chardev command lines
for all existing character device backends.

Matt

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list