提交 0fdf6496 编写于 作者: L Laine Stump 提交者: Daniel Veillard

Add flags to indicate presence of timekeeping-related qemu options

* src/qemu/qemu_conf.h: define 4 new flags
* src/qemu/qemu_conf.c: check the help text of qemu for presence of
                        features indicated by each flag.
* tests/qemuhelptest.c: add appropriate flags into the masks for each test
上级 188af565
......@@ -1160,6 +1160,16 @@ static unsigned long long qemudComputeCmdFlags(const char *help,
/* The trailing ' ' is important to avoid a bogus match */
if (strstr(help, "-rtc "))
flags |= QEMUD_CMD_FLAG_RTC;
/* to wit */
if (strstr(help, "-rtc-td-hack"))
flags |= QEMUD_CMD_FLAG_RTC_TD_HACK;
if (strstr(help, "-no-hpet"))
flags |= QEMUD_CMD_FLAG_NO_HPET;
if (strstr(help, "-no-kvm-pit-reinjection"))
flags |= QEMUD_CMD_FLAG_NO_KVM_PIT;
if (strstr(help, "-tdf"))
flags |= QEMUD_CMD_FLAG_TDF;
/* Keep disabled till we're actually ready to turn on netdev mode
* The plan is todo it in 0.13.0 QEMU, but lets wait & see... */
#if 0
......
......@@ -84,6 +84,10 @@ enum qemud_cmd_flags {
QEMUD_CMD_FLAG_NETDEV = (1 << 29), /* The -netdev flag & netdev_add/remove monitor commands */
QEMUD_CMD_FLAG_RTC = (1 << 30), /* The -rtc flag for clock options */
QEMUD_CMD_FLAG_VNET_HOST = (1 << 31), /* vnet-host support is available in qemu */
QEMUD_CMD_FLAG_RTC_TD_HACK = (1LL << 32), /* -rtd-td-hack available */
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) */
};
/* Main driver state */
......
......@@ -126,7 +126,8 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO |
QEMUD_CMD_FLAG_KVM |
QEMUD_CMD_FLAG_DRIVE_FORMAT |
QEMUD_CMD_FLAG_MEM_PATH,
QEMUD_CMD_FLAG_MEM_PATH |
QEMUD_CMD_FLAG_TDF,
9001, 1, 74);
DO_TEST("qemu-0.10.5",
QEMUD_CMD_FLAG_KQEMU |
......@@ -143,7 +144,9 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_VGA |
QEMUD_CMD_FLAG_0_10 |
QEMUD_CMD_FLAG_ENABLE_KVM |
QEMUD_CMD_FLAG_SDL,
QEMUD_CMD_FLAG_SDL |
QEMUD_CMD_FLAG_RTC_TD_HACK |
QEMUD_CMD_FLAG_NO_HPET,
10005, 0, 0);
DO_TEST("qemu-kvm-0.10.5",
QEMUD_CMD_FLAG_VNC_COLON |
......@@ -163,7 +166,11 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_0_10 |
QEMUD_CMD_FLAG_PCIDEVICE |
QEMUD_CMD_FLAG_MEM_PATH |
QEMUD_CMD_FLAG_SDL,
QEMUD_CMD_FLAG_SDL |
QEMUD_CMD_FLAG_RTC_TD_HACK |
QEMUD_CMD_FLAG_NO_HPET |
QEMUD_CMD_FLAG_NO_KVM_PIT |
QEMUD_CMD_FLAG_TDF,
10005, 1, 0);
DO_TEST("kvm-86",
QEMUD_CMD_FLAG_VNC_COLON |
......@@ -182,7 +189,11 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_VGA |
QEMUD_CMD_FLAG_0_10 |
QEMUD_CMD_FLAG_PCIDEVICE |
QEMUD_CMD_FLAG_SDL,
QEMUD_CMD_FLAG_SDL |
QEMUD_CMD_FLAG_RTC_TD_HACK |
QEMUD_CMD_FLAG_NO_HPET |
QEMUD_CMD_FLAG_NO_KVM_PIT |
QEMUD_CMD_FLAG_TDF,
10050, 1, 0);
DO_TEST("qemu-kvm-0.11.0-rc2",
QEMUD_CMD_FLAG_VNC_COLON |
......@@ -204,7 +215,11 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_MEM_PATH |
QEMUD_CMD_FLAG_ENABLE_KVM |
QEMUD_CMD_FLAG_BALLOON |
QEMUD_CMD_FLAG_SDL,
QEMUD_CMD_FLAG_SDL |
QEMUD_CMD_FLAG_RTC_TD_HACK |
QEMUD_CMD_FLAG_NO_HPET |
QEMUD_CMD_FLAG_NO_KVM_PIT |
QEMUD_CMD_FLAG_TDF,
10092, 1, 0);
DO_TEST("qemu-0.12.1",
QEMUD_CMD_FLAG_VNC_COLON |
......@@ -227,7 +242,8 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_BALLOON |
QEMUD_CMD_FLAG_DEVICE |
QEMUD_CMD_FLAG_SMP_TOPOLOGY |
QEMUD_CMD_FLAG_RTC,
QEMUD_CMD_FLAG_RTC |
QEMUD_CMD_FLAG_NO_HPET,
12001, 0, 0);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册