From nobody Sat May 18 08:14:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569847004; cv=none; d=zoho.com; s=zohoarc; b=dHyyu2zBLPNRfcPnq0MfzxVBez5wb4C7mMfgSkzvqoVXy1NvT2E+KoURIf8sE/bYgS57ucMjWhtelMVlM+lAo+XwWhmsKjxRBRo4+Z6JOSO9RlneHJhHmt2ENFQyrZHH38TeNBz+LaMKvpYGO16J9KsIclA2TH5PnYTPsMPM/6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569847004; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=kBa4DoolV1VIX3KpveoppNVOUAhO9rtGllo9pxi5VbY=; b=KXZtT6k6kguAs49asZ7hNU1uVZs9vlDKvszxPhrStxF1KrZlN9mXitUL2o4mLVGhScDqX24qXeulLWw7kGi6VtxythoTzKqFeQ8BePkHujmPvt03hqLUu6H0qSP+snshfcJ6N/qpN+oCYtxUATpmO6T6TLETCvoVcm+e5oI2hNE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569847004071235.95469358679827; Mon, 30 Sep 2019 05:36:44 -0700 (PDT) Received: from localhost ([::1]:51628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEuut-0006W2-Ff for importer@patchew.org; Mon, 30 Sep 2019 08:36:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35754) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEuta-0005p4-EV for qemu-devel@nongnu.org; Mon, 30 Sep 2019 08:35:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEutX-0005EL-Rt for qemu-devel@nongnu.org; Mon, 30 Sep 2019 08:35:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59624) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iEutT-0005BM-VW; Mon, 30 Sep 2019 08:35:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F313309DEE0; Mon, 30 Sep 2019 12:35:10 +0000 (UTC) Received: from thuth.com (ovpn-116-74.ams2.redhat.com [10.36.116.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54F84610C6; Mon, 30 Sep 2019 12:35:09 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH v2] Disallow colons in the parameter of "-accel" Date: Mon, 30 Sep 2019 14:35:05 +0200 Message-Id: <20190930123505.11607-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 30 Sep 2019 12:35:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Everybody who used something like "-machine accel=3Dkvm: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=3D..." 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 --- 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; =20 - qts =3D qtest_initf("-accel kvm:tcg -no-shutdown %s%s", (const char *)= data, + qts =3D qtest_initf("-M accel=3Dkvm:tcg -no-shutdown %s%s", (const cha= r *)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=3D... for now instead"); + exit(1); + } opts =3D qemu_opts_create(qemu_find_opts("machine"), NULL, false, &error_abort); qemu_opt_set(opts, "accel", optarg, &error_abort); --=20 2.18.1