From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NV5sB-00061r-2N for qemu-devel@nongnu.org; Wed, 13 Jan 2010 11:15:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NV5s6-0005zO-AN for qemu-devel@nongnu.org; Wed, 13 Jan 2010 11:15:06 -0500 Received: from [199.232.76.173] (port=49007 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NV5s6-0005zL-5I for qemu-devel@nongnu.org; Wed, 13 Jan 2010 11:15:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32849) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NV5s5-0002Kb-QY for qemu-devel@nongnu.org; Wed, 13 Jan 2010 11:15:02 -0500 Date: Wed, 13 Jan 2010 18:14:54 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [PATCHv3] Add KVM paravirt cpuid leaf Message-ID: <20100113161454.GN7549@redhat.com> References: <20100107124449.GY4905@redhat.com> <20100107162427.GF4905@redhat.com> <20100113132506.GY7549@redhat.com> <4B4DEF4D.9080101@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B4DEF4D.9080101@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, avi@redhat.com 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.