qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: [Qemu-devel] Re: virtio-serial: A guest <-> host interface for simple communication
Date: Thu, 25 Jun 2009 21:03:02 +0930	[thread overview]
Message-ID: <200906252103.02892.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20090624123937.GA14630@amit-x200.redhat.com>

On Wed, 24 Jun 2009 10:09:37 pm Amit Shah wrote:
> On (Wed) Jun 24 2009 [13:45:01], Rusty Russell wrote:
> > On Tue, 23 Jun 2009 10:12:31 pm Amit Shah wrote:
> > > Hello,
> > >
> > > Here are two patches. One implements a virtio-serial device in qemu
> > > and the other is the driver for a guest kernel.
> > >
> > > While working on a vmchannel interface that is needed for communication
> > > between guest userspace and host userspace, I saw that most of the
> > > interface can be abstracted out as a "serial" device with "ports".
> >
> > OK, I don't think the "naming" idea works though.  A userspace user would
> > have to open each one in turn to get its name.  I'd stick with numbers.
>
> What if an ioctl were added to get the port number from the port name?
> Userspace would do
> 	ioctl(fd, VIRTIO_SERIAL_GET_PORT_FROM_NAME, &nr);
> 	sprintf(port, "/dev/vmch%s", nr);
> 	fd2 = open(port, ...);

Yep, pretty ugly tho.  If you use the "Amit Shah is in charge of port 
numbering approach", then it's just:

	fd = open("/dev/vmch<my-assigned-number>", ...);

Since you need to control names anyway, why not just use numbers?

> > You also don't have dynamic creation and removal, except by hotpluging
> > the entire device (which was on your requirements page).
>
> Actually we're more interested in hotplugging ports than the device
> itself ("Dynamic channel creation").

Exactly, which you don't seem to have.

> > what ports exist.  Register on the change interrupt to get updates.  Drop
> > the control vq entirely.
>
> If the ioctl mentioned above were added, it would justify the control
> vq, right?

Yes.  Or put another way, simplifying the interface to use assigned port 
numbers would simplify the implementation, use, and specification of the device 
:)

Cheers,
Rusty.

  reply	other threads:[~2009-06-25 11:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 12:42 [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication Amit Shah
2009-06-23 12:42 ` [Qemu-devel] [PATCH] virtio_serial: A char device for simple guest <-> host communication Amit Shah
2009-06-23 12:42   ` [Qemu-devel] [PATCH] virtio-serial: virtio device for simple host <-> guest communication Amit Shah
2009-06-23 15:19     ` Blue Swirl
2009-06-23 15:15   ` [Qemu-devel] [PATCH] virtio_serial: A char device for simple guest <-> host communication Blue Swirl
2009-06-23 12:55 ` [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication Paul Brook
2009-06-23 13:00   ` Amit Shah
2009-06-23 13:09     ` Paul Brook
2009-06-23 13:58   ` Christian Bornträger
2009-06-23 14:16     ` Paul Brook
2009-06-23 14:40       ` Christian Bornträger
2009-06-23 14:59   ` Daniel P. Berrange
2009-06-24  4:15 ` [Qemu-devel] " Rusty Russell
2009-06-24 12:39   ` Amit Shah
2009-06-25 11:33     ` Rusty Russell [this message]
2009-06-25 20:49       ` Amit Shah
2009-06-24 16:40 ` [Qemu-devel] " Jamie Lokier
2009-06-24 17:10   ` Amit Shah
2009-06-24 17:50     ` Jamie Lokier
2009-06-24 18:01       ` Amit Shah
2009-06-24 19:20         ` Jamie Lokier
2009-06-25  4:41           ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906252103.02892.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=amit.shah@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).