From: Dan Kenigsberg Subject: Re: [RFC] Expose host cpuid to guest Date: Thu, 22 Nov 2007 15:36:29 +0200 Message-ID: <20071122133629.GA8559@danken-desk.qumranet.com> References: <20071121110631.GA14292@karma.qumranet.com> <200711221012.05384.mike@mtgambier.net> <20071122130118.GA14295@karma.qumranet.com> <200711222350.14746.mike@mtgambier.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Mike Lampard Return-path: Content-Disposition: inline In-Reply-To: <200711222350.14746.mike-/+b+wjvSUqIxsqv6Oivclw@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 On Thu, Nov 22, 2007 at 11:50:14PM +1030, Mike Lampard wrote: > On Thu, 22 Nov 2007 11:31:18 pm Dan Kenigsberg wrote: > > On Thu, Nov 22, 2007 at 10:12:04AM +1030, Mike Lampard wrote: > > > On Wed, 21 Nov 2007 09:36:31 pm Dan Kenigsberg wrote: > > > > These patches expose host CPU features (that are known to work under > > > > KVM) to guests. It makes a couple of benchmarks run faster, and > > > > generally gives kvm's user better info on its host. > > > > > > > > The kernel-space patch adds KVM_GET_SUPPORTED_CPUID ioctl to obtain the > > > > table of cpuid functions supported by the host. The user-space patch > > > > allows fine-tuning this table from the command-line. > > > > > > > > I had to define struct kvm_cpuid2, KVM_SET_CPUID2 etc., because cpuid > > > > functions are a little more complex than just function-value pairs. > > > > > > > > Dan. > > > > > > With current kvm-git (commit 51727a110220681f6f43b005d069e28c58f5d151) > > > (userspace is current to commit 6a385c9539f9746d7ff51ef34c064c3eba86448b) > > > and the userspace portion of this patch I cannot boot a 64 bit guest > > > (Mandriva 2008 x64) on my AMD x2 without -cpu host. The guest kernel > > > says "Your CPU does not support long mode. Use a 32bit distribution.". > > > Works fine without the userspace portion of the patch. > > > > Thanks for your report. I'm probably not exposing one(?) of AMD's x86_64 > > required cpuid features. However, I fail to reproduce this on Dual-Core > > AMD Opteron(tm) Processor 2210 running 2.6.18-8.1.15.el5. What is your > > host? > > 64bit 2.6.23.8 on an AMD Athlon X2 4400. > cpuid flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat > pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm > 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy > misalignsse > > If you need further info, just yell. I didnt want to clutter up the > mailinglist with the full output of cpuid, but will if it helps you. Since I'm currently out of ideas, would you try it with -no-kvm? Since current Qemu cvs has a -cpu userspace patch, it might be worthwhile to test that, too. Dan. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/