From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Use host CPUID processor info Date: Sun, 08 Jul 2007 11:09:41 +0300 Message-ID: <46909BC5.1040505@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A01B8F3FB@pdsmsx411.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01B8F3FB-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dong, Eddie wrote: > Use host cpu model name, type, family, Model, stepping for guest. > > Against head. > > This is turning into a mix of the qemu cpuid and the host cpuid. We need to think of a way to make this controllable. > Signed-off-by: Yaozu (Eddie) Dong > > diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c > index bacdb37..1b86a13 100644 > --- a/qemu/qemu-kvm.c > +++ b/qemu/qemu-kvm.c > @@ -756,6 +755,10 @@ static void do_cpuid_ent(struct kvm_cpuid_entry *e, > uint32_t function) > if ((h_edx & 0x00100000) == 0) > e->edx &= ~0x00100000u; > } > + if (function == 0x80000002 || function == 0x80000003 > + || function == 0x80000004) { > + host_cpuid(function, &e->eax, &e->ebx, &e->ecx, &e->edx); > + } > // sysenter isn't supported on compatibility mode on AMD. and > syscall > // isn't supported in compatibility mode on Intel. so advertise > the > // actuall cpu, and say goodbye to migration between different > vendors > @@ -768,6 +771,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry *e, > uint32_t function) > e->ecx = bcd[1]; > e->edx = bcd[2]; > } > + if (function == 0x1) { > + host_cpuid(function, &e->eax, NULL, NULL, NULL); > + } > } > > int kvm_qemu_init_env(CPUState *cenv) > -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/