From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: [PULL 5/5] Disallow colons in the parameter of "-accel"
Date: Tue, 1 Oct 2019 12:50:57 +0200 [thread overview]
Message-ID: <20191001105057.3949-6-thuth@redhat.com> (raw)
In-Reply-To: <20191001105057.3949-1-thuth@redhat.com>
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.
Message-Id: <20190930123505.11607-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
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
next prev parent reply other threads:[~2019-10-01 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 10:50 [PULL 0/5] qtest and misc patches Thomas Huth
2019-10-01 10:50 ` [PULL 1/5] tests: fix usb-hcd-ehci-test compilation Thomas Huth
2019-10-01 10:50 ` [PULL 2/5] tests: fix echi/ehci typo Thomas Huth
2019-10-01 10:50 ` [PULL 3/5] hw/m68k/next-cube: Avoid static RTC variables and introduce control register Thomas Huth
2019-10-01 10:50 ` [PULL 4/5] hw/core/loader: Fix possible crash in rom_copy() Thomas Huth
2019-10-01 10:50 ` Thomas Huth [this message]
2019-10-01 12:53 ` [PULL 0/5] qtest and misc patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191001105057.3949-6-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).