From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: [PATCH] introduce kvm64 CPU Date: Fri, 21 Aug 2009 23:53:41 +0200 Message-ID: <4A8F1765.6060306@amd.com> References: <1250804057-29681-1-git-send-email-andre.przywara@amd.com> <4A8EC03D.4000202@redhat.com> <5d6222a80908210901n127ec497hb858225021921495@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , anthony@codemonkey.ws, qemu-devel@nongnu.org, kvm@vger.kernel.org, jamie@shareable.org To: Glauber Costa Return-path: Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:37693 "EHLO TX2EHSOBE009.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616AbZHUVvC (ORCPT ); Fri, 21 Aug 2009 17:51:02 -0400 In-Reply-To: <5d6222a80908210901n127ec497hb858225021921495@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > On Fri, Aug 21, 2009 at 12:41 PM, Avi Kivity wrote: >> On 08/21/2009 12:34 AM, Andre Przywara wrote: >>> In addition to the TCG based qemu64 type let's introduce a kvm64 CPU type, >>> which is the least common denominator of all KVM-capable x86-CPUs >>> (based on Intel Pentium 4 Prescott). It can be used as a base type >>> for migration. >>> >> Typically users will want more specialized greatest common denomiator cpu >> types; if a site has standardized on recent hardware they will want the >> features of that hardware exposed. >> >> I think this is best left to management software, which has more information >> about the migration pool. > I believe what we want is an automatic tool that will connect to a > list of machines,and determine which qemu cpu type we should use. > Doesn't sound like black magic... I already have such a basic tool. It uses ssh (with pubkey) to connect to the target machine, then uses dd on /dev/cpu/0/cpuid to get the CPUID info. This requires cpuid.ko to be loaded and the permissions on the device file to be sufficient (the appropriate udev patch is already upstream). It then computes the least common denominator bits from several machines. Were you thinking of that approach or do you want to include this host CPUID functionality into QEMU (somehow embedded in the migration handler)? Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 ----to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mec0s-0007JF-DD for qemu-devel@nongnu.org; Fri, 21 Aug 2009 17:51:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mec0n-0007Ir-Ix for qemu-devel@nongnu.org; Fri, 21 Aug 2009 17:51:09 -0400 Received: from [199.232.76.173] (port=51138 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mec0n-0007Io-DK for qemu-devel@nongnu.org; Fri, 21 Aug 2009 17:51:05 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:37702 helo=TX2EHSOBE009.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1Mec0m-0008HF-Vo for qemu-devel@nongnu.org; Fri, 21 Aug 2009 17:51:05 -0400 Message-ID: <4A8F1765.6060306@amd.com> Date: Fri, 21 Aug 2009 23:53:41 +0200 From: Andre Przywara MIME-Version: 1.0 References: <1250804057-29681-1-git-send-email-andre.przywara@amd.com> <4A8EC03D.4000202@redhat.com> <5d6222a80908210901n127ec497hb858225021921495@mail.gmail.com> In-Reply-To: <5d6222a80908210901n127ec497hb858225021921495@mail.gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] introduce kvm64 CPU List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: kvm@vger.kernel.org, Avi Kivity , qemu-devel@nongnu.org Glauber Costa wrote: > On Fri, Aug 21, 2009 at 12:41 PM, Avi Kivity wrote: >> On 08/21/2009 12:34 AM, Andre Przywara wrote: >>> In addition to the TCG based qemu64 type let's introduce a kvm64 CPU type, >>> which is the least common denominator of all KVM-capable x86-CPUs >>> (based on Intel Pentium 4 Prescott). It can be used as a base type >>> for migration. >>> >> Typically users will want more specialized greatest common denomiator cpu >> types; if a site has standardized on recent hardware they will want the >> features of that hardware exposed. >> >> I think this is best left to management software, which has more information >> about the migration pool. > I believe what we want is an automatic tool that will connect to a > list of machines,and determine which qemu cpu type we should use. > Doesn't sound like black magic... I already have such a basic tool. It uses ssh (with pubkey) to connect to the target machine, then uses dd on /dev/cpu/0/cpuid to get the CPUID info. This requires cpuid.ko to be loaded and the permissions on the device file to be sufficient (the appropriate udev patch is already upstream). It then computes the least common denominator bits from several machines. Were you thinking of that approach or do you want to include this host CPUID functionality into QEMU (somehow embedded in the migration handler)? Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 ----to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632