--- hyperv.c | 16 ++++++++++++++++ hyperv.h | 2 ++ qemu-config.c | 19 +++++++++++++++++++ qemu-config.h | 1 + 4 files changed, 38 insertions(+), 0 deletions(-) diff --git a/hyperv.c b/hyperv.c index 968ce89..a17f879 100644 --- a/hyperv.c +++ b/hyperv.c @@ -1,3 +1,19 @@ #include "hyperv.h" #include "qemu-common.h" +#include "qemu-option.h" +#include "qemu-config.h" +void hyperv_init(void) +{ + QemuOpts *opts = QTAILQ_FIRST(&qemu_hyperv_opts.head); + + if (!opts) { + return; + } +} + +static void hyperv_initialize(void) +{ + hyperv_init(); +} +device_init(hyperv_initialize); diff --git a/hyperv.h b/hyperv.h index a15ba90..eaf974a 100644 --- a/hyperv.h +++ b/hyperv.h @@ -6,5 +6,7 @@ #include <asm/hyperv.h> +void hyperv_init(void); + #endif /* QEMU_HW_HYPERV_H */ diff --git a/qemu-config.c b/qemu-config.c index acab438..a1f9689 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -512,6 +512,24 @@ QemuOptsList qemu_boot_opts = { }, }; +QemuOptsList qemu_hyperv_opts = { + .name = "hyperv", + .head = QTAILQ_HEAD_INITIALIZER(qemu_hyperv_opts.head), + .desc = { + { + .name = "vapic", + .type = QEMU_OPT_BOOL, + }, { + .name = "wd", + .type = QEMU_OPT_BOOL, + }, { + .name = "spinlock", + .type = QEMU_OPT_NUMBER, + }, + { /* end of list */ } + }, +}; + static QemuOptsList *vm_config_groups[32] = { &qemu_drive_opts, &qemu_chardev_opts, @@ -526,6 +544,7 @@ static QemuOptsList *vm_config_groups[32] = { &qemu_option_rom_opts, &qemu_machine_opts, &qemu_boot_opts, + &qemu_hyperv_opts, NULL, }; diff --git a/qemu-config.h b/qemu-config.h index 20d707f..c7d57d4 100644 --- a/qemu-config.h +++ b/qemu-config.h @@ -4,6 +4,7 @@ extern QemuOptsList qemu_fsdev_opts; extern QemuOptsList qemu_virtfs_opts; extern QemuOptsList qemu_spice_opts; +extern QemuOptsList qemu_hyperv_opts; QemuOptsList *qemu_find_opts(const char *group); void qemu_add_opts(QemuOptsList *list); -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html