Paolo Bonzini <pbonz...@redhat.com> writes:

> On 04/05/2018 19:01, Thomas Huth wrote:
>> The -no-kvm* options are a remainder of the ancient "qemu-kvm"
>> fork. They have never been officially documented in our qemu-doc,
>> they have been marked as deprecated in the sources since a very
>> long time, and we've marked them as deprecated in our qemu-doc
>> since QEMU v2.10. So far I haven't seen any complaints that we
>> should keep them, so it's time to remove these old parameters now.
>> 
>> While I'm at it, this patch series also removes a left-over from
>> the "-tdf" option (which has been removed with QEMU v2.12) and
>> fixes a deficiency in the option parsing code that has been
>> revealed by the remainder of the "-tdf" option.
>> 
>> Thomas Huth (5):
>>   qemu-options: Remove remainders of the -tdf option
>>   qemu-options: Bail out on unsupported options instead of silently
>>     ignoring them
>>   qemu-options: Remove deprecated -no-kvm-pit-reinjection
>>   qemu-options: Remove deprecated -no-kvm-irqchip
>>   qemu-options: Remove deprecated -no-kvm
>
> I'm not that sure anymore about -no-kvm.  It can come in handy for
> distros (*cough* RHEL *cough) that only ship a qemu-kvm binary with
> default accelerator "-machine accel=kvm:tcg".
>
> Yeah, "-accel tcg" is only a few characters later, but it is a
> relatively recent addition.

2012 is "relatively recent" in the alternate RHEL universe, perhaps :)


Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Fri Oct 5 14:51:45 2012 -0300

    Emulate qemu-kvms -no-kvm option
    
    Releases of qemu-kvm will be interrupted at qemu 1.3.0.
    Users should switch to plain qemu releases.
    To avoid breaking scenarios which are setup with command line
    options specific to qemu-kvm, port these switches from qemu-kvm
    to qemu.git.
    
    Port -no-kvm option.
    
    Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com>

diff --git a/qemu-options.hx b/qemu-options.hx
index 628bd44591..fe8f15c541 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2888,6 +2888,9 @@ STEXI
 Enable FIPS 140-2 compliance mode.
 ETEXI
 
+HXCOMM Deprecated by -machine accel=tcg property
+DEF("no-kvm", HAS_ARG, QEMU_OPTION_no_kvm, "", QEMU_ARCH_I386)
+
 HXCOMM Deprecated by kvm-pit driver properties
 DEF("no-kvm-pit-reinjection", HAS_ARG, QEMU_OPTION_no_kvm_pit_reinjection,
     "", QEMU_ARCH_I386)
diff --git a/vl.c b/vl.c
index cd7c0fbd52..b39f22ed35 100644
--- a/vl.c
+++ b/vl.c
@@ -3171,6 +3171,10 @@ int main(int argc, char **argv, char **envp)
                     machine = machine_parse(optarg);
                 }
                 break;
+             case QEMU_OPTION_no_kvm:
+                olist = qemu_find_opts("machine");
+                qemu_opts_parse(olist, "accel=tcg", 0);
+                break;
             case QEMU_OPTION_no_kvm_pit: {
                 fprintf(stderr, "Warning: KVM PIT can no longer be disabled "
                                 "separately.\n");

Reply via email to