diff mbox series

[v4,4/8] python/qemu: accel: Fix kvm_available() on ppc64le

Message ID 20200205203250.30526-5-wainersm@redhat.com (mailing list archive)
State New, archived
Headers show
Series Acceptance tests: boot Linux with KVM test | expand

Commit Message

Wainer dos Santos Moschetta Feb. 5, 2020, 8:32 p.m. UTC
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>
---
 python/qemu/accel.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Feb. 6, 2020, 3:43 p.m. UTC | #1
On 2/5/20 9:32 PM, Wainer dos Santos Moschetta wrote:
> 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>
> ---
>   python/qemu/accel.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/python/qemu/accel.py b/python/qemu/accel.py
> index 0b38ddf0ab..36ae85791e 100644
> --- a/python/qemu/accel.py
> +++ b/python/qemu/accel.py
> @@ -24,7 +24,8 @@ LOG = logging.getLogger(__name__)
>   # support which often includes its 32 bit cousin.
>   ADDITIONAL_ARCHES = {
>       "x86_64" : "i386",
> -    "aarch64" : "armhf"
> +    "aarch64" : "armhf",
> +    "ppc64le" : "ppc64",
>   }
>   
>   def list_accel(qemu_bin):
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

And applied to my python-next tree:
https://gitlab.com/philmd/qemu/commits/python-next
diff mbox series

Patch

diff --git a/python/qemu/accel.py b/python/qemu/accel.py
index 0b38ddf0ab..36ae85791e 100644
--- a/python/qemu/accel.py
+++ b/python/qemu/accel.py
@@ -24,7 +24,8 @@  LOG = logging.getLogger(__name__)
 # support which often includes its 32 bit cousin.
 ADDITIONAL_ARCHES = {
     "x86_64" : "i386",
-    "aarch64" : "armhf"
+    "aarch64" : "armhf",
+    "ppc64le" : "ppc64",
 }
 
 def list_accel(qemu_bin):