[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/4] python/qemu: accel: Add tcg_available() method
From: |
Wainer dos Santos Moschetta |
Subject: |
[PATCH 4/4] python/qemu: accel: Add tcg_available() method |
Date: |
Fri, 15 Nov 2019 13:08:29 -0500 |
This adds a method to check if the tcg accelerator is enabled
in the QEMU binary.
Signed-off-by: Wainer dos Santos Moschetta <address@hidden>
---
python/qemu/accel.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/python/qemu/accel.py b/python/qemu/accel.py
index 1978fbee4e..513904d46d 100644
--- a/python/qemu/accel.py
+++ b/python/qemu/accel.py
@@ -69,3 +69,11 @@ def kvm_available(target_arch=None, qemu_bin=None):
if qemu_bin and "kvm" not in list_accel(qemu_bin):
return False
return True
+
+def tcg_available(qemu_bin):
+ """
+ Check if TCG is available.
+
+ @param qemu_bin (str): path to the QEMU binary
+ """
+ return 'tcg' in list_accel(qemu_bin)
--
2.18.1