qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] virtio-console: Have a static instance of virtconsole
Date: Fri, 4 Sep 2009 19:45:41 +0300	[thread overview]
Message-ID: <f43fc5580909040945i47b81b11raba9cf8e9951a148@mail.gmail.com> (raw)
In-Reply-To: <20090904164030.GA31240@amit-x200.redhat.com>

On Fri, Sep 4, 2009 at 7:40 PM, Amit Shah<amit.shah@redhat.com> wrote:
> On (Fri) Sep 04 2009 [19:37:25], Blue Swirl wrote:
>> On Fri, Sep 4, 2009 at 7:33 PM, Amit Shah<amit.shah@redhat.com> wrote:
>> > On (Fri) Sep 04 2009 [19:26:27], Blue Swirl wrote:
>> >> On Fri, Sep 4, 2009 at 12:14 PM, Amit Shah<amit.shah@redhat.com> wrote:
>> >> > Currently the VirtIOConsole struct is allocated from the call
>> >> > to virtio_common_init, also doing an UP_CAST implicitly.
>> >> >
>> >> > The new multiport functionality will need a few arrays and
>> >> > it's easier to move to the new VMState infrastructure by
>> >> > keeping it all within one struct.
>> >>
>> >> > +VirtIOConsole virtconsole;
>> >>
>> >> IMHO this is going to wrong direction. What kind of code would need a
>> >> static instance?
>> >
>> > Adding multiple ports to the console device, we'll have to store an
>> > array of ports here as well as config space. Both of these are
>> > device-specific.
>>
>> There could be a master device which managed all ports.
>
> There's only one instance of a virtio device created, and this device
> hosts multiple ports. And VirIOConsole is the master structure.

But instead of this, you should have a separate structure for the
master one, if that way you can avoid the static instance.

  reply	other threads:[~2009-09-04 16:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-04  9:14 [Qemu-devel] [PATCH] virtio-console: Have a static instance of virtconsole Amit Shah
2009-09-04 16:26 ` Blue Swirl
2009-09-04 16:33   ` Amit Shah
2009-09-04 16:37     ` Blue Swirl
2009-09-04 16:40       ` Amit Shah
2009-09-04 16:45         ` Blue Swirl [this message]
2009-09-04 16:51           ` Amit Shah
     [not found]             ` <m3y6ouy5lq.fsf@neno.mitica>
2009-09-04 17:40               ` [Qemu-devel] " Amit Shah
2009-09-08 14:08 ` Anthony Liguori
2009-09-08 14:41   ` Gerd Hoffmann
2009-09-09  6:07   ` 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=f43fc5580909040945i47b81b11raba9cf8e9951a148@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=amit.shah@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).