From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: KVM Processor cache size Date: Tue, 3 Aug 2010 00:54:59 +0200 Message-ID: <4C574CC3.2040703@amd.com> References: <4C56BF6F.9040402@amd.com> <4C56C353.7020607@redhat.com> <4C5745BC.30908@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Ricardo Martins , "kvm@vger.kernel.org" To: Anthony Liguori Return-path: Received: from va3ehsobe006.messaging.microsoft.com ([216.32.180.16]:16902 "EHLO VA3EHSOBE008.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751264Ab0HBWzH (ORCPT ); Mon, 2 Aug 2010 18:55:07 -0400 In-Reply-To: <4C5745BC.30908@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > On 08/02/2010 08:08 AM, Avi Kivity wrote: >> On 08/02/2010 03:51 PM, Andre Przywara wrote: >>> I sent a patch to include the cache size when using -cpu host, but >>> this has been n'acked because the benefit is not clear. >> Anthony, why was this NACKed? First, there are programs which query >> the cache size. That's why it's exposed! Second, -cpu host is for >> exposing as many host cpu features as we can, not just those we have >> an immediate use for. It's like 'cp -a' dropping attributes the >> author didn't care about. > > That's exactly what the code does today BTW. The kernel module filters > cpuid flags, qemu filters additional flags, and we don't pass everything > through anyway. > > -cpu host is a mess and needs some love. The mentioned patch addresses this to some degree, where it creates a list of CPUID leafs which can be safely passed through. There are some which we should not (and sometimes must not) propagate (think of host topology and power management), but these should not block the useful ones. CPUID transports a lot of different information, so we should also distinguish here. > It's impossible to use > correctly today in a production environment if you care about reliably > generating the same guest visible interface. Do you mean by this that the guest sees a different CPU model on each host it is started? Actually this is a default scenario for native machines and CPUID was introduced for applications to adapt to this. So if you leave migration aside, -cpu host is actually the natural way. Regards, Andre. -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12