[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 4/5] python/qemu: accel: Add tcg_available() method
From: |
Wainer dos Santos Moschetta |
Subject: |
[PATCH v4 4/5] python/qemu: accel: Add tcg_available() method |
Date: |
Mon, 16 Dec 2019 16:14:37 -0300 |
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>
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Cleber Rosa <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Cleber Rosa <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 5fce3aa3dd..0b38ddf0ab 100644
--- a/python/qemu/accel.py
+++ b/python/qemu/accel.py
@@ -67,3 +67,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.23.0
- [PATCH v4 0/5] python/qemu: New accel module and improvements, Wainer dos Santos Moschetta, 2019/12/16
- [PATCH v4 1/5] python/qemu: Move kvm_available() to its own module, Wainer dos Santos Moschetta, 2019/12/16
- [PATCH v4 2/5] python/qemu: accel: Add list_accel() method, Wainer dos Santos Moschetta, 2019/12/16
- [PATCH v4 3/5] python/qemu: accel: Strengthen kvm_available() checks, Wainer dos Santos Moschetta, 2019/12/16
- [PATCH v4 4/5] python/qemu: accel: Add tcg_available() method,
Wainer dos Santos Moschetta <=
- [PATCH v4 5/5] python/qemu: Remove unneeded imports in __init__, Wainer dos Santos Moschetta, 2019/12/16
- Re: [PATCH v4 0/5] python/qemu: New accel module and improvements, Cleber Rosa, 2019/12/16