Re: [PATCH v2 1/2] KVM: SVM: Replace svm_has() by standard Linux cpuid accessors
On Thu, Nov 11, 2010 at 04:50:10PM +0200, Avi Kivity wrote: > On 11/11/2010 04:46 PM, Joerg Roedel wrote: >> On Tue, Nov 09, 2010 at 04:15:42PM +0200, Avi Kivity wrote: >> > - if (nr == BP_VECTOR&& !svm_has(SVM_FEATURE_NRIP)) { >> > + if (nr == BP_VECTOR&& !static_cpu_has(X86_FEATURE_NRIPS)) { >> >> What is static_cpu_has > > It's like boot_cpu_has, only it works by patching instead of a dynamic test. > >> and why you use it only here and boot_cpu_has >> in all other places? > > A nano optimization, this is a more commonly used path. Ok, I was just curious because I couldn't find the static_cpu_has by a quick grep. Thanks for the explanation. Acked-by: Joerg Roedel -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] KVM: SVM: Replace svm_has() by standard Linux cpuid accessors
On 11/11/2010 04:46 PM, Joerg Roedel wrote: On Tue, Nov 09, 2010 at 04:15:42PM +0200, Avi Kivity wrote: > - if (nr == BP_VECTOR&& !svm_has(SVM_FEATURE_NRIP)) { > + if (nr == BP_VECTOR&& !static_cpu_has(X86_FEATURE_NRIPS)) { What is static_cpu_has It's like boot_cpu_has, only it works by patching instead of a dynamic test. and why you use it only here and boot_cpu_has in all other places? A nano optimization, this is a more commonly used path. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/2] KVM: SVM: Replace svm_has() by standard Linux cpuid accessors
On Tue, Nov 09, 2010 at 04:15:42PM +0200, Avi Kivity wrote: > - if (nr == BP_VECTOR && !svm_has(SVM_FEATURE_NRIP)) { > + if (nr == BP_VECTOR && !static_cpu_has(X86_FEATURE_NRIPS)) { What is static_cpu_has and why you use it only here and boot_cpu_has in all other places? Joerg -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html