Re: [PATCH 2/2] kvm/x86: remove unneeded substitute search for missing CPUID entries

2011-03-31 Thread Andre Przywara
Avi Kivity wrote: On 03/30/2011 03:01 PM, Andre Przywara wrote: If KVM cannot find an exact match for a requested CPUID leaf, the code will try to find the closest match instead of simply confessing it's failure. The heuristic is on one hand wrong nowadays, since it does not take the KVM CPUID

Re: [PATCH 2/2] kvm/x86: remove unneeded substitute search for missing CPUID entries

2011-03-31 Thread Avi Kivity
On 03/31/2011 12:12 PM, Andre Przywara wrote: Avi Kivity wrote: On 03/30/2011 03:01 PM, Andre Przywara wrote: If KVM cannot find an exact match for a requested CPUID leaf, the code will try to find the closest match instead of simply confessing it's failure. The heuristic is on one hand wrong

[PATCH 2/2] kvm/x86: remove unneeded substitute search for missing CPUID entries

2011-03-30 Thread Andre Przywara
If KVM cannot find an exact match for a requested CPUID leaf, the code will try to find the closest match instead of simply confessing it's failure. The heuristic is on one hand wrong nowadays, since it does not take the KVM CPUID leaves (0x40xx) into account. On the other hand the callers of

Re: [PATCH 2/2] kvm/x86: remove unneeded substitute search for missing CPUID entries

2011-03-30 Thread Avi Kivity
On 03/30/2011 03:01 PM, Andre Przywara wrote: If KVM cannot find an exact match for a requested CPUID leaf, the code will try to find the closest match instead of simply confessing it's failure. The heuristic is on one hand wrong nowadays, since it does not take the KVM CPUID leaves (0x40xx)

Re: [PATCH 2/2] kvm/x86: remove unneeded substitute search for missing CPUID entries

2011-03-30 Thread Avi Kivity
On 03/30/2011 03:26 PM, Avi Kivity wrote: This behaviour is mandated by the spec (looking at the Intel one), though it is implemented incorrectly - should always return largest basic leaf, and ignore the kvm leaves. I think the correct behaviour is: if (e-function 1 (!best ||