From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41246 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGuVD-0006NY-W1 for qemu-devel@nongnu.org; Tue, 25 May 2010 09:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGu96-0007TF-M0 for qemu-devel@nongnu.org; Tue, 25 May 2010 09:26:13 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:34993) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGu96-0007T8-JT for qemu-devel@nongnu.org; Tue, 25 May 2010 09:26:12 -0400 Received: by vws1 with SMTP id 1so3222549vws.4 for ; Tue, 25 May 2010 06:26:12 -0700 (PDT) Message-ID: <4BFBCFF0.70506@codemonkey.ws> Date: Tue, 25 May 2010 08:26:08 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] resent: x86/cpuid: propagate further CPUID leafs when -cpu host References: <1274428240-10801-1-git-send-email-andre.przywara@amd.com> <4BFAF941.1010604@codemonkey.ws> <4BFBCEEA.4030101@amd.com> In-Reply-To: <4BFBCEEA.4030101@amd.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andre Przywara Cc: "avi@redhat.com" , "aurelien@aurel32.net" , "qemu-devel@nongnu.org" On 05/25/2010 08:21 AM, Andre Przywara wrote: >> What's the benefit of exposing this information to the guest? > > That is mostly to propagate the cache size and organization parameters > to the guest: > >> +/* safe CPUID leafs to propagate to guest if -cpu host is specified > >> + * Intel defined leafs: > >> + * Cache descriptors (0x02) > >> + * Deterministic cache parameters (0x04) > >> + * Monitor/MWAIT parameters (0x05) > >> + * > >> + * AMD defined leafs: > >> + * L1 Cache and TLB (0x05) > >> + * L2+L3 TLB (0x06) > >> + * LongMode address size (0x08) > >> + * 1GB page TLB (0x19) > >> + * Performance optimization (0x1A) > >> + */ > Since at least L1 and L2 caches are mostly private to vCPUs, I see no > reason to disguise them. But in practice, what is it useful for? Just because we can expose it doesn't mean we should. Regards, Anthony Liguori > Regards, > Andre. >