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