diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 9909c928cd..0c1a55a4c9 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -288,7 +288,7 @@ def testimage_main(d):
     boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT"))
 
     # Get use_kvm
-    kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
+    kvm = oe.qemu.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
 
     # Get OVMF
     ovmf = d.getVar("QEMU_USE_OVMF")
diff --git a/meta/lib/oe/qemu.py b/meta/lib/oe/qemu.py
index 769865036c..abe2745b10 100644
--- a/meta/lib/oe/qemu.py
+++ b/meta/lib/oe/qemu.py
@@ -52,3 +52,27 @@ def qemu_run_binary(d, rootfs_path, binary):
     base_libdir = rootfs_path + d.getVar("base_libdir", False)
 
     return qemu_wrapper_cmdline(d, rootfs_path, [libdir, base_libdir]) + rootfs_path + binary
+
+def is_x86(arch):
+    """
+    Check whether ``arch`` is ``x86`` or ``x86_64``, return ``True`` if it is,
+    ``False`` otherwise.
+    """
+    if arch.startswith('x86_') or re.match('i.*86', arch):
+        return True
+    else:
+        return False
+
+def qemu_use_kvm(kvm, target_arch):
+    """
+    Enable kvm if target_arch == build_arch or both of them are x86 archs.
+    """
+
+    use_kvm = False
+    if kvm and boolean(kvm):
+        build_arch = os.uname()[4]
+        if is_x86(build_arch) and is_x86(target_arch):
+            use_kvm = True
+        elif build_arch == target_arch:
+            use_kvm = True
+    return use_kvm
diff --git a/meta/lib/oe/types.py b/meta/lib/oe/types.py
index b929afb1f3..c4b338921b 100644
--- a/meta/lib/oe/types.py
+++ b/meta/lib/oe/types.py
@@ -163,26 +163,3 @@ def path(value, relativeto='', normalize='true', mustexist='false'):
                 raise ValueError("{0}: {1}".format(value, os.strerror(errno.ENOENT)))
 
     return value
-
-def is_x86(arch):
-    """
-    Check whether arch is x86 or x86_64
-    """
-    if arch.startswith('x86_') or re.match('i.*86', arch):
-        return True
-    else:
-        return False
-
-def qemu_use_kvm(kvm, target_arch):
-    """
-    Enable kvm if target_arch == build_arch or both of them are x86 archs.
-    """
-
-    use_kvm = False
-    if kvm and boolean(kvm):
-        build_arch = os.uname()[4]
-        if is_x86(build_arch) and is_x86(target_arch):
-            use_kvm = True
-        elif build_arch == target_arch:
-            use_kvm = True
-    return use_kvm
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py
index fcfcdaf7e4..0899d57c0b 100644
--- a/meta/lib/oeqa/selftest/cases/efibootpartition.py
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -17,7 +17,7 @@ class GenericEFITest(OESelftestTestCase):
         image = "core-image-minimal"
         runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', image) or ""
         cmd = "runqemu %s nographic serial wic ovmf" % (runqemu_params)
-        if oe.types.qemu_use_kvm(self.td.get('QEMU_USE_KVM', 0), self.td["TARGET_ARCH"]):
+        if oe.qemu.qemu_use_kvm(self.td.get('QEMU_USE_KVM', 0), self.td["TARGET_ARCH"]):
             cmd += " kvm"
 
         self.write_config("""
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index bfa76812ae..bdd5ae1bc3 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -34,7 +34,7 @@ class RunqemuTests(OESelftestTestCase):
             self.fstypes += " wic.vmdk wic.qcow2 wic.vdi wic.zst"
 
         self.cmd_common = "runqemu nographic snapshot"
-        kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"])
+        kvm = oe.qemu.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), self.td["TARGET_ARCH"])
         if kvm:
             self.cmd_common += " kvm"
 
diff --git a/meta/lib/oeqa/selftest/cases/uki.py b/meta/lib/oeqa/selftest/cases/uki.py
index fc31fb767a..6283df540a 100644
--- a/meta/lib/oeqa/selftest/cases/uki.py
+++ b/meta/lib/oeqa/selftest/cases/uki.py
@@ -21,7 +21,7 @@ class UkiTest(OESelftestTestCase):
         image = "core-image-minimal"
         runqemu_params = get_bb_var('TEST_RUNQEMUPARAMS', image) or ""
         cmd = "runqemu %s nographic serial wic ovmf" % (runqemu_params)
-        if oe.types.qemu_use_kvm(self.td.get('QEMU_USE_KVM', 0), self.td["TARGET_ARCH"]):
+        if oe.qemu.qemu_use_kvm(self.td.get('QEMU_USE_KVM', 0), self.td["TARGET_ARCH"]):
             cmd += " kvm"
 
         self.write_config("""
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 1deea2e5ce..23b26bc2b5 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -108,7 +108,7 @@ class QemuTarget(BaseTarget):
         dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
         if not dump_dir:
             dump_dir = os.path.join(d.getVar('LOG_DIR'), 'runtime-hostdump')
-        use_kvm = oe.types.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
+        use_kvm = oe.qemu.qemu_use_kvm(d.getVar('QEMU_USE_KVM'), d.getVar('TARGET_ARCH'))
 
         # Log QemuRunner log output to a file
         import oe.path
