[lxc-devel] [lxd/master] VM: Only enable GPU vga mode on x86_64 systems
tomponline on Github
lxc-bot at linuxcontainers.org
Wed Jun 17 13:03:55 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200617/9896648e/attachment.bin>
-------------- next part --------------
From 476842edecf769aeb99a3711c49ccca0dd73cf9a Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Wed, 17 Jun 2020 14:03:11 +0100
Subject: [PATCH] lxd/instance/drivers/driver/qemu: Only enable GPU vga mode on
x86_64 systems
Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
lxd/instance/drivers/driver_qemu.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lxd/instance/drivers/driver_qemu.go b/lxd/instance/drivers/driver_qemu.go
index 8721ea9e89..dc7c9bbace 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -2061,8 +2061,8 @@ 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"))
+ // Pass-through VGA mode if enabled on the host device and architecture is x86_64.
+ vgaMode := shared.PathExists(filepath.Join("/sys/bus/pci/devices", pciSlotName, "boot_vga")) && vm.architecture == osarch.ARCH_64BIT_INTEL_X86
devBus, devAddr, multi := bus.allocate(fmt.Sprintf("lxd_%s", devName))
tplFields := map[string]interface{}{
More information about the lxc-devel
mailing list