[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_e

From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled()
Date: Thu, 07 Oct 2010 07:48:06 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

On 10/07/2010 03:42 AM, Roedel, Joerg wrote:
On Wed, Oct 06, 2010 at 03:24:59PM -0400, Anthony Liguori wrote:
+    qemu_compat_version = machine->compat_version;
       if (display_type == DT_NOGRAPHIC) {
           if (default_parallel)
               add_device_config(DEV_PARALLEL, "null");

Looks fine to me, given CPUs are not in qdev. Anthony?

The idea is fine, but why not just add the default CPU to the machine
If I remember correctly the reason was that the machine description was
not accessible in the cpuid initialization path because it is a function
local variable.

Not tested at all but I think the attached patch addresses it in a pretty nice way.

There's a couple ways you could support your patch on top of this. You could add a kvm_cpu_model to the machine structure that gets defaulted too if kvm_enabled(). You could also introduce a new KVM machine type that gets defaulted to if no explicit machine is specified.

  I could have made it a global variable but considered
the compat_version approach simpler. The qemu_compat_version might also
be useful at other places.

The reason we've avoided having a builtin notion of versions is that we have many downstreams where versioning would get very complicated. If we stick to features it makes it much easier for downstreams.


Anthony Liguori


Attachment: 0001-machine-make-default-cpu-model-part-of-machine-struc.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]