mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
devices: video: Simplify model hvm check
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
534f2e03d0
commit
651e5b6d75
@ -27,6 +27,8 @@ class DeviceVideo(Device):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_model(guest):
|
def default_model(guest):
|
||||||
|
if not guest.os.is_hvm():
|
||||||
|
return None
|
||||||
if guest.os.is_pseries():
|
if guest.os.is_pseries():
|
||||||
return "vga"
|
return "vga"
|
||||||
if guest.os.is_arm_machvirt() or guest.os.is_riscv_virt():
|
if guest.os.is_arm_machvirt() or guest.os.is_riscv_virt():
|
||||||
@ -37,11 +39,9 @@ class DeviceVideo(Device):
|
|||||||
if guest.has_gl():
|
if guest.has_gl():
|
||||||
return "virtio"
|
return "virtio"
|
||||||
return "qxl"
|
return "qxl"
|
||||||
if guest.os.is_hvm():
|
if guest.conn.is_qemu():
|
||||||
if guest.conn.is_qemu():
|
return "qxl"
|
||||||
return "qxl"
|
return "vga"
|
||||||
return "vga"
|
|
||||||
return None
|
|
||||||
|
|
||||||
def set_defaults(self, guest):
|
def set_defaults(self, guest):
|
||||||
if not self.model:
|
if not self.model:
|
||||||
|
Loading…
Reference in New Issue
Block a user