public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Markus Frank <m.frank@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server v1 1/2] virtio-vga-gl: add Vulkan (venus) support
Date: Mon, 10 Nov 2025 15:27:41 +0100	[thread overview]
Message-ID: <848ad76f-dca6-4944-a309-2e18c77553c3@proxmox.com> (raw)
In-Reply-To: <20251110114032.125526-2-m.frank@proxmox.com>

Am 10.11.25 um 12:40 schrieb Markus Frank:
> The venus protocol facilitates the translation of Vulkan API calls via
> the virglrenderer. To use it, the virgl-server package must be installed
> on the host.
> 
> The Vulkan option is represented by an enum with values such as
> 'venus-512' and 'venus-1024'. This is to allow for the potential
> addition of another Vulkan implementation in the future. The number
> indicates the memory window in MiB for Venus.

Meh, if it provides no obvious benefit I'm not sure if this makes sense
to add now already.

I'd also mention more prominently that this only works for the virtio-gl
type, at least in the commit message and probably also in the description
of the vulkan "flag".
Is this strongly limited to that display type? And are there errors
generated with others combination that block the start?
Asking mostly to see if it would be an option to just generate a log_warn
about a useless combination of display and venus that then shows up in the
start task in such a case.

And is it likely that there might be another protocol that relays vulkan?

Mostly asking this key questions to better judge the design/approach you
chose.

> 
> Signed-off-by: Markus Frank <m.frank@proxmox.com>
> ---
>  src/PVE/QemuServer.pm | 20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index cf195ccc..2b358e9f 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -160,6 +160,12 @@ my $vga_fmt = {
>              qw(cirrus qxl qxl2 qxl3 qxl4 none serial0 serial1 serial2 serial3 std virtio virtio-gl vmware)
>          ],
>      },
> +    vulkan => {
> +        description => 'Enable vulkan by using the venus protocol.',
> +        type => 'string',
> +        enum => ['venus-512', 'venus-1024', 'venus-2048', 'venus-4096', 'venus-8192'],
> +        optional => 1,
> +    },
>      memory => {
>          description => "Sets the VGA memory (in MiB). Has no effect with serial display.",
>          type => 'integer',
> @@ -1499,6 +1505,15 @@ sub print_vga_device {
>          $pciaddr = print_pci_addr($vgaid, $bridges, $arch);
>      }
>  
> +    my $venus = "";
> +    if ($vga->{vulkan} && $vga->{vulkan} =~ /^venus-(\d+)/) {
> +        my $virgl_memory_window = $1;
> +        $venus = ",hostmem=${virgl_memory_window}M,venus=on,blob=on";
> +
> +        die "You need to use virtio-gl to enable vulkan (venus) support!\n"
> +            if $vga->{type} !~ /^virtio-gl/;
> +    }
> +
>      if ($vga->{type} eq 'virtio-gl') {
>          my $base = '/usr/lib/x86_64-linux-gnu/lib';
>          die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
> @@ -1507,9 +1522,12 @@ sub print_vga_device {
>          die
>              "no DRM render node detected (/dev/dri/renderD*), no GPU? - needed for '$vga->{type}' display\n"
>              if !PVE::Tools::dir_glob_regex('/dev/dri/', "renderD.*");
> +
> +        die "missing virgl render server for vulkan (venus)! Please install 'virgl-server'.\n"
> +            if $vga->{vulkan} && !-e "/usr/libexec/virgl_render_server";
>      }
>  
> -    return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}";
> +    return "$type,id=${vgaid}${memory}${max_outputs}${pciaddr}${edidoff}${venus}";
>  }
>  
>  sub vm_is_volid_owner {



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-11-10 14:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 11:25 [pve-devel] [PATCH qemu-server/pve-manager v1 0/2] add virtio-vga-gl " Markus Frank
2025-11-10 11:25 ` [pve-devel] [PATCH qemu-server v1 1/2] virtio-vga-gl: add " Markus Frank
2025-11-10 14:27   ` Thomas Lamprecht [this message]
2025-11-11 11:06     ` Markus Frank
2025-11-10 11:25 ` [pve-devel] [PATCH pve-manager v1 2/2] ui: qemu: add Vulkan option in DisplayEdit Markus Frank
2025-11-10 14:30   ` Thomas Lamprecht
2025-11-10 13:54 ` [pve-devel] [PATCH qemu-server/pve-manager v1 0/2] add virtio-vga-gl Vulkan (venus) support Thomas Lamprecht
2025-11-10 15:30   ` Markus Frank
2025-11-13 15:13 ` Dominik Csapak
2025-11-13 16:21   ` Thomas Lamprecht

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=848ad76f-dca6-4944-a309-2e18c77553c3@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=m.frank@proxmox.com \
    --cc=pve-devel@lists.proxmox.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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal