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.

--
                        Gleb.


Reply via email to