From: Frediano Ziglio <fziglio@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, spice-devel@lists.freedesktop.org
Subject: Re: [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id
Date: Mon, 5 Nov 2018 03:48:59 -0500 (EST) [thread overview]
Message-ID: <112173151.40470994.1541407739361.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20181105084351.sfokm7j2ho5npaz2@sirius.home.kraxel.org>
>
> Hi,
>
> > > vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);
> > > + qxl->id = qemu_console_get_index(vga->con); /* == channel_id */
> > > + if (qxl->id != 0) {
> > > + error_setg(errp, "primary qxl-vga device must be console 0 "
> > > + "(first display device on the command line)");
> > > + return;
> > > + }
> >
> > In the comment this seems no more required so why testing it?
>
> I'd expect it'll confuse guests.
>
> If you are sure this is not the case feel free to send a patch dropping
> this check.
>
> > > static void qxl_realize_secondary(PCIDevice *dev, Error **errp)
> > > {
> > > - static int device_id = 1;
> > > PCIQXLDevice *qxl = PCI_QXL(dev);
> > >
> > > - qxl->id = device_id++;
> > > qxl_init_ramsize(qxl);
> > > memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
> > > qxl->vga.vram_size, &error_fatal);
> > > qxl->vga.vram_ptr = memory_region_get_ram_ptr(&qxl->vga.vram);
> > > qxl->vga.con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);
> > > + qxl->id = qemu_console_get_index(qxl->vga.con); /* == channel_id */
> > >
> >
> > As these IDs must be contiguous this means that there must be the
> > requirement
> > that if there is a qxl interface only qxl interfaces are used and no other
> > console which seems to me wrong.
>
> Hmm. Didn't know this is a requirement. But as far I know qxl->id is
> also expected to be the channel_id. So with qxl and non-qxl mixed we
> are in trouble no matter what:
>
> * with the patch we break the contiguous id requirement.
yes
> * without the patch we break the qxl->id == channel_id requirement.
no, why? qxl->id is not Qemu index.
>
> So, what now?
>
> cheers,
> Gerd
>
Frediano
next prev parent reply other threads:[~2018-11-05 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 12:47 [Qemu-devel] [PULL 0/2] Vga 20181029 patches Gerd Hoffmann
2018-10-29 12:47 ` [Qemu-devel] [PULL 1/2] qxl: store channel id in qxl->id Gerd Hoffmann
2018-11-02 9:10 ` Frediano Ziglio
2018-11-05 8:43 ` Gerd Hoffmann
2018-11-05 8:48 ` Frediano Ziglio [this message]
2018-11-05 10:10 ` Frediano Ziglio
2018-10-29 12:47 ` [Qemu-devel] [PULL 2/2] vga_int: remove unused function protype Gerd Hoffmann
2018-10-29 15:14 ` [Qemu-devel] [PULL 0/2] Vga 20181029 patches Peter Maydell
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=112173151.40470994.1541407739361.JavaMail.zimbra@redhat.com \
--to=fziglio@redhat.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=spice-devel@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.