[virt-tools-list] [virt-manager PATCH 3/9] os: Add RISC-V support

Andrea Bolognani abologna at redhat.com
Thu Apr 4 10:49:44 UTC 2019


Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 virtinst/domain/os.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/virtinst/domain/os.py b/virtinst/domain/os.py
index 32343ab6..eae7f71f 100644
--- a/virtinst/domain/os.py
+++ b/virtinst/domain/os.py
@@ -61,6 +61,11 @@ class DomainOs(XMLBuilder):
     def is_s390x(self):
         return self.arch == "s390x"
 
+    def is_riscv(self):
+        return self.arch == "riscv64" or self.arch == "riscv32"
+    def is_riscv_virt(self):
+        return self.is_riscv() and str(self.machine).startswith("virt")
+
     XML_NAME = "os"
     _XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
                        "nvram", "nvram_template", "kernel", "initrd",
-- 
2.20.1




More information about the virt-tools-list mailing list