qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv3] Add KVM paravirt cpuid leaf


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCHv3] Add KVM paravirt cpuid leaf
Date: Wed, 13 Jan 2010 18:14:54 +0200

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

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