The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7533

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From e03b568c88b96247325c65b57fbe5368debfc5b6 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Mon, 15 Jun 2020 14:15:54 +0100
Subject: [PATCH] lxd/instance/drivers/driver/qemu: Pass-through GPU VGA mode
 status from host

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_qemu.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 785c927c1c..8721ea9e89 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -2061,6 +2061,9 @@ func (vm *qemu) addGPUDevConfig(sb *strings.Builder, bus 
*qemuBus, gpuConfig []d
                }
        }
 
+       // Pass-through VGA mode if enabled on the host device.
+       vgaMode := shared.PathExists(filepath.Join("/sys/bus/pci/devices", 
pciSlotName, "boot_vga"))
+
        devBus, devAddr, multi := bus.allocate(fmt.Sprintf("lxd_%s", devName))
        tplFields := map[string]interface{}{
                "bus":           bus.name,
@@ -2070,7 +2073,7 @@ func (vm *qemu) addGPUDevConfig(sb *strings.Builder, bus 
*qemuBus, gpuConfig []d
 
                "devName":     devName,
                "pciSlotName": pciSlotName,
-               "vga":         true,
+               "vga":         vgaMode,
        }
 
        // Add main GPU device in VGA mode to qemu config.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to