mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 23:49:36 +00:00
tests/vm: Extract the kvm_available() handy function
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20181013004034.6968-2-f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
This commit is contained in:
committed by
Fam Zheng
parent
1578466c9a
commit
b59b82eded
@ -26,6 +26,10 @@ import tempfile
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def kvm_available(target_arch=None):
|
||||
return os.access("/dev/kvm", os.R_OK | os.W_OK)
|
||||
|
||||
|
||||
#: Maps machine types to the preferred console device types
|
||||
CONSOLE_DEV_TYPES = {
|
||||
r'^clipper$': 'isa-serial',
|
||||
|
Reference in New Issue
Block a user