From: Matthias Dahl <mdvirt@xxxxxxxxxxxxxxxxx> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> --- I'm still not sure why this code includes "default" in its list of enum options, as the XML does not allow it. But since that was copying from other elements, like qemuDiskCacheV2, which also have a "default" listing not present in XML... src/qemu/qemu_conf.c | 10 +++++++++- src/qemu/qemu_conf.h | 1 + tests/qemuhelptest.c | 6 ++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 5fa8c0a..9f84988 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1,7 +1,7 @@ /* * qemu_conf.c: QEMU configuration management * - * Copyright (C) 2006, 2007, 2008, 2009, 2010 Red Hat, Inc. + * Copyright (C) 2006-2010 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -85,6 +85,12 @@ VIR_ENUM_IMPL(qemuDiskCacheV2, VIR_DOMAIN_DISK_CACHE_LAST, "writethrough", "writeback"); +VIR_ENUM_DECL(qemuDiskAIO) +VIR_ENUM_IMPL(qemuDiskAIO, VIR_DOMAIN_DISK_AIO_LAST, + "default", + "native", + "threads"); + VIR_ENUM_DECL(qemuVideo) VIR_ENUM_IMPL(qemuVideo, VIR_DOMAIN_VIDEO_TYPE_LAST, @@ -1150,6 +1156,8 @@ static unsigned long long qemudComputeCmdFlags(const char *help, flags |= QEMUD_CMD_FLAG_DRIVE_CACHE_V2; if (strstr(help, "format=")) flags |= QEMUD_CMD_FLAG_DRIVE_FORMAT; + if (strstr(help, "aio=threads|native")) + flags |= QEMUD_CMD_FLAG_DRIVE_AIO; } if (strstr(help, "-vga") && !strstr(help, "-std-vga")) flags |= QEMUD_CMD_FLAG_VGA; diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index a101e47..44043b4 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -88,6 +88,7 @@ enum qemud_cmd_flags { QEMUD_CMD_FLAG_NO_HPET = (1LL << 33), /* -no-hpet flag is supported */ QEMUD_CMD_FLAG_NO_KVM_PIT = (1LL << 34), /* -no-kvm-pit-reinjection supported */ QEMUD_CMD_FLAG_TDF = (1LL << 35), /* -tdf flag (user-mode pit catchup) */ + QEMUD_CMD_FLAG_DRIVE_AIO = (1LL << 36), /* -drive aio= supported */ }; /* Main driver state */ diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c index 517a8fe..a00c743 100644 --- a/tests/qemuhelptest.c +++ b/tests/qemuhelptest.c @@ -244,7 +244,8 @@ mymain(int argc, char **argv) QEMUD_CMD_FLAG_DEVICE | QEMUD_CMD_FLAG_SMP_TOPOLOGY | QEMUD_CMD_FLAG_RTC | - QEMUD_CMD_FLAG_NO_HPET, + QEMUD_CMD_FLAG_NO_HPET | + QEMUD_CMD_FLAG_DRIVE_AIO, 12001, 0, 0); DO_TEST("qemu-kvm-0.12.3", QEMUD_CMD_FLAG_VNC_COLON | @@ -274,7 +275,8 @@ mymain(int argc, char **argv) QEMUD_CMD_FLAG_VNET_HOST | QEMUD_CMD_FLAG_NO_HPET | QEMUD_CMD_FLAG_NO_KVM_PIT | - QEMUD_CMD_FLAG_TDF, + QEMUD_CMD_FLAG_TDF | + QEMUD_CMD_FLAG_DRIVE_AIO, 12003, 1, 0); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; -- 1.7.0.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list