From: Amit Shah <amit.shah@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] virtio-console: Add support for multiple ports for generic guest-host communication
Date: Wed, 23 Sep 2009 17:20:43 +0530 [thread overview]
Message-ID: <20090923115043.GA28088@amit-x200.redhat.com> (raw)
In-Reply-To: <4ABA0481.6090603@redhat.com>
On (Wed) Sep 23 2009 [13:20:33], Gerd Hoffmann wrote:
>
>>>> + char *name;
>>>> +
>>>> + QTAILQ_HEAD(, VirtIOConsolePortBuffer) unflushed_buffer_head;
>>>> +
>>>> + bool guest_connected;
>>>> + bool host_connected;
>>>> +};
>>>
>>> Sticking a pointer to VirtConPortDeviceInfo here is probably handy.
>>> More consistent naming please.
>>
>> Consistent naming for what?
>
> The structs. Pick a prefix (say VirtCon) and stick with that. Then for
> the bus implementation:
>
> VirtConBus (fine)
> VirtConPort (VirtIOConsolePort now)
> VirtConPortInfo (VirtConPortDeviceInfo now)
Yeah; I've not renamed the structs yet.
> The console port driver could name its state info this way:
>
> VirtConPortConsole (doesn't exist right now it seems ...).
You're actually suggesting to split everything -- a console (in the
current sense) is a different device and a port (the new vmchannels) are
different devices. Right?
>>> You should be able to move the port driver(s) to a separate source file
>>> without much trouble. Only the port driver should deal with a chardev.
>>
>> Oh OK; maybe I understand what you're saying about the chardevs now.
>>
>>> The virtio-console core should not care at all how the data is piped to
>>> the (host side) users. It just drives the ring, forwards events,
>>> accepts data for the guest (via helper function), passes on data from
>>> the guest (via callback in VirtConPortDeviceInfo).
>>
>> Hm, let me think over this.
>
> A port driver should look roughly like the attached one. That one does
> something completely different: Implement a watchdog ;) Warning:
> didn't even compile it.
>
> The console port driver would have the chardev instead of the timer in
> the driver state struct and would basically forward the data between the
> port and the chardev.
Thanks; parsing all this..
Amit
next prev parent reply other threads:[~2009-09-23 11:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 16:23 [Qemu-devel] Multiple port support for virtio-console Amit Shah
2009-09-22 16:23 ` [Qemu-devel] [PATCH 1/4] char: Emit 'OPENED' events on char device open Amit Shah
2009-09-22 16:23 ` [Qemu-devel] [PATCH 2/4] qdev: add string property Amit Shah
2009-09-22 16:23 ` [Qemu-devel] [PATCH 3/4] virtio-console: Add support for multiple ports for generic guest-host communication Amit Shah
2009-09-22 16:23 ` [Qemu-devel] [PATCH 4/4] virtio-console: Add a in-qemu api for open/read/write/close ports Amit Shah
2009-09-23 9:12 ` Gerd Hoffmann
2009-09-23 9:07 ` [Qemu-devel] [PATCH 3/4] virtio-console: Add support for multiple ports for generic guest-host communication Gerd Hoffmann
2009-09-23 9:43 ` Amit Shah
2009-09-23 11:20 ` Gerd Hoffmann
2009-09-23 11:50 ` Amit Shah [this message]
2009-09-23 12:30 ` Gerd Hoffmann
2009-09-23 12:40 ` Amit Shah
2009-09-23 13:04 ` Gerd Hoffmann
2009-09-23 13:17 ` 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=20090923115043.GA28088@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.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).