On 08.10.2012, at 16:03, Andreas Färber wrote: > Am 05.10.2012 04:24, schrieb Alexander Graf: >> >> On 05.10.2012, at 04:17, Anthony Liguori wrote: >> >>> Alexander Graf <ag...@suse.de> writes: >>> >>>> On 03.10.2012, at 22:26, Peter Maydell wrote: >>>> >>>>> On 3 October 2012 21:01, Blue Swirl <blauwir...@gmail.com> wrote: >>>>>> On Mon, Oct 1, 2012 at 4:20 PM, Anthony Liguori <anth...@codemonkey.ws> >>>>>> wrote: >>>>>>> Jan Kiszka <jan.kis...@siemens.com> writes: >>>>>>>> + /* The default accelerator depends on the availability of >>>>>>>> KVM. */ >>>>>>>> + p = kvm_configured ? "kvm" : "tcg"; >>>>>>>> } >>>>> >>>>>>> Blue/Aurelien, any objections? >>>>>> >>>>>> No, maybe a message could be printed that says that the default has >>>>>> changed, for a few releases. >>>>> >>>>> I've lost track of the conversation, are we currently proposing >>>>> the accelerator default to be "kvm" (as per the original patch >>>>> you quote here) or "kvm:tcg" ? >>>>> >>>>> I'm not entirely sure which I prefer from an ARM perspective >>>>> For some time to come and for a lot of targets (ie any target >>>>> CPU except A15), having a default of "kvm" is going to cause >>>>> existing working commandlines to stop working. [I expect that >>>>> ARM-host qemu binaries will be built with CONFIG_KVM once ARM >>>>> KVM support lands, but the same binary will be run on hosts >>>>> without virtualization extensions.] On the other hand, perhaps >>>>> there just aren't really very many people who run QEMU on >>>>> ARM hosts, and so we can ignore them :-) >>>> >>>> We get similar problems on PPC. Take the following example: >>>> >>>> $ qemu-system-ppc -M mpc8544ds -kernel uImage -nographic >>> >>> But do you really expect people to do this? I have to believe that >>> people running on PPC hardware and running qemu-system-ppc most likely >>> want to do KVM... >> >> Sure. But we wouldn't be able to even tell them what went wrong, as we don't >> have a negotiation mechanism right now that could tell user space "hey, the >> CPU you selected is unknown to me". > > Would it help to split out the cpu_model -> CPUClass lookup from > cpu_ppc_init() to invoke a hook or inquire a field indicating KVM support?
Well, we need to basically determine whether KVM is enabled only after cpu creation of the machine file. Alex