virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: virtualization@lists.linux-foundation.org
Cc: Amit Shah <amit.shah@redhat.com>, virtualization@linux-foundation.org
Subject: Re: [PATCH 8/8] virtio: console: struct ports for multiple ports per device.
Date: Tue, 10 Nov 2009 17:27:03 +1030	[thread overview]
Message-ID: <200911101727.03491.rusty@rustcorp.com.au> (raw)
In-Reply-To: <1257834450..rusty@rustcorp.com.au>

On Tue, 10 Nov 2009 04:57:30 pm Rusty Russell wrote:
> 
> Rather than assume a single port, add a 'struct ports' with an array
> of ports.  Currently, there's always only one, but that will change.

Now, from here we need several more patches.  At least:

1) Generalize the output path so we can sleep, rather than spinning.
   This means a non-NULL callback, a 'done' flag and a struct completion.

2) Do we really need more than input buffer at a time?  If not, it's easy to
   generalize the input callback.  This will be slow, but shouldn't be a
   problem.

3) Add a header.  I suggest we change your proposed format a little, rather
   than an explicit length use a "continues" bit:

	struct virtio_console_header {
		/* Port number */
		__u32 id;
		/* VIRTIO_CONSOLE_HDR_CONTROLMSG, VIRTIO_CONSOLE_HDR_CONTINUES. */
		__u32 flags;
	} __attribute__((packed));

   This should be really easy to construct, and for input in the !multiport
   path we can fake one up.  We ignore CONTINUES on input since we don't have
   a userspace API which understands framing (we'd need recvmsg).

4) Hook it all together with the new feature bit.

5) Add the debugfs and sysfs stuff in stages.

6) See if we really need throttling now we're only allowing 1 buffer at a
   time.

Cheers,
Rusty.

       reply	other threads:[~2009-11-10  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1257834450..rusty@rustcorp.com.au>
2009-11-10  6:57 ` Rusty Russell [this message]
2009-11-10  7:24   ` [PATCH 8/8] virtio: console: struct ports for multiple ports per device Amit Shah
2009-11-10 13:14     ` Rusty Russell
2009-11-10  8:56 ` [PATCH 3/8] hvc_console: make the ops pointer const Christian Borntraeger
2009-11-10  9:33 ` [PATCH 8/8] virtio: console: struct ports for multiple ports per device Amit Shah
2009-11-10 12:51   ` Rusty Russell
2009-11-10  6:27 Rusty Russell

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=200911101727.03491.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=amit.shah@redhat.com \
    --cc=virtualization@linux-foundation.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).