all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH qemu-server v3 0/2] qemuserver: fix virtio-gpu not being available on aarch64
@ 2026-07-16 10:43 Kaiyang Wu
  2026-07-16 10:43 ` [PATCH qemu-server v3 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
  2026-07-16 10:43 ` [PATCH qemu-server v3 2/2] qemuserver: make vga model mapping architecture-aware Kaiyang Wu
  0 siblings, 2 replies; 3+ messages in thread
From: Kaiyang Wu @ 2026-07-16 10:43 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

Replace 'virtio-vga-gl' with 'virtio-gpu-gl' to use the correct variant of
virtio-gpu on aarch64, and fix the detection of libGL and libEGL libraries on
non-x86_64 architectures.

Changes v2 -> v3:
- Use 'map_vga_model' subroutine to map VGA models to device names on different
  architectures accordingly (as suggested by Dominik Csapak
  <d.csapak@proxmox.com>)

Changes v1 -> v2:
- Use the host architecture to locate the libraries (as suggested by Dominik
  Csapak <d.csapak@proxmox.com>)
- Replace 'virtio-vga-gl' with 'virtio-gpu-gl' on aarch64 to make virtio-gl
  display option available on aarch64

Kaiyang Wu (2):
  qemuserver: make base path of libGL and libEGL libraries
    architecture-aware
  qemuserver: make vga model mapping architecture-aware

 src/PVE/QemuServer.pm | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

-- 
2.52.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH qemu-server v3 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware
  2026-07-16 10:43 [PATCH qemu-server v3 0/2] qemuserver: fix virtio-gpu not being available on aarch64 Kaiyang Wu
@ 2026-07-16 10:43 ` Kaiyang Wu
  2026-07-16 10:43 ` [PATCH qemu-server v3 2/2] qemuserver: make vga model mapping architecture-aware Kaiyang Wu
  1 sibling, 0 replies; 3+ messages in thread
From: Kaiyang Wu @ 2026-07-16 10:43 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

'print_vga_device' assumed x86_64 library path to look for 'libGL.so.1'
and 'libEGL.so.1', which leads to missing libraries error regardless of
whether 'libgl1' and 'libegl1' were installed or not, on architectures
other than x86_64.

Make base path of the libraries architecture-aware to correctly locate
the libraries on non-x86_64 architectures.

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
---
 src/PVE/QemuServer.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 191ae549..c11351bb 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1540,7 +1540,9 @@ sub print_vga_device {
     }
 
     if ($vga->{type} eq 'virtio-gl') {
-        my $base = '/usr/lib/x86_64-linux-gnu/lib';
+        my $host_arch = get_host_arch();
+        my $base = "/usr/lib/${host_arch}-linux-gnu/lib";
+
         die "missing libraries for '$vga->{type}' detected! Please install 'libgl1' and 'libegl1'\n"
             if !-e "${base}EGL.so.1" || !-e "${base}GL.so.1";
 
-- 
2.52.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH qemu-server v3 2/2] qemuserver: make vga model mapping architecture-aware
  2026-07-16 10:43 [PATCH qemu-server v3 0/2] qemuserver: fix virtio-gpu not being available on aarch64 Kaiyang Wu
  2026-07-16 10:43 ` [PATCH qemu-server v3 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
@ 2026-07-16 10:43 ` Kaiyang Wu
  1 sibling, 0 replies; 3+ messages in thread
From: Kaiyang Wu @ 2026-07-16 10:43 UTC (permalink / raw)
  To: pve-devel; +Cc: Kaiyang Wu

Fix virtio-gpu not being available on aarch64.

QEMU only provides the non-VGA variant of virtio-gpu-gl on aarch64.
Add 'map_vga_model' subroutine to map VGA models to correct device
names on different architectures accordingly, replacing the old 'vga_map'
look up method.

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Kaiyang Wu <wukaiyang@loongfans.cn>
---
 src/PVE/QemuServer.pm | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index c11351bb..e4e15f12 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -1475,21 +1475,29 @@ sub print_netdev_full {
     return $netdev;
 }
 
-my $vga_map = {
-    'cirrus' => 'cirrus-vga',
-    'std' => 'VGA',
-    'vmware' => 'vmware-svga',
-    'virtio' => 'virtio-vga',
-    'virtio-gl' => 'virtio-vga-gl',
-};
+sub map_vga_model {
+    my ($vga_type, $arch) = @_;
+    my $vga_map = {
+        'cirrus' => 'cirrus-vga',
+        'std' => 'VGA',
+        'vmware' => 'vmware-svga',
+    };
+
+    if ($arch eq 'x86_64') {
+        $vga_map->{'virtio'} = 'virtio-vga';
+        $vga_map->{'virtio-gl'} = 'virtio-vga-gl';
+    } elsif ($arch eq 'aarch64') {
+        $vga_map->{'virtio'} = 'virtio-gpu';
+        $vga_map->{'virtio-gl'} = 'virtio-gpu-gl';
+    }
+
+    return $vga_map->{$vga_type};
+}
 
 sub print_vga_device {
     my ($conf, $vga, $arch, $machine_version, $id, $qxlnum, $bridges) = @_;
 
-    my $type = $vga_map->{ $vga->{type} };
-    if ($arch eq 'aarch64' && defined($type) && $type eq 'virtio-vga') {
-        $type = 'virtio-gpu';
-    }
+    my $type = map_vga_model($vga->{type}, $arch);
     my $vgamem_mb = $vga->{memory};
 
     my $max_outputs = '';
-- 
2.52.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-16 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-16 10:43 [PATCH qemu-server v3 0/2] qemuserver: fix virtio-gpu not being available on aarch64 Kaiyang Wu
2026-07-16 10:43 ` [PATCH qemu-server v3 1/2] qemuserver: make base path of libGL and libEGL libraries architecture-aware Kaiyang Wu
2026-07-16 10:43 ` [PATCH qemu-server v3 2/2] qemuserver: make vga model mapping architecture-aware Kaiyang Wu

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal