From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSkUD-0002ha-Il for qemu-devel@nongnu.org; Tue, 03 Mar 2015 05:55:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSkUA-0004Dw-0B for qemu-devel@nongnu.org; Tue, 03 Mar 2015 05:55:37 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:35157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSkU9-0004DV-Ml for qemu-devel@nongnu.org; Tue, 03 Mar 2015 05:55:33 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Mar 2015 10:55:29 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1A1641B08069 for ; Tue, 3 Mar 2015 10:55:45 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t23AtRrS1048896 for ; Tue, 3 Mar 2015 10:55:27 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t23AtQt2017063 for ; Tue, 3 Mar 2015 03:55:27 -0700 Date: Tue, 3 Mar 2015 11:55:24 +0100 From: Michael Mueller Message-ID: <20150303115524.40bd40b0@bee> In-Reply-To: <54F4965D.7000701@suse.de> References: <1425300248-40277-1-git-send-email-mimu@linux.vnet.ibm.com> <1425300248-40277-2-git-send-email-mimu@linux.vnet.ibm.com> <54F46C41.3000201@suse.de> <20150302174352.3715f1e4@bee> <54F4965D.7000701@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 01/16] Introduce probe mode for machine type none List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: linux-s390@vger.kernel.org, Peter Crosthwaite , Eduardo Habkost , kvm@vger.kernel.org, Gleb Natapov , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, Alexander Graf , Christian Borntraeger , "Jason J. Herne" , Paolo Bonzini , Cornelia Huck , "Edgar E. Iglesias" , Alistair Francis , Richard Henderson On Mon, 02 Mar 2015 17:57:01 +0100 Andreas F=C3=A4rber wrote: > Am 02.03.2015 um 17:43 schrieb Michael Mueller: > > On Mon, 02 Mar 2015 14:57:21 +0100 > > Andreas F=C3=A4rber wrote: > >=20 > >>> int configure_accelerator(MachineState *ms) > >>> { > >>> - const char *p; > >>> + const char *p, *name; > >>> char buf[10]; > >>> int ret; > >>> bool accel_initialised =3D false; > >>> bool init_failed =3D false; > >>> AccelClass *acc =3D NULL; > >>> + ObjectClass *oc; > >>> + bool probe_mode =3D false; > >>> =20 > >>> p =3D qemu_opt_get(qemu_get_machine_opts(), "accel"); > >>> if (p =3D=3D NULL) { > >>> - /* Use the default "accelerator", tcg */ > >>> - p =3D "tcg"; > >>> + oc =3D (ObjectClass *) MACHINE_GET_CLASS(current_machine); > >>> + name =3D object_class_get_name(oc); > >>> + probe_mode =3D !strcmp(name, "none" TYPE_MACHINE_SUFFIX); > >>> + if (probe_mode) { > >>> + /* Use these accelerators in probe mode, tcg should be l= ast */ > >>> + p =3D probe_mode_accels; > >>> + } else { > >>> + /* Use the default "accelerator", tcg */ > >>> + p =3D "tcg"; > >>> + } > >>> } =20 > >> > >> Can't we instead use an explicit ,accel=3Dprobe or ,accel=3Dauto? > >> That would then obsolete the next patch. > >=20 > > How would you express the following with the accel=3D app= roach? > >=20 > > -probe -machine s390-ccw,accel=3Dkvm=20 > >=20 > > Using machine "none" as default with tcg as last accelerator initialize= d should not break > > anything. > >=20 > > -M none >=20 > Let me ask differently: What does -machine none or -M none have to do > with probing? It reads as if you are introducing two probe modes. Why do The machine none? nothing directly, I guess. What are real world use cases = for that machine type? > you need both? If we have -probe, isn't that independent of which It is just two different means to switch on the same mode. > machine we specify? Who is going to call either, with which respective go= al? -probe itself would be sufficient but I currently do not want to enforce th= e use of a new parameter. Best would be not to have that mode at all if possible.=20 The intended use case is driven by management interfaces that need to draw = decisions on, in this particular case runnable cpu models, with information originate= d by qemu. Let me walk through Eduardo's suggestion first and crosscheck it with my re= quirements before we enter in a maybe afterwards obsolete discussion. Thanks, Michael >=20 > I think that changing the semantics of an absent ,accel=3Dfoo parameter to > mean something else than its longtime default of tcg is a bad idea. > > Have you testing qtest with it? Doesn't -qtest imply accel=3Dqtest or is > that always passed explicitly? >=20 > Regards, > Andreas >=20