On Wed, Jan 13, 2010 at 06:14:54PM +0200, Gleb Natapov wrote:
> On Wed, Jan 13, 2010 at 10:05:33AM -0600, Anthony Liguori wrote:
> > >+#ifdef CONFIG_KVM_PARA
> > >+    /* Paravirtualization CPUIDs */
> > >+    memcpy(signature, "KVMKVMKVM\0\0\0", 12);
> > >+    c =&cpuid_data.entries[cpuid_i++];
> > >+    memset(c, 0, sizeof(*c));
> > >+    c->function = KVM_CPUID_SIGNATURE;
> > >+    c->eax = 0;
> > >+    c->ebx = signature[0];
> > >+    c->ecx = signature[1];
> > >+    c->edx = signature[2];
> > >+
> > >+    c =&cpuid_data.entries[cpuid_i++];
> > >+    memset(c, 0, sizeof(*c));
> > >+    c->function = KVM_CPUID_FEATURES;
> > >+    c->eax = env->cpuid_kvm_features&  get_para_features(env);
> > >+#endif
> > >+
> > >      cpu_x86_cpuid(env, 0, 0,&limit,&unused,&unused,&unused);
> > 
> > Instead of hooking here, would it make more sense to tie into the
> > generic cpuid function in helper.c?
> > 
> What do you mean? This patch ties into generic cpuid function in
> helper.c and pars kvm cpu flags there. Here we just configure
> kernel.
> 
Or do you mean making so that PV leaf will be available via
cpu_x86_cpuid()? This make sense, but lets do it after merging this
code path with qemu-kvm and the proposed patch brings qemu and
qemu-kvm close together.
 
--
                        Gleb.


Reply via email to