summaryrefslogtreecommitdiffstats
path: root/python/qemu/accel.py
Commit message (Collapse)AuthorAgeFilesLines
* python/qemu: accel: Fix kvm_available() on ppc64leWainer dos Santos Moschetta2020-02-071-1/+2
| | | | | | | | | | | | | | On ppc64le, the accel.kvm_available() check may wrongly return False because the host arch (as returned by os.uname[4]) and the target arch (ppc64) mismatch. In order to solve this it is added an ppc64le -> ppc64 mapping which is used as an fallback verification. Fixes: 53a049d7d78e5ccf6d4c0d7 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200205203250.30526-5-wainersm@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* python/qemu: accel: Add tcg_available() methodWainer dos Santos Moschetta2019-12-171-0/+8
| | | | | | | | | | | | | This adds a method to check if the tcg accelerator is enabled in the QEMU binary. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20191216191438.93418-5-wainersm@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
* python/qemu: accel: Strengthen kvm_available() checksWainer dos Santos Moschetta2019-12-171-6/+21
| | | | | | | | | | | | | | | Currently kvm_available() checks for the presence of kvm module and, if target and host arches don't mismatch. This patch adds an 3rd checking: if QEMU binary was compiled with kvm support. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20191216191438.93418-4-wainersm@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
* python/qemu: accel: Add list_accel() methodWainer dos Santos Moschetta2019-12-171-0/+23
| | | | | | | | | | | | Since commit cbe6d6365a48 the command `qemu -accel help` returns the list of accelerators enabled in the QEMU binary. This adds the list_accel() method which return that same list. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20191216191438.93418-3-wainersm@redhat.com> Reviewed-by: Cleber Rosa <crosa@redhat.com> Tested-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>
* python/qemu: Move kvm_available() to its own moduleWainer dos Santos Moschetta2019-12-171-0/+31
This creates the 'accel' Python module to be the home for utilities that deal with accelerators. Also moved kvm_available() from __init__.py to this new module. Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191216191438.93418-2-wainersm@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com>