From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] kvm: fix cpuid eax Date: Mon, 7 May 2012 10:26:58 +0200 Message-ID: <20120507082658.GH16608@gmail.com> References: <20120430143902.GA10181@redhat.com> <4F9EF7FA.3060007@codemonkey.ws> <4F9FDCC4.3030302@redhat.com> <4F9FDD75.4030608@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , "Michael S. Tsirkin" , Marcelo Tosatti , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, davej@redhat.com To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <4F9FDD75.4030608@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org * Avi Kivity wrote: > On 05/01/2012 03:53 PM, Avi Kivity wrote: > > On 04/30/2012 11:37 PM, Anthony Liguori wrote: > > > On 04/30/2012 09:39 AM, Michael S. Tsirkin wrote: > > >> cpuid eax should return the max leaf so that > > >> guests can find out the valid range. > > >> This matches Xen et al. > > > > > > What KVM does here predates Xen and Hyper-V. > > > > > > This is an ABI breaker. > > > > First, I don't think we ever documented eax, so nothing can rely on it. > > > > Actually, we did document it. > > However, I think it's safe to change. The documentation in > this case should say "reserved, returns zero in this > implementation", rather than 0. Just a side note: whether and how it got documented is immaterial, what matters is whether any application binary that is already out there breaks. (The 'B' in ABI.) Whether it was fully documented or it was entirly undocumented, the code obfuscated, encrypted and all this information got locked away in a safe at a military base protected by nuclear missiles is immaterial: if someone accidentally stumbled upon it and an app learned to rely on the ABI detail then tough luck. Fortunately, this does not appear to have happened, so as a result it's *not* an Application Binary Interface (it's only a Binary Interface) and can thus be changed for the better. Thanks, Ingo