qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Roque Arcudia Hernandez <roqueh@google.com>
Cc: ankeesler@google.com, mst@redhat.com,
	marcandre.lureau@redhat.com, qemu-devel@nongnu.org,
	venture@google.com
Subject: Re: [PATCH 2/2] hw/display: Allow injection of virtio-gpu EDID name
Date: Mon, 25 Nov 2024 12:04:09 +0000	[thread overview]
Message-ID: <Z0RnuVKPHO1T2BfV@redhat.com> (raw)
In-Reply-To: <20241017215304.3916866-3-roqueh@google.com>

On Thu, Oct 17, 2024 at 09:53:04PM +0000, Roque Arcudia Hernandez wrote:
> From: Andrew Keesler <ankeesler@google.com>
> 
> Thanks to 72d277a7, 1ed2cb32, and others, EDID (Extended Display Identification
> Data) is propagated by QEMU such that a virtual display presents legitimate
> metadata (e.g., name, serial number, preferred resolutions, etc.) to its
> connected guest.
> 
> This change adds the ability to specify the EDID name for a particular
> virtio-vga display. Previously, every virtual display would have the same name:
> "QEMU Monitor". Now, we can inject names of displays in order to test guest
> behavior that is specific to display names. We provide the ability to inject the
> display name from the display configuration as that most closely resembles how
> real displays work (hardware displays contain static EDID information that is
> provided to every connected host).
> 
> This new behavior must be enabled by setting the edid_name boolean property on
> the display device (it is disabled by default).
> 
> It should be noted that EDID names longer than 12 bytes will be truncated per
> spec (I think?).
> 
> Testing: verified that when I specified 2 outputs for a virtio-gpu with
> edid_name set, the names matched those that I configured with my vnc display.
> 
>   -display vnc=localhost:0,id=aaa,display=vga,head=0,name=AAA \
>   -display vnc=localhost:1,id=bbb,display=vga,head=1,name=BBB \
>   -device virtio-vga,max_outputs=2,id=vga,edid_name=true

Looking at this again, I'm thinking that it modelling this the wrong
way around.

On the QEMU side, we have a many<->many relationship between guest
display devices and host / remote display outputs.

If we assume every host / remote display output corresponds to a
separate "window" though, then we can reduce that down to  a
many:one relationship between host outputs and guest devices.

Consider this valid config:

  $ qemu-system-x86_64 \
     -vnc :1 \
     -spice port=5902,disable-ticketing \
     -display gtk \
     -device virtio-vga,max_outputs=2,id=vga

All three display outputs show the same guest display, so which
of VNC, SPICE & GTK would the virtio-vga EDID data take its names
from ?

IMHO, the name is a property of the virtio-vga "output" and the
various display backends should be honouring what that tells them
ie your configuration above should instead be:

   -display vnc=localhost:0,id=aaa,display=vga,head=0 \
   -display vnc=localhost:1,id=bbb,display=vga,head=1 \
   -device '{"driver":"virtio-vga",
             "max_outputs":2,
	     "id":"vga",
	     "outputs":[
	       {
	          "name":"AAA",
	       },
	       {
	          "name":"BBB",
	       },
	     ]}'

..whereupon we have to feed the EDID name from the device back to VNC,
so VNC can tell the client of the head name.

Note, I'm intentionally using JSON syntax for -device here, to illustrate
handling of non-scalar properties.

The set of active outputs can be turned on/off at runtime. We can declare
that the user should give names for every output at startup, upto whatever
they said for "max_outputs". That way a name is available even when non-
primary outputs are later turned on at runtime.

The secondary reason why I think names ought to be handled with -device
is that this is guest visible data, and as a general rule we aim for all
guest visible data to be controlled via properties on the frontend, and
not have the backend directly change what the guest sees.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-11-25 12:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 21:53 [PATCH 0/2] Allow injection of virtio-gpu EDID name Roque Arcudia Hernandez
2024-10-17 21:53 ` [PATCH 1/2] ui: Allow injection of vnc display name Roque Arcudia Hernandez
2024-10-21 11:14   ` Marc-André Lureau
2024-10-21 20:03     ` Andrew Keesler
2024-10-22  7:49       ` Marc-André Lureau
2024-10-22  7:55         ` Daniel P. Berrangé
2024-10-22  7:53     ` Daniel P. Berrangé
2024-10-22  8:04       ` Marc-André Lureau
2024-10-22  8:10         ` Daniel P. Berrangé
2024-10-22  8:36           ` Marc-André Lureau
2024-10-28 19:25             ` Andrew Keesler
2024-11-22 14:40               ` Andrew Keesler
2024-10-22  7:14   ` Daniel P. Berrangé
2024-10-17 21:53 ` [PATCH 2/2] hw/display: Allow injection of virtio-gpu EDID name Roque Arcudia Hernandez
2024-11-25 12:04   ` Daniel P. Berrangé [this message]
2024-11-25 20:54     ` Andrew Keesler
2024-11-26 16:03       ` Daniel P. Berrangé
2024-11-26 21:07         ` Andrew Keesler
2024-12-02 20:31           ` Andrew Keesler
2024-12-05 16:59             ` Daniel P. Berrangé
2024-12-10  9:27               ` Markus Armbruster

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=Z0RnuVKPHO1T2BfV@redhat.com \
    --to=berrange@redhat.com \
    --cc=ankeesler@google.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roqueh@google.com \
    --cc=venture@google.com \
    /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).