Received: from eggs.gnu.org ([2001:4830:134:3::10]:44290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYrsl-0001iZ-FE for qemu-devel@nongnu.org; Fri, 29 Jun 2018 07:48:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYrsi-0003K8-CP for qemu-devel@nongnu.org; Fri, 29 Jun 2018 07:48:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47344 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYrsi-0003IZ-6E for qemu-devel@nongnu.org; Fri, 29 Jun 2018 07:48:04 -0400 References: <153026817452.402489.13386335348113684056.stgit@bahia.lan> <8730183a-3e16-931e-c990-24a5e169b2d9@redhat.com> <20180629103910.GE27016@redhat.com> <65a3597e-5560-1fd3-4f04-8a60e9e99b44@redhat.com> <20180629130701.6ab5d88a@bahia.lan> <29caab50-f853-66bf-805e-984e76619a9a@redhat.com> <20180629111405.GG27016@redhat.com> From: Paolo Bonzini Message-ID: Date: Fri, 29 Jun 2018 13:47:59 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] accel: forbid early use of kvm_enabled() and friends List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" Cc: Greg Kurz , qemu-devel@nongnu.org, David Gibson , Eduardo Habkost , Richard Henderson On 29/06/2018 13:42, C=C3=A9dric Le Goater wrote: >> Yeah, doing anything non-trivial in class_init is just asking for trou= ble, >> as conceivably nothing is initialized at that point.=20 > > May be we should consider having a set of binaries for each accelerator= , > KVM, TCG, etc. That would simplify a lot of the init path of the machin= es > and also of some of the models which are trying to initialize in one mo= de=20 > or the other. That would prevent things like "-machine accel=3Dkvm:tcg", which try KVM and fall back to TCG if it is not available. Paolo > Hybrid machines would still be possible, like using KVM for the CPUs an= d > an emulated model for some device. But the definitions would be static,= =20 > not guessed from what is available or not.=20