[Qemu-devel] [PATCH] Mark legacy option '-no-kvm' as deprecated

Thomas Huth posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1493726062-31743-1-git-send-email-thuth@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
vl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH] Mark legacy option '-no-kvm' as deprecated
Posted by Thomas Huth 6 years, 11 months ago
'-no-kvm' was just a legacy convenience option for the users of
qemu-kvm, it never made sense in the normal QEMU tree since TCG is
the default here anyway. The option has also never been specified
in the QEMU docs and in the '--help' list, so likely hardly anybody
knows about this option at all. I think we could get rid of this
without bothering anybody nowadays, but just in case, let's print
out a warning for a couple of releases first.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 vl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index d5ec87e..2d44621 100644
--- a/vl.c
+++ b/vl.c
@@ -3709,7 +3709,9 @@ int main(int argc, char **argv, char **envp)
                     exit(1);
                 }
                 break;
-             case QEMU_OPTION_no_kvm:
+            case QEMU_OPTION_no_kvm:
+                error_report("'-no-kvm' is depreacted, please use "
+                             "'-accel tcg' instead");
                 olist = qemu_find_opts("machine");
                 qemu_opts_parse_noisily(olist, "accel=tcg", false);
                 break;
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH] Mark legacy option '-no-kvm' as deprecated
Posted by Stefan Hajnoczi 6 years, 11 months ago
On Tue, May 02, 2017 at 01:54:22PM +0200, Thomas Huth wrote:
> '-no-kvm' was just a legacy convenience option for the users of
> qemu-kvm, it never made sense in the normal QEMU tree since TCG is
> the default here anyway. The option has also never been specified
> in the QEMU docs and in the '--help' list, so likely hardly anybody
> knows about this option at all. I think we could get rid of this
> without bothering anybody nowadays, but just in case, let's print
> out a warning for a couple of releases first.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  vl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/vl.c b/vl.c
> index d5ec87e..2d44621 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3709,7 +3709,9 @@ int main(int argc, char **argv, char **envp)
>                      exit(1);
>                  }
>                  break;
> -             case QEMU_OPTION_no_kvm:
> +            case QEMU_OPTION_no_kvm:
> +                error_report("'-no-kvm' is depreacted, please use "

s/depreacted/deprecated/
Re: [Qemu-devel] [PATCH] Mark legacy option '-no-kvm' as deprecated
Posted by Daniel P. Berrange 6 years, 11 months ago
On Fri, May 05, 2017 at 03:48:37PM +0100, Stefan Hajnoczi wrote:
> On Tue, May 02, 2017 at 01:54:22PM +0200, Thomas Huth wrote:
> > '-no-kvm' was just a legacy convenience option for the users of
> > qemu-kvm, it never made sense in the normal QEMU tree since TCG is
> > the default here anyway. The option has also never been specified
> > in the QEMU docs and in the '--help' list, so likely hardly anybody
> > knows about this option at all. I think we could get rid of this
> > without bothering anybody nowadays, but just in case, let's print
> > out a warning for a couple of releases first.
> > 
> > Signed-off-by: Thomas Huth <thuth@redhat.com>
> > ---
> >  vl.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/vl.c b/vl.c
> > index d5ec87e..2d44621 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -3709,7 +3709,9 @@ int main(int argc, char **argv, char **envp)
> >                      exit(1);
> >                  }
> >                  break;
> > -             case QEMU_OPTION_no_kvm:
> > +            case QEMU_OPTION_no_kvm:
> > +                error_report("'-no-kvm' is depreacted, please use "
> 
> s/depreacted/deprecated/

Should we have an dedicated  'error_deprecated(oldfeat, newfeat)' method
that prints a standardized message, as well as a -no-deprecated flag that
turns off all the deprecation warnings. There's nothing more annoying than
an application that insists on spewing warnings to stdout that you know
about, but aren't in a position to address any time soon.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|