From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 1/2] KVM: SVM: Replace svm_has() by standard Linux cpuid accessors Date: Thu, 11 Nov 2010 16:50:10 +0200 Message-ID: <4CDC02A2.6050306@redhat.com> References: <1289312143-32480-1-git-send-email-avi@redhat.com> <1289312143-32480-2-git-send-email-avi@redhat.com> <20101111144606.GD5193@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58308 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756169Ab0KKOuP (ORCPT ); Thu, 11 Nov 2010 09:50:15 -0500 In-Reply-To: <20101111144606.GD5193@8bytes.org> Sender: kvm-owner@vger.kernel.org List-ID: 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