add --accel option
PATCH 1/1 add --accel option
Since libvirt dudes seem to prefer it, add a --accel option. For now, it only does the same as --enable-kvm, but it can easily be extended in the future.
--- qemu-options.hx | 7 +++++++ vl.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletions(-)
qemu-options.hx +7 -0
@@ -1429,6 +1429,13 @@ Enable KQEMU kernel module usage. KQEMU options are only available if KQEMU support is enabled when compiling. ETEXI +DEF("accel", HAS_ARG, QEMU_OPTION_accel, \ + "-accel name enable a given accelerator module\n") +STEXI +@item -accel @var{name} +Enable a given accelerator module, for instance, KVM. +ETEXI + #ifdef CONFIG_KVM DEF("enable-kvm", 0, QEMU_OPTION_enable_kvm, \ "-enable-kvm enable KVM full virtualization support\n")
vl.c +6 -1
@@ -3091,7 +3091,6 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)while (ram_save_block (f) !=0 ) { bytes_transferred +=TARGET_PAGE_SIZE ; } -cpu_physical_memory_set_dirty_tracking (0 ); }qemu_put_be64 (f,RAM_SAVE_FLAG_EOS );
@@ -5431,6 +5430,12 @@ int main(int argc, char **argv, char **envp) kqemu_allowed =2 ;break ;#endif +case QEMU_OPTION_accel: +if (strstart (optarg,"kvm" ,NULL )) { + kvm_allowed =1 ; + kqemu_allowed =0 ; + } +break ;#ifdef CONFIG_KVM case QEMU_OPTION_enable_kvm: kvm_allowed =1 ;
Signature · 1 line
1.6.2.2
Quoted 6 lines · Glauber Costa
Since libvirt dudes seem to prefer it, add a --accel option. For now, it only does the same as --enable-kvm, but it can easily be extended in the future.
Signed-off-by Glauber Costa <[email protected]>
To be useful, it should also include kqemu and a none option.
Signature · 3 lines
Regards, Anthony Liguori
Quoted 9 lines · Anthony Liguori
Quoted 6 lines · Glauber Costa
Since libvirt dudes seem to prefer it, add a --accel option. For now, it only does the same as --enable-kvm, but it can easily be extended in the future.
Signed-off-by Glauber Costa <[email protected]>To be useful, it should also include kqemu and a none option.
yeah, agree. This can be added later (even now!). I just wanted to signal it out that it will happen, because it will allow us to change qemu-kvm semantics in a positive way. I can redo the patch or send an incremental, whatever you prefer