From nobody Sat May 4 01:17:28 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=1569241280; cv=none; d=zoho.com; s=zohoarc; b=UNsm+9aK38i9mDaU8W/C6MRL5eHU4hP7NsgfnRcLmjQJggdvKZ+2UNzNVAieo2y9Sw4T0TdHSGrFu/SQYXFOkY/yQ/1hURltaH6ohvmirbflahwhiVPWOVPmS2JQTZ6ZRJWQ1rezOK/gYl/r1riTyRv8uywKgyUYOAf+/PcFBFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569241280; 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=5k7vMsQ49u4OLeCAr8r4Afmxk7KsFOFowbP4Z6NYAfI=; b=ECC3+g7bRVYvY8K4tM+Rb6x0YCo+L4Xw6GfTEv7IOmqh59bVtiF66qAiHUlRvSVFQMZvgUePLRuBKM5a43S8QK4oL+FFlRQtAwxHKf23jDKh8GtqJa+DW2Lx8B7Z+7xlTRNCawt8/1iJrWZC7SV3HO3hAz/2zHspt+dpZtMGedI= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1569241280327227.67581538166814; Mon, 23 Sep 2019 05:21:20 -0700 (PDT) Received: from localhost ([::1]:55844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCNL3-0008Lj-Bv for importer@patchew.org; Mon, 23 Sep 2019 08:21:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47899) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCNHN-0006TS-IX for qemu-devel@nongnu.org; Mon, 23 Sep 2019 08:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCNHK-0001Vh-KE for qemu-devel@nongnu.org; Mon, 23 Sep 2019 08:17:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57746) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iCNHK-0001VS-Ex; Mon, 23 Sep 2019 08:17:18 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B26C618CB903; Mon, 23 Sep 2019 12:17:17 +0000 (UTC) Received: from thuth.com (ovpn-116-120.ams2.redhat.com [10.36.116.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86D8A600C4; Mon, 23 Sep 2019 12:17:16 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH] Disallow colons in the parameter of "-accel" Date: Mon, 23 Sep 2019 14:17:12 +0200 Message-Id: <20190923121712.22971-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Mon, 23 Sep 2019 12:17:17 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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 --- vl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vl.c b/vl.c index 630f5c5e9c..68f47a9c25 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... in this case 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