From: Gerd Hoffmann <kraxel@redhat.com>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: spice-devel@lists.freedesktop.org,
qemu-devel <qemu-devel@nongnu.org>,
Frediano Ziglio <fziglio@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver
Date: Tue, 09 Jun 2015 11:43:39 +0200 [thread overview]
Message-ID: <1433843019.26677.26.camel@redhat.com> (raw)
In-Reply-To: <CAHt6W4eGtoF+_OQyV_oNFF2jEWZhq=QYc60pZtHbBfE=sVqtng@mail.gmail.com>
On Di, 2015-06-09 at 10:26 +0100, Frediano Ziglio wrote:
> 2015-06-09 10:12 GMT+01:00 Gerd Hoffmann <kraxel@redhat.com>:
> > On Di, 2015-06-09 at 09:49 +0100, Frediano Ziglio wrote:
> >> This patch allow to limit number of heads using qxl driver. By default
> >> qxl driver is not limited on any kind on head use so can decide to use
> >> as much heads.
> >
> > There is a hard limit of 16 monitors in the qxl device ...
> >
>
> Ok, didn't see it.
The rom->client_monitors_config heads array has 16 entries, and I
suspect the same limit could be in more places ...
> >> + if (d->max_heads && d->max_heads <= 64) {
> >> + rom->flags = cpu_to_le64(QXL_ROM_FLAG_MAX_HEADS);
> >> + rom->max_heads = cpu_to_le16(d->max_heads);
> >> + }
> >
> > rom does already carry information about the heads. How about simply
> > applying the limit when filling rom->client_monitors_config in
> > interface_client_monitors_config()?
> >
> > No device changes, no driver changes, alot less trouble.
> >
> > cheers,
> > Gerd
> >
>
> So what you are proposing is client should limit heads based on
> spice-server limit and also spice-server should limit monitor received
> from client.
No. You'll add a new property like you did. In
interface_client_monitors_config(), where qemu already checks it
wouldn't overflow the 16 entries in the array it has, you additionally
check for the configured limit.
Which will filter the monitors_config sent from spice client to the
guest to not carry more than $limit entries. So, if you configured two
heads, and spice client says "fyi, I have three heads here ...", qemu
will forward only two entries guests to the guest. Therefore the guest
will use two heads them only, leaving the third unused.
In theory spice-server could do the filtering too, but doing it in qemu
is easier as you can easily pass in the limit as device property.
cheers,
Gerd
next prev parent reply other threads:[~2015-06-09 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 8:49 [Qemu-devel] [PATCH] RFC: qxl: allow to specify head limit to qxl driver Frediano Ziglio
2015-06-09 9:12 ` Gerd Hoffmann
2015-06-09 9:26 ` Frediano Ziglio
2015-06-09 9:43 ` Gerd Hoffmann [this message]
2015-06-09 15:03 ` Frediano Ziglio
2015-06-09 9:50 ` [Qemu-devel] [Spice-devel] " Daniel P. Berrange
2015-06-09 11:15 ` Christophe Fergeau
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=1433843019.26677.26.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=freddy77@gmail.com \
--cc=fziglio@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 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).