virt-manager/651e5b6d-devices-video-Simplify-model-hvm-check.patch

36 lines
1.1 KiB
Diff
Raw Normal View History

Subject: devices: video: Simplify model hvm check
From: Cole Robinson crobinso@redhat.com Thu Oct 3 15:41:44 2019 -0400
Date: Thu Oct 3 15:41:44 2019 -0400:
Git: 651e5b6d753930a2e7536efa4e6d20f57b038e80
Signed-off-by: Cole Robinson <crobinso@redhat.com>
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
index 3d8ab939..3ebc561f 100644
--- a/virtinst/devices/video.py
+++ b/virtinst/devices/video.py
@@ -27,6 +27,8 @@ class DeviceVideo(Device):
@staticmethod
def default_model(guest):
+ if not guest.os.is_hvm():
+ return None
if guest.os.is_pseries():
return "vga"
if guest.os.is_arm_machvirt() or guest.os.is_riscv_virt():
@@ -37,11 +39,9 @@ class DeviceVideo(Device):
if guest.has_gl():
return "virtio"
return "qxl"
- if guest.os.is_hvm():
- if guest.conn.is_qemu():
- return "qxl"
- return "vga"
- return None
+ if guest.conn.is_qemu():
+ return "qxl"
+ return "vga"
def set_defaults(self, guest):
if not self.model: