]>
git.proxmox.com Git - mirror_qemu.git/blob - python/qemu/__init__.py
3 # Copyright (C) 2015-2016 Red Hat Inc.
4 # Copyright (C) 2012 IBM Corp.
7 # Fam Zheng <famz@redhat.com>
9 # This work is licensed under the terms of the GNU GPL, version 2. See
10 # the COPYING file in the top-level directory.
21 LOG
= logging
.getLogger(__name__
)
23 # Mapping host architecture to any additional architectures it can
24 # support which often includes its 32 bit cousin.
30 def kvm_available(target_arch
=None):
31 host_arch
= os
.uname()[4]
32 if target_arch
and target_arch
!= host_arch
:
33 if target_arch
!= ADDITIONAL_ARCHES
.get(host_arch
):
35 return os
.access("/dev/kvm", os
.R_OK | os
.W_OK
)