From nobody Wed Nov 12 10:07:20 2025 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=1569927386; cv=none; d=zoho.com; s=zohoarc; b=nIeOb/LXZQe7tNOQKRopqCKlhN4FCdbqyIxWbOFDmDE4Zj459OHQo2lNI0BEvq3Wn+FLHKmMy1XCpZiOiMMlNKf4HsGlhsSWCDlmUvLF8dX3AEoDGEF8Hs6ot/oQJ1EFMmStzWMqyPcxTmFdVqAJD4hztVivC0A/ojJAw4LfaBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569927386; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=xLNmhREUeQ5pJkgHiYiBqHoRh8/dr2KPy1kkPSpPWKs=; b=kRXUEMCWmYEogZdFZQV0WiGV+kJwlxBoROZMDym83yBk3IRqD/QPMsarR7ryjZYFwEvm6jHEoFPgjf4BnJacOZOnvhcaIsxsxF8Mon8RD0WmvKYMxiywnqZOeEy5BFyFys1IQ8iNcsiauw8knWU7OYdTIlQ3/Iz6tGae7GJNSEM= 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 1569927386860603.2873967602183; Tue, 1 Oct 2019 03:56:26 -0700 (PDT) Received: from localhost ([::1]:40346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFFpR-0000jC-SV for importer@patchew.org; Tue, 01 Oct 2019 06:56:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51949) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFFkT-0003bE-NJ for qemu-devel@nongnu.org; Tue, 01 Oct 2019 06:51:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFFkO-0007Rh-9C for qemu-devel@nongnu.org; Tue, 01 Oct 2019 06:51:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48848) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFFkO-0007P1-3C for qemu-devel@nongnu.org; Tue, 01 Oct 2019 06:51:12 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 596DD81F25; Tue, 1 Oct 2019 10:51:08 +0000 (UTC) Received: from thuth.com (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C3B6261A0; Tue, 1 Oct 2019 10:51:07 +0000 (UTC) From: Thomas Huth To: Peter Maydell Subject: [PULL 5/5] Disallow colons in the parameter of "-accel" Date: Tue, 1 Oct 2019 12:50:57 +0200 Message-Id: <20191001105057.3949-6-thuth@redhat.com> In-Reply-To: <20191001105057.3949-1-thuth@redhat.com> References: <20191001105057.3949-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 01 Oct 2019 10:51:08 +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-devel@nongnu.org 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. Message-Id: <20190930123505.11607-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- 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