Received: from [140.186.70.92] (port=46627 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIPgi-0008UI-1b for qemu-devel@nongnu.org; Tue, 16 Nov 2010 12:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIPOD-0003yx-7Q for qemu-devel@nongnu.org; Tue, 16 Nov 2010 12:32:21 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60895 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIPOC-0003yU-TA for qemu-devel@nongnu.org; Tue, 16 Nov 2010 12:32:17 -0500 Subject: Re: [Qemu-devel] [PATCH] Introduce -accel command option. Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <4CE2BF17.2050806@codemonkey.ws> Date: Tue, 16 Nov 2010 18:32:13 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <73A217DF-24CF-424F-8CEE-C09083DA29E7@suse.de> References: <1289835951-25567-1-git-send-email-anthony.perard@citrix.com> <4CE165E0.5040705@codemonkey.ws> <4CE2B435.4060003@codemonkey.ws> <20101116165506.GE1310@redhat.com> <4CE2BD72.5030502@codemonkey.ws> <0F2CBF9E-B3FA-491B-9E0B-E2BCB5C0E2F4@suse.de> <4CE2BF17.2050806@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Anthony PERARD , QEMU-devel On 16.11.2010, at 18:27, Anthony Liguori wrote: > On 11/16/2010 11:24 AM, Alexander Graf wrote: >> On 16.11.2010, at 18:20, Anthony Liguori wrote: >>=20 >> =20 >>> On 11/16/2010 10:59 AM, Alexander Graf wrote: >>> =20 >>>> =20 >>>>> Surely, only if it is running on a Xen Dom0. If you use -M xenpv = on a KVM >>>>> host, then -M xenpv should imply -machine accel=3Dkvm (ie it would = be using >>>>> xenner) >>>>>=20 >>>>> =20 >>>> Actually, it should imply -machine accel=3Dkvm,tcg :). Accelerators = really are not a machine property. In an ideal world, -M pc would just = work with xen hvm if -accel xen is given. >>>>=20 >>>> =20 >>> No, an accelerator is both a CPU selection and a machine = characteristic. For KVM, we overload -cpu to modify both the KVM CPU = and the TCG CPU both this won't work with accel=3Dxen. We probably = shouldn't do this with KVM either because there's a significant = different between trying to do cpuid masking with KVM and modifying the = TCG cpu emulation support. >>>=20 >>> Both KVM and Xen have other impacts on the platform devices though. = KVM does not support SMM so it disables that in the i440fx. KVM prefers = to use it's own in-kernel local APIC (and IOAPIC). That makes it a = property of the machine. >>> =20 >> So you're saying the machine should define an accel mask of accels it = supports? >>=20 >> However all this ends up internally, giving the user an easy option = to choose accels would still be nice. Users don't use -device or = -machine. They want shortcuts :). >> =20 >=20 > User's want things to just work. >=20 > That's why -M xenpv should imply -machine accel=3Dxen. No, it should imply -machine accel=3Dxen,kvm,tcg. Which should be the = default anyways. For machines that don't work with specific accels, I'd = agree that a machine should be able to mask those out. But in general, = we'll always get back to defaulting to xen,kvm,tcg. > A user should never have to specify and accelerator option IMHO. If things don't work out, he should be able to do things like -no-kvm = for bug hunting. In normal use cases, I tend to agree. Things should = just work automatically. Alex