From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41030 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIQj2-0003Yb-KJ for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:57:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIQj1-0005Lz-Ho for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:57:52 -0500 Received: from mail-pv0-f173.google.com ([74.125.83.173]:61096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIQj1-0005Lt-AP for qemu-devel@nongnu.org; Tue, 16 Nov 2010 13:57:51 -0500 Received: by pvh11 with SMTP id 11so334138pvh.4 for ; Tue, 16 Nov 2010 10:57:50 -0800 (PST) Message-ID: <4CE2D42B.1050905@codemonkey.ws> Date: Tue, 16 Nov 2010 12:57:47 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Introduce -accel command option. 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> <30EC6E1B-5A66-47B0-8C07-0D808B2E1B3B@suse.de> In-Reply-To: <30EC6E1B-5A66-47B0-8C07-0D808B2E1B3B@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Anthony PERARD , QEMU-devel On 11/16/2010 12:49 PM, Alexander Graf wrote: > On 16.11.2010, at 19:22, Anthony PERARD wrote: > > >> On Tue, 16 Nov 2010, Anthony Liguori wrote: >> >> >>> On 11/16/2010 11:24 AM, Alexander Graf wrote: >>> >>>> On 16.11.2010, at 18:20, Anthony Liguori wrote: >>>> >>>> >>>> >>>>> On 11/16/2010 10:59 AM, Alexander Graf wrote: >>>>> >>>>> >>>>>> >>>>>>> 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=kvm (ie it would be using >>>>>>> xenner) >>>>>>> >>>>>>> >>>>>>> >>>>>> Actually, it should imply -machine accel=kvm,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. >>>>>> >>>>>> >>>>>> >>>>> 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=xen. 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. >>>>> >>>>> 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. >>>>> >>>>> >>>> So you're saying the machine should define an accel mask of accels it supports? >>>> >>>> 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 :). >>>> >>>> >>> User's want things to just work. >>> >>> That's why -M xenpv should imply -machine accel=xen. >>> >> Actually, it works like that for qemu-xen, we just specify -M xenpv, and >> we don't have any --enable-xen or other -accel xen. >> > Yes, and that's exactly the behavior you'd get :). -accel would default to xen,kvm,tcg No, that's the wrong default. The default should be -accel tcg,[xen|kvm] if anything. That said, if tied into QemuOpts, the default can be specified in the global config file which will make everyone happy. Regards, Anthony Liguori