From 6d1e16a3edfc0a1bb5409627779158350dc4a599 Mon Sep 17 00:00:00 2001
From: yangchenguang <yangchenguang@kylinsec.com.cn>
Date: Thu, 13 Apr 2023 10:07:44 +0800
Subject: [PATCH] Add loongarch support

Signed-off-by: yangchenguang <yangchenguang@kylinsec.com.cn>
---
 virtManager/create.py | 1 +
 virtinst/domain/os.py | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/virtManager/create.py b/virtManager/create.py
index e7ddd0c..2c72b5b 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -428,6 +428,7 @@ class vmmCreate(vmmGObjectUI):
         installable_arch = bool(guest.os.is_x86() or
                 guest.os.is_ppc64() or
                 guest.os.is_sw_64() or
+                guest.os.is_loongarch() or
                 guest.os.is_s390x())
 
         if guest.prefers_uefi():
diff --git a/virtinst/domain/os.py b/virtinst/domain/os.py
index fdcaa19..95427f2 100644
--- a/virtinst/domain/os.py
+++ b/virtinst/domain/os.py
@@ -48,6 +48,8 @@ class DomainOs(XMLBuilder):
         return self.arch == "aarch64"
     def is_sw_64(self):
         return self.arch == "sw_64"
+    def is_sw_64(self):
+        return self.arch == "loongarch64"
     def is_arm(self):
         return self.is_arm32() or self.is_arm64()
     def is_arm_vexpress(self):
-- 
2.33.0

