Blame SOURCES/virt-manager-devices-video-Simplify-model-hvm-check.patch

36f1ba
From 5ba6467d88383edcdb940949d98f6f212ad3739d Mon Sep 17 00:00:00 2001
36f1ba
Message-Id: <5ba6467d88383edcdb940949d98f6f212ad3739d@dist-git>
36f1ba
From: Pavel Hrdina <phrdina@redhat.com>
36f1ba
Date: Thu, 3 Oct 2019 15:41:44 -0400
36f1ba
Subject: [PATCH] devices: video: Simplify model hvm check
36f1ba
36f1ba
From: Cole Robinson <crobinso@redhat.com>
36f1ba
36f1ba
Signed-off-by: Cole Robinson <crobinso@redhat.com>
36f1ba
(cherry picked from commit 651e5b6d753930a2e7536efa4e6d20f57b038e80)
36f1ba
36f1ba
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1753644
36f1ba
36f1ba
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
36f1ba
---
36f1ba
 virtinst/devices/video.py | 10 +++++-----
36f1ba
 1 file changed, 5 insertions(+), 5 deletions(-)
36f1ba
36f1ba
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
36f1ba
index 3d8ab939..3ebc561f 100644
36f1ba
--- a/virtinst/devices/video.py
36f1ba
+++ b/virtinst/devices/video.py
36f1ba
@@ -27,6 +27,8 @@ class DeviceVideo(Device):
36f1ba
 
36f1ba
     @staticmethod
36f1ba
     def default_model(guest):
36f1ba
+        if not guest.os.is_hvm():
36f1ba
+            return None
36f1ba
         if guest.os.is_pseries():
36f1ba
             return "vga"
36f1ba
         if guest.os.is_arm_machvirt() or guest.os.is_riscv_virt():
36f1ba
@@ -37,11 +39,9 @@ class DeviceVideo(Device):
36f1ba
             if guest.has_gl():
36f1ba
                 return "virtio"
36f1ba
             return "qxl"
36f1ba
-        if guest.os.is_hvm():
36f1ba
-            if guest.conn.is_qemu():
36f1ba
-                return "qxl"
36f1ba
-            return "vga"
36f1ba
-        return None
36f1ba
+        if guest.conn.is_qemu():
36f1ba
+            return "qxl"
36f1ba
+        return "vga"
36f1ba
 
36f1ba
     def set_defaults(self, guest):
36f1ba
         if not self.model:
36f1ba
-- 
36f1ba
2.23.0
36f1ba