All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Disallow colons in the parameter of "-accel"
@ 2019-09-30 12:35 Thomas Huth
  2019-09-30 13:36 ` no-reply
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Huth @ 2019-09-30 12:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini

Everybody who used something like "-machine accel=kvm:tcg" in the past
might be tempted to specify a similar list with the -accel parameter,
too, for example "-accel kvm:tcg". However, this is not how this
options is thought to be used, since each "-accel" should only take care
of one specific accelerator.

In the long run, we really should rework the "-accel" code completely,
so that it does not set "-machine accel=..." anymore internally, but
is completely independent from "-machine". For the short run, let's
make sure that users cannot use "-accel xyz:tcg", so that we avoid
that we have to deal with such cases in the wild later.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 v2:
 - Reword the message a little bit (as suggested by Paolo)
 - Fix the cdrom-test - it already contained a bad usage of -accel

 tests/cdrom-test.c | 2 +-
 vl.c               | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c
index 05611da648..34e9974634 100644
--- a/tests/cdrom-test.c
+++ b/tests/cdrom-test.c
@@ -120,7 +120,7 @@ static void test_cdboot(gconstpointer data)
 {
     QTestState *qts;
 
-    qts = qtest_initf("-accel kvm:tcg -no-shutdown %s%s", (const char *)data,
+    qts = qtest_initf("-M accel=kvm:tcg -no-shutdown %s%s", (const char *)data,
                       isoimage);
     boot_sector_test(qts);
     qtest_quit(qts);
diff --git a/vl.c b/vl.c
index 630f5c5e9c..002bf4919e 100644
--- a/vl.c
+++ b/vl.c
@@ -3554,6 +3554,11 @@ int main(int argc, char **argv, char **envp)
                     g_slist_free(accel_list);
                     exit(0);
                 }
+                if (optarg && strchr(optarg, ':')) {
+                    error_report("Don't use ':' with -accel, "
+                                 "use -M accel=... for now instead");
+                    exit(1);
+                }
                 opts = qemu_opts_create(qemu_find_opts("machine"), NULL,
                                         false, &error_abort);
                 qemu_opt_set(opts, "accel", optarg, &error_abort);
-- 
2.18.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] Disallow colons in the parameter of "-accel"
  2019-09-30 12:35 [PATCH v2] Disallow colons in the parameter of "-accel" Thomas Huth
@ 2019-09-30 13:36 ` no-reply
  0 siblings, 0 replies; 2+ messages in thread
From: no-reply @ 2019-09-30 13:36 UTC (permalink / raw)
  To: thuth; +Cc: qemu-trivial, pbonzini, qemu-devel

Patchew URL: https://patchew.org/QEMU/20190930123505.11607-1-thuth@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===




The full log is available at
http://patchew.org/logs/20190930123505.11607-1-thuth@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-30 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-30 12:35 [PATCH v2] Disallow colons in the parameter of "-accel" Thomas Huth
2019-09-30 13:36 ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.