From: Amit Shah <amit.shah@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: armbru@redhat.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: [Qemu-devel] Re: [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports
Date: Tue, 22 Dec 2009 23:46:41 +0530 [thread overview]
Message-ID: <20091222181641.GA29396@amit-x200.redhat.com> (raw)
In-Reply-To: <4B310B28.9050503@suse.de>
On (Tue) Dec 22 2009 [19:08:40], Alexander Graf wrote:
> >
> > - /* Add virtio console devices */
> > - if (pci_enabled) {
> > - for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
> > - if (virtcon_hds[i]) {
> > - pci_create_simple(pci_bus, -1, "virtio-console-pci");
> > - }
> > - }
> > - }
> > -
> >
>
> We have something pretty similar in s390-virtio.c. I suppose that needs
> to be changed too?
Yes, it'll have to be changed as well then; done in my tree.
> > -static VirtIOS390DeviceInfo s390_virtio_console = {
> > - .init = s390_virtio_console_init,
> > - .qdev.name = "virtio-console-s390",
> > +static VirtIOS390DeviceInfo s390_virtio_serial = {
> > + .init = s390_virtio_serial_init,
> > + .qdev.name = "virtio-serial-s390",
> >
>
> Are you sure you changed all users of the old name too?
There's only virtio-serial-pci and virtio-serial-s390. Is there
something I missed?
The new changes in vl.c, on the other hand, I've not yet fully studied
so there might be something missing there.
> > --- a/hw/virtio-console.c
> > +++ b/hw/virtio-console.c
> > @@ -1,143 +1,121 @@
> > /*
> > - * Virtio Console Device
> > + * Virtio Console and Generic Port Devices
> > *
> > - * Copyright IBM, Corp. 2008
> > + * Copyright Red Hat, Inc. 2009
> > *
> > * Authors:
> > - * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> > + * Amit Shah <amit.shah@redhat.com>
> >
>
> Please don't remove copyrights.
It seems that way due to file name changes. This is actually a new file
that has nothing in common with the old one. Whatever is left of the old
content is now in virtio-serial-bus.c.
> > @@ -4823,6 +4826,13 @@ static int virtcon_parse(const char *devname)
> > fprintf(stderr, "qemu: too many virtio consoles\n");
> > exit(1);
> > }
> > +
> > + opts = qemu_opts_create(&qemu_device_opts, NULL, 0);
> > + qemu_opt_set(opts, "driver", "virtio-serial-pci");
> >
>
> As you stated in your comment, this breaks. Maybe something as simple as
>
> #ifdef TARGET_S390X
> qemu_opt_set(opts, "driver", "virtio-serial-pci");
> #else
> qemu_opt_set(opts, "driver", "virtio-serial-s390");
> #endif
>
> is enough here?
But it's ugly; Markus said we could do something better but I didn't
fully understand it. On the lines of creating default devices or setting
virtio-console's preferred bus type.
Thanks for looking at this,
Amit
next prev parent reply other threads:[~2009-12-22 18:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 17:49 [Qemu-devel] [RFC PATCH 0/3] virtio-console: Move to qdev, multiple devices, generic ports Amit Shah
2009-12-22 17:49 ` [Qemu-devel] [PATCH 1/3] virtio: Remove duplicate macro definition for max. virtqueues, bump up the max Amit Shah
2009-12-22 17:49 ` [Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports Amit Shah
2009-12-22 17:49 ` [Qemu-devel] [PATCH 3/3] virtio-serial: Add a new virtserialport device for generic serial port support Amit Shah
2009-12-22 17:55 ` [Qemu-devel] Re: [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports Alexander Graf
2009-12-22 17:59 ` Amit Shah
2009-12-22 18:08 ` Alexander Graf
2009-12-22 18:16 ` Amit Shah [this message]
2009-12-22 21:19 ` [Qemu-devel] " Anthony Liguori
[not found] ` <m33a31lrrk.fsf@crossbow.pond.sub.org>
[not found] ` <20091223150732.GA15932@amit-x200.redhat.com>
[not found] ` <m3aax9ikec.fsf@crossbow.pond.sub.org>
2010-01-04 9:23 ` Gerd Hoffmann
[not found] ` <20091223194020.GA22864@amit-x200.redhat.com>
[not found] ` <m3fx71fioz.fsf@crossbow.pond.sub.org>
[not found] ` <20091224051415.GA25261@amit-x200.redhat.com>
[not found] ` <m38wcsdbhf.fsf@crossbow.pond.sub.org>
2010-01-04 16:07 ` Gerd Hoffmann
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=20091222181641.GA29396@amit-x200.redhat.com \
--to=amit.shah@redhat.com \
--cc=agraf@suse.de \
--cc=armbru@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).