51aa9d127d
python/qemu: accel: Fix kvm_available() on ppc64le
...
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: 53a049d7d7
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 >
2020-02-07 15:12:48 +01:00
d3ca7bb599
python/qemu: accel: Add tcg_available() method
...
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 >
2019-12-16 18:39:04 -05:00
53a049d7d7
python/qemu: accel: Strengthen kvm_available() checks
...
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 >
2019-12-16 18:35:09 -05:00
1650c3e304
python/qemu: accel: Add list_accel() method
...
Since commit cbe6d6365a
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 >
2019-12-16 18:31:32 -05:00
8b272e0018
python/qemu: Move kvm_available() to its own module
...
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 >
2019-12-16 18:24:02 -05:00